aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ramips/base-files/etc/uci-defaults
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2016-06-30 15:50:11 +0200
committerMatthias Schiffer <mschiffer@universe-factory.net>2016-06-30 17:12:38 +0200
commitfa9811814a97fbd0d01cce5e7faf955e7e2c407c (patch)
tree4c417c60b2dc1b70f551740a030ba4a3062be03a /target/linux/ramips/base-files/etc/uci-defaults
parentecbc138343f4f4c6fc65c3e6e143447dabc8e1a3 (diff)
downloadupstream-fa9811814a97fbd0d01cce5e7faf955e7e2c407c.tar.gz
upstream-fa9811814a97fbd0d01cce5e7faf955e7e2c407c.tar.bz2
upstream-fa9811814a97fbd0d01cce5e7faf955e7e2c407c.zip
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>
Diffstat (limited to 'target/linux/ramips/base-files/etc/uci-defaults')
-rw-r--r--target/linux/ramips/base-files/etc/uci-defaults/09_fix-seama-header6
1 files changed, 3 insertions, 3 deletions
diff --git a/target/linux/ramips/base-files/etc/uci-defaults/09_fix-seama-header b/target/linux/ramips/base-files/etc/uci-defaults/09_fix-seama-header
index 35167f1adc..7a0a325d4b 100644
--- a/target/linux/ramips/base-files/etc/uci-defaults/09_fix-seama-header
+++ b/target/linux/ramips/base-files/etc/uci-defaults/09_fix-seama-header
@@ -6,9 +6,9 @@
. /lib/ramips.sh
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)
@@ -17,6 +17,6 @@ case "$board" in
cy-swr1100 | \
dir-645 | \
dir-860l-b1)
- fix_seama_header kernel
+ fix_seama_header
;;
esac