From f98dc4076f724dfec62a64c7896138b817cc1be5 Mon Sep 17 00:00:00 2001 From: Jaehoon Chung Date: Fri, 11 Nov 2022 14:29:37 +0900 Subject: [PATCH] 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 --- scripts/tizen/sd_fusing_rpi4.sh | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) 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 -- 2.34.1