From: Jaehoon Chung Date: Fri, 17 Jun 2022 11:12:05 +0000 (+0900) Subject: scripts: tizen: rpi4: support to flash only B partiton X-Git-Tag: accepted/tizen/unified/20231106.171643~112 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7cd8911c9fce9f14a17a6b7e4d55cd4d62ad7188;p=platform%2Fkernel%2Fu-boot.git scripts: tizen: rpi4: support to flash only B partiton If wants to update only B partition, "update" option can be used with b. e.g) ./sd_fusing_rip4 -d <..> -b <..> --update b Otherwise, it will be flashed to both partition. Change-Id: Ic9cec8b506f663b50ace52040f8bccdd4f0315ff Signed-off-by: Jaehoon Chung --- diff --git a/scripts/tizen/sd_fusing_rpi4.sh b/scripts/tizen/sd_fusing_rpi4.sh index c7639693aa..73843fcba3 100755 --- a/scripts/tizen/sd_fusing_rpi4.sh +++ b/scripts/tizen/sd_fusing_rpi4.sh @@ -98,6 +98,10 @@ function check_ddversion () { } function fusing_image () { + if [ $ab_option == 2 ] ; then + echo "Skip to update Partitoin A" + return + fi local -r fusing_img=$1 # get binary info using basename @@ -141,7 +145,8 @@ function fusing_image () { } function fusing_image_to_b () { - if [ $ab_option == 0 ] ; then + if [ $ab_option == 0 ] ; then + echo "Skip to update Partitoin B" return fi local -r fusing_img=$1 @@ -410,10 +415,11 @@ function mkpart_3 () { function show_usage () { echo "- Usage:" - echo " sudo ./sd_fusing*.sh -d [-b ..] [--format] [-ab]" + echo " sudo ./sd_fusing*.sh -d [-b ..] [--format] [--update [b] ]" echo " -d : device ndoe " echo " -b : binary " - echo " -ab : If want to update Image about B Partition, use -ab option" + echo " --update : If want to update Image about B Partition, use --update option with b" + echo " Otherwise, it will be updated to both partition" } function check_partition_format () { @@ -534,8 +540,12 @@ while test $# -ne 0; do binary_option=1 shift ;; - -ab) - ab_option=1 + --update) + if [ "$1" == "b" ] ; then + ab_option=2 + else + ab_option=1 + fi shift ;; *)