fa9811814a
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>
22 lines
351 B
Bash
22 lines
351 B
Bash
#!/bin/sh
|
|
#
|
|
# Copyright (C) 2012 OpenWrt.org
|
|
#
|
|
|
|
. /lib/ramips.sh
|
|
|
|
fix_seama_header() {
|
|
local kernel_size=$(sed -n 's/mtd[0-9]*: \([0-9a-f]*\).*"kernel".*/\1/p' /proc/mtd)
|
|
|
|
[ "$kernel_size" ] && mtd -c 0x$kernel_size fixseama firmware
|
|
}
|
|
|
|
board=$(ramips_board_name)
|
|
|
|
case "$board" in
|
|
cy-swr1100 | \
|
|
dir-645 | \
|
|
dir-860l-b1)
|
|
fix_seama_header
|
|
;;
|
|
esac
|