scripts: tizen: sd_fusing_rpi3: adjust extended partition size calculation
authorMarek Szyprowski <m.szyprowski@samsung.com>
Fri, 22 Jan 2021 10:57:03 +0000 (11:57 +0100)
committerJaehoon Chung <jh80.chung@samsung.com>
Tue, 17 Oct 2023 04:19:30 +0000 (13:19 +0900)
With so many partitions defined (currently 11), the extended partition
has to be larger regardless the sfdisk tool version, otherwise, the last
partition will be smaller than the requested size.

Without this fix, fdisk from util-linux 2.33.1 creates the last partition
of 125,5M instead of 128M.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: Ib4cc3608bc6050b59ece57e803246d465185d65b

scripts/tizen/sd_fusing_rpi3.sh

index bbf9741..1c7edd0 100755 (executable)
@@ -172,11 +172,7 @@ function mkpart_3 () {
        local -r INFORM_SZ=8
        local -r RESERVED1_SZ=64
        local -r RESERVED2_SZ=128
-       if [ $sfdisk_new == 1 ]; then
-               local -r EXTEND_SZ=8
-       else
-               local -r EXTEND_SZ=12
-       fi
+       local -r EXTEND_SZ=12
 
        let "USER_SZ = $SIZE_MB - $BOOT_SZ - $ROOTFS_SZ - $DATA_SZ - $MODULE_SZ - $RAMDISK_SZ - $RAMDISK_RECOVERY_SZ - $INFORM_SZ - $EXTEND_SZ - $RESERVED1_SZ - $RESERVED2_SZ"