From: Jaehoon Chung Date: Tue, 5 Oct 2021 09:49:25 +0000 (+0900) Subject: script: sd_fusing_rpi3: fix the version checking X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7bf45c92d0a2cb6e63a5aabce00a763cf6110ccb;p=platform%2Fkernel%2Fu-boot.git script: sd_fusing_rpi3: fix the version checking Fix the version checking about supporting delete option. Change-Id: I02d638fc30d0b8afd575ca14031a238185e3c2a8 Signed-off-by: Jaehoon Chung --- 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,*