ramips: fix fixseama call on first boot

Commit "kernel: mtdsplit: calculate kernel partition precisely for Seama"
changed the kernel partition to only contain the kernel itself and not
the Seama header. Adjust the fixseama call to match what is used on
brcm53xx.

This fixes failing to boot a second time after flashing the factory image
on the affected devices.

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
Reviewed-by: Jo-Philipp Wich <jo@mein.io>
This commit is contained in:
Matthias Schiffer 2016-06-30 15:50:11 +02:00
parent ecbc138343
commit fa9811814a
No known key found for this signature in database
GPG key ID: 16EF3F64CB201D9C

View file

@ -6,9 +6,9 @@
. /lib/ramips.sh . /lib/ramips.sh
fix_seama_header() { fix_seama_header() {
local part=$1 local kernel_size=$(sed -n 's/mtd[0-9]*: \([0-9a-f]*\).*"kernel".*/\1/p' /proc/mtd)
mtd fixseama $part [ "$kernel_size" ] && mtd -c 0x$kernel_size fixseama firmware
} }
board=$(ramips_board_name) board=$(ramips_board_name)
@ -17,6 +17,6 @@ case "$board" in
cy-swr1100 | \ cy-swr1100 | \
dir-645 | \ dir-645 | \
dir-860l-b1) dir-860l-b1)
fix_seama_header kernel fix_seama_header
;; ;;
esac esac