diff options
author | Jaehoon Chung <jh80.chung@samsung.com> | 2021-10-05 18:49:25 +0900 |
---|---|---|
committer | Marek Szyprowski <m.szyprowski@samsung.com> | 2021-11-16 13:00:22 +0100 |
commit | 8402fc16564acb758873edbfde91171404d51796 (patch) | |
tree | c25617e33c08796ad13cf7ffc31cf03182ebb818 | |
parent | 32dc23dacd721386d867aa6ac2b1be2fa1c2bf4e (diff) | |
download | u-boot-8402fc16564acb758873edbfde91171404d51796.tar.gz u-boot-8402fc16564acb758873edbfde91171404d51796.tar.bz2 u-boot-8402fc16564acb758873edbfde91171404d51796.zip |
script: sd_fusing_rpi3: fix the version checking
Fix the version checking about supporting delete option.
Change-Id: I02d638fc30d0b8afd575ca14031a238185e3c2a8
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
-rwxr-xr-x | scripts/tizen/sd_fusing_rpi3.sh | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/scripts/tizen/sd_fusing_rpi3.sh b/scripts/tizen/sd_fusing_rpi3.sh index 4b38aa7a90..0bd2bee891 100755 --- a/scripts/tizen/sd_fusing_rpi3.sh +++ b/scripts/tizen/sd_fusing_rpi3.sh @@ -161,12 +161,16 @@ function mkpart_3 () { local major=${version[0]} local minor=${version[1]} local sfdisk_new=0 + local support_delete=0 if [ $major -gt 2 ]; then sfdisk_new=1 else - if [ $major -eq 2 -a $minor -ge 28 ]; then + if [ $major -eq 2 -a $minor -ge 26 ]; then sfdisk_new=1 + if [ $major -eq 2 -a $minor -ge 28 ]; then + support_delete=1 + fi fi fi @@ -235,7 +239,11 @@ function mkpart_3 () { if [ $sfdisk_new == 1 ]; then echo "Remove partition table..." - sfdisk --delete $DISK + if [ $support_delete == 1 ]; then + sfdisk --delete $DISK + else + dd if=/dev/zero of=$DISK bs=512 count=16 conv=notrunc + fi sfdisk $DISK <<-__EOF__ 4MiB,${BOOT_SZ}MiB,0xE,* |