From: Jaehoon Chung Date: Fri, 11 Nov 2022 05:29:37 +0000 (+0900) Subject: scripts: sd_fusing_rpi4: add skip-resize option X-Git-Tag: accepted/tizen/unified/20221115.070713~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3ec40c2ecd0d2c85310fbccebf4225915c10b828;p=platform%2Fkernel%2Fu-boot.git scripts: sd_fusing_rpi4: add skip-resize option Add skip-resize option to test A/B update. Change-Id: I7cea9f665b3f474987bb710994a639351389f5b4 Signed-off-by: Jaehoon Chung --- diff --git a/scripts/tizen/sd_fusing_rpi4.sh b/scripts/tizen/sd_fusing_rpi4.sh index bd904ad143..1b60fcc398 100755 --- a/scripts/tizen/sd_fusing_rpi4.sh +++ b/scripts/tizen/sd_fusing_rpi4.sh @@ -2,6 +2,7 @@ declare FORMAT="" declare DEVICE="" +declare SKIP=0 declare -i OLD_DD=0 # Binaires array for fusing @@ -425,6 +426,24 @@ function mkpart_3 () { mkfs.ext4 -q ${PART19} -L $RESERVED2 -F } +function skip_resize () { + if [ "${SKIP}" == "0" ]; then + return 0; + fi + + if [ ! -d mnt_tmp ] ; then + mkdir mnt_tmp + fi + + mount -t ext4 ${DEVICE}3 ./mnt_tmp + touch ./mnt_tmp/var/.resizefs_done + + echo "Rootfs resize will be skipped..." + sync + umount ./mnt_tmp + rmdir mnt_tmp +} + function show_usage () { echo "- Usage:" echo " sudo ./sd_fusing*.sh -d [-b ..] [--format] [--update [b] ]" @@ -512,7 +531,7 @@ function check_device () { function print_logo () { echo "" - echo "Raspberry Pi4 downloader, version 1.0.9" + echo "Raspberry Pi4 downloader, version 1.0.10" echo "" } @@ -562,6 +581,10 @@ while test $# -ne 0; do fi shift ;; + --skip-resize) + SKIP=1 + shift + ;; *) if [ $binary_option == 1 ];then add_fusing_binary $option @@ -578,3 +601,4 @@ check_device check_partition_format check_ddversion fuse_image +skip_resize