From 126362169a6e1d4debc07be9eb61a14760c24c09 Mon Sep 17 00:00:00 2001 From: Jaehoon Chung Date: Wed, 15 Jun 2022 11:01:13 +0900 Subject: [PATCH] scripts: tizen: rpi4: add the additional option to flash A/B partition Add additional option as '-ab'. If it's used, it will be flashed to both A/B partitions. Otherwise, it will be flashed to A partition by default. Actaully, some developers don't need to update B partiton. Change-Id: I584be9e1be388b9f6bc247d105e406dd66d86ec0 Signed-off-by: Jaehoon Chung --- scripts/tizen/sd_fusing_rpi4.sh | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/scripts/tizen/sd_fusing_rpi4.sh b/scripts/tizen/sd_fusing_rpi4.sh index 9b22eb0992..bd7dfe10b9 100755 --- a/scripts/tizen/sd_fusing_rpi4.sh +++ b/scripts/tizen/sd_fusing_rpi4.sh @@ -10,6 +10,7 @@ declare -i FUSING_BINARY_NUM=0 declare CONV_ASCII="" declare -i FUS_ENTRY_NUM=0 +declare -i ab_option=0 # binary name | part number | bs | label | fs type declare -a PART_TABLE=( @@ -140,6 +141,9 @@ function fusing_image () { } function fusing_image_to_b () { + if [ $ab_option == 0 ] ; then + return + fi local -r fusing_img=$1 # get binary info using basename @@ -392,7 +396,10 @@ function mkpart_3 () { function show_usage () { echo "- Usage:" - echo " sudo ./sd_fusing*.sh -d [-b ..] [--format]" + echo " sudo ./sd_fusing*.sh -d [-b ..] [--format] [-ab]" + echo " -d : device ndoe " + echo " -b : binary " + echo " -ab : If want to update Image about B Partition, use -ab option" } function check_partition_format () { @@ -513,6 +520,10 @@ while test $# -ne 0; do binary_option=1 shift ;; + -ab) + ab_option=1 + shift + ;; *) if [ $binary_option == 1 ];then add_fusing_binary $option -- 2.34.1