diff options
author | Jaehoon Chung <jh80.chung@samsung.com> | 2023-03-02 14:14:01 +0900 |
---|---|---|
committer | Jaehoon Chung <jh80.chung@samsung.com> | 2023-10-17 13:19:39 +0900 |
commit | 8043d17db30c9ba8bcce11352e95672396e8496e (patch) | |
tree | 4b2383d37a96b1340c178046fccdbe3c52329d91 /scripts/tizen | |
parent | 803a875489dece5de5e5403003e8a7a854d666cd (diff) | |
download | u-boot-8043d17db30c9ba8bcce11352e95672396e8496e.tar.gz u-boot-8043d17db30c9ba8bcce11352e95672396e8496e.tar.bz2 u-boot-8043d17db30c9ba8bcce11352e95672396e8496e.zip |
scripts: sd_fusing_rpi3: support the latest sfdisk version
In Ubunut 22.04, sfdisk version is 2.37.2 by default.
Before applied this patch, script is failed with messsage of "No space
left...".
It seems that It's caused about wrong start offset.
If sfdisk version is upper than 2.37, remove the start offset.
Change-Id: Ic6ecf839e48024cc68b051f1f05e6b4fc56332da
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Diffstat (limited to 'scripts/tizen')
-rwxr-xr-x | scripts/tizen/sd_fusing_rpi3.sh | 47 |
1 files changed, 33 insertions, 14 deletions
diff --git a/scripts/tizen/sd_fusing_rpi3.sh b/scripts/tizen/sd_fusing_rpi3.sh index ddcd730bde..639eaeec2e 100755 --- a/scripts/tizen/sd_fusing_rpi3.sh +++ b/scripts/tizen/sd_fusing_rpi3.sh @@ -167,6 +167,7 @@ function mkpart_3 () { local minor=${version[1]} local sfdisk_new=0 local support_delete=0 + local sfdisk_37=0 if [ $major -gt 2 ]; then sfdisk_new=1 @@ -176,6 +177,9 @@ function mkpart_3 () { if [ $major -eq 2 -a $minor -ge 28 ]; then support_delete=1 fi + if [ $major -eq 2 -a $minor -ge 37 ]; then + sfdisk_37=1 + fi fi fi @@ -248,20 +252,35 @@ function mkpart_3 () { if [ $support_delete == 1 ]; then sfdisk --delete $DISK fi - - sfdisk $DISK <<-__EOF__ - 4MiB,${BOOT_SZ}MiB,0xE,* - 8MiB,${ROOTFS_SZ}MiB,,- - 8MiB,${DATA_SZ}MiB,,- - 8MiB,,E,- - ,${USER_SZ}MiB,,- - ,${MODULE_SZ}MiB,,- - ,${RAMDISK_SZ}MiB,,- - ,${RAMDISK_RECOVERY_SZ}MiB,,- - ,${INFORM_SZ}MiB,,- - ,${HAL_SZ}MiB,,- - ,${RESERVED2_SZ}MiB,,- - __EOF__ + if [ $sfdisk_37 == 1 ] ; then + sfdisk $DISK <<-__EOF__ + 4MiB,${BOOT_SZ}MiB,0xE,* + ,${ROOTFS_SZ}MiB,,- + ,${DATA_SZ}MiB,,- + 12MiB,,E,- + ,${USER_SZ}MiB,,- + ,${MODULE_SZ}MiB,,- + ,${RAMDISK_SZ}MiB,,- + ,${RAMDISK_RECOVERY_SZ}MiB,,- + ,${INFORM_SZ}MiB,,- + ,${HAL_SZ}MiB,,- + ,${RESERVED2_SZ}MiB,,- + __EOF__ + else + sfdisk $DISK <<-__EOF__ + 4MiB,${BOOT_SZ}MiB,0xE,* + 8MiB,${ROOTFS_SZ}MiB,,- + 8MiB,${DATA_SZ}MiB,,- + 12MiB,,E,- + ,${USER_SZ}MiB,,- + ,${MODULE_SZ}MiB,,- + ,${RAMDISK_SZ}MiB,,- + ,${RAMDISK_RECOVERY_SZ}MiB,,- + ,${INFORM_SZ}MiB,,- + ,${HAL_SZ}MiB,,- + ,${RESERVED2_SZ}MiB,,- + __EOF__ + fi else # calculate start positions for alignment for extended partitions let "USER_START = 4 + $BOOT_SZ + $ROOTFS_SZ + $DATA_SZ + 1" |