diff options
author | Sven Eckelmann <sven@narfation.org> | 2022-09-29 12:10:32 +0200 |
---|---|---|
committer | Hauke Mehrtens <hauke@hauke-m.de> | 2022-11-01 18:04:38 +0100 |
commit | 8d3e932b65b59ab7231cb5440866eb975bd150ea (patch) | |
tree | 84ef9b6530a610c53792c29dbad372c7f55011c6 /package/boot/uboot-envtools/files/ipq806x | |
parent | 633f3e1118580db313faf93c67d5b89231687bc3 (diff) | |
download | upstream-8d3e932b65b59ab7231cb5440866eb975bd150ea.tar.gz upstream-8d3e932b65b59ab7231cb5440866eb975bd150ea.tar.bz2 upstream-8d3e932b65b59ab7231cb5440866eb975bd150ea.zip |
uboot-envtools: Fix format of autogenerated sectors
The sector number must be stored in hex. Otherwise, the number (like 16)
will be parsed as hex and any write to the partition will end up with an
error like:
MTD erase error on /dev/mtd5: Invalid argument
Fixes: 9adfeccd8415 ("uboot-envtools: Add support for IPQ806x AP148 and DB149")
Fixes: 54b275c8ed3a ("ipq40xx: add target")
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@fungible.com>
Diffstat (limited to 'package/boot/uboot-envtools/files/ipq806x')
-rw-r--r-- | package/boot/uboot-envtools/files/ipq806x | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/package/boot/uboot-envtools/files/ipq806x b/package/boot/uboot-envtools/files/ipq806x index a8285d1452..77dfefbcd8 100644 --- a/package/boot/uboot-envtools/files/ipq806x +++ b/package/boot/uboot-envtools/files/ipq806x @@ -26,6 +26,7 @@ ubootenv_mtdinfo () { fi sectors=$(( $ubootenv_size / $mtd_erase )) + sectors=$(printf "0x%x" $sectors ) echo /dev/$mtd_dev 0x0 $ubootenv_size $mtd_erase $sectors } |