From: Seung-Woo Kim Date: Wed, 25 Nov 2020 02:49:27 +0000 (+0900) Subject: tizen: sd_fusing_amlogic: sync with recent script for old tools X-Git-Tag: submit/tizen/20201208.071016~47 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c7153ace4744363a89c98dea4c027531900a8a5f;p=platform%2Fkernel%2Fu-boot.git tizen: sd_fusing_amlogic: sync with recent script for old tools The script was not fully sync with recent sd_fusing script change and it cayses old sfdisk size issue because not enough EXTEND_SZ to align block offset in extended partition. Update the parts with recent rpi fusing script and also remove duplicated data size variable. Change-Id: I5bd939f9a29093d9acaf76e2b4cae7b1c8ae2de0 Signed-off-by: Seung-Woo Kim --- diff --git a/scripts/tizen/sd_fusing_amlogic.sh b/scripts/tizen/sd_fusing_amlogic.sh index aab4aeeab2..2e904fe8c6 100755 --- a/scripts/tizen/sd_fusing_amlogic.sh +++ b/scripts/tizen/sd_fusing_amlogic.sh @@ -2,6 +2,7 @@ declare FORMAT="" declare DEVICE="" +declare -i OLD_DD=0 # Binaires array for fusing declare -a FUSING_BINARY_ARRAY @@ -74,7 +75,8 @@ function fusing_image () { local -r -i part_idx=$? if [ $part_idx -ne $PART_TABLE_COL ];then - local -r device=$DEVICE${PART_TABLE[${part_idx} * ${PART_TABLE_ROW} + 1]} + local -r num=${PART_TABLE[${part_idx} * ${PART_TABLE_ROW} + 1]} + local -r device=/dev/`lsblk ${DEVICE} -o KNAME | grep -G "[a-z]${num}\$"` local -r bs=${PART_TABLE[${part_idx} * ${PART_TABLE_ROW} + 2]} else echo "Not supported binary: $fusing_img" @@ -175,10 +177,9 @@ function mkpart_3 () { if [ $sfdisk_new == 1 ]; then local -r EXTEND_SZ=8 else - local -r EXTEND_SZ=10 + local -r EXTEND_SZ=12 fi - let "USER_SZ = $SIZE_MB - $BOOT_SZ - $ROOTFS_SZ - $DATA_SZ - $MODULE_SZ - $RAMDISK_SZ - $EXTEND_SZ" let "USER_SZ = $SIZE_MB - $BOOT_SZ - $ROOTFS_SZ - $DATA_SZ - $MODULE_SZ - $RAMDISK_SZ - $RAMDISK_RECOVERY_SZ - $RESERVED0_SZ - $EXTEND_SZ - $RESERVED1_SZ - $RESERVED2_SZ" local -r BOOT=boot @@ -373,7 +374,7 @@ function check_device () { function print_logo () { echo "" - echo "Khadas VIM3 downloader, version 1.0" + echo "Khadas VIM3 downloader, version 1.1" echo "" }