mirror of
https://git.openwrt.org/openwrt/openwrt.git
synced 2026-01-28 03:37:17 +01:00
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:9adfeccd84("uboot-envtools: Add support for IPQ806x AP148 and DB149") Fixes:54b275c8ed("ipq40xx: add target") Signed-off-by: Sven Eckelmann <sven@narfation.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@fungible.com>
This commit is contained in:
parent
633f3e1118
commit
8d3e932b65
2 changed files with 2 additions and 0 deletions
|
|
@ -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
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue