aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSven Eckelmann <sven@narfation.org>2020-11-25 10:48:57 +0100
committerPetr Štetiar <ynezz@true.cz>2020-12-22 19:11:50 +0100
commit7c75eaadfcddd5375d0cfd8a4eeed8e8f9e1a094 (patch)
tree16fa627776616a15575dfc3ff3de4e6c8eb3cdc6
parenta459696eb1529e68f1f74c9230dcbf143c2800b1 (diff)
downloadupstream-7c75eaadfcddd5375d0cfd8a4eeed8e8f9e1a094.tar.gz
upstream-7c75eaadfcddd5375d0cfd8a4eeed8e8f9e1a094.tar.bz2
upstream-7c75eaadfcddd5375d0cfd8a4eeed8e8f9e1a094.zip
scripts/om-fwupgradecfg-gen.sh: Drop block alignment code
The padding and block alignment is handled by the image build script and doesn't need to be duplicated in the fwupgrade.cfg build script. Signed-off-by: Sven Eckelmann <sven@narfation.org>
-rwxr-xr-xscripts/om-fwupgradecfg-gen.sh6
1 files changed, 1 insertions, 5 deletions
diff --git a/scripts/om-fwupgradecfg-gen.sh b/scripts/om-fwupgradecfg-gen.sh
index 4a7094055f..915fbd05ab 100755
--- a/scripts/om-fwupgradecfg-gen.sh
+++ b/scripts/om-fwupgradecfg-gen.sh
@@ -23,7 +23,6 @@ case $CE_TYPE in
OM2P)
MAX_PART_SIZE=7168
KERNEL_FLASH_ADDR=0x1c0000
- FLASH_BS=262144
MD5_SKIP_BLOCKS=4
SIZE_FACTOR=1
SIZE_FORMAT="%d"
@@ -31,7 +30,6 @@ case $CE_TYPE in
OM5P|OM5PAC|MR600|MR900|MR1750|A60)
MAX_PART_SIZE=7808
KERNEL_FLASH_ADDR=0xb0000
- FLASH_BS=65536
MD5_SKIP_BLOCKS=4
SIZE_FACTOR=1
SIZE_FORMAT="%d"
@@ -39,7 +37,6 @@ case $CE_TYPE in
A42)
MAX_PART_SIZE=15616
KERNEL_FLASH_ADDR=0x180000
- FLASH_BS=65536
MD5_SKIP_BLOCKS=4
SIZE_FACTOR=1024
SIZE_FORMAT="0x%08x"
@@ -47,7 +44,6 @@ case $CE_TYPE in
A62)
MAX_PART_SIZE=15552
KERNEL_FLASH_ADDR=0x1a0000
- FLASH_BS=65536
MD5_SKIP_BLOCKS=4
SIZE_FACTOR=1024
SIZE_FORMAT="0x%08x"
@@ -63,7 +59,7 @@ CHECK_BS=65536
KERNEL_SIZE=$(stat -c%s "$KERNEL_PATH")
KERNEL_MD5=$(mkhash md5 $KERNEL_PATH)
KERNEL_SHA256=$(mkhash sha256 $KERNEL_PATH)
-KERNEL_PART_SIZE_KB=$(size=$(($KERNEL_SIZE / $FLASH_BS)); [ $(($size * $FLASH_BS)) -lt $KERNEL_SIZE ] && size=$(($size + 1)); echo $(($size * $FLASH_BS / 1024)))
+KERNEL_PART_SIZE_KB=$((KERNEL_SIZE / 1024))
KERNEL_PART_SIZE=$(printf $SIZE_FORMAT $(($KERNEL_PART_SIZE_KB * $SIZE_FACTOR)))
ROOTFS_FLASH_ADDR=$(addr=$(($KERNEL_FLASH_ADDR + ($KERNEL_PART_SIZE_KB * 1024))); printf "0x%x" $addr)