aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ramips
diff options
context:
space:
mode:
authorJoseph C. Lehner <joseph.c.lehner@gmail.com>2016-06-24 13:02:18 +0200
committerZoltan HERPAI <wigyori@uid0.hu>2016-06-24 13:02:18 +0200
commita7ccb5a1b33f422ef2116c4deeed7d793ffb913c (patch)
tree4024e5d1da0eb4ce3bd9fad828a720b584580812 /target/linux/ramips
parente50af47fcd8f1e36e5e2451d81d81595bb3b7659 (diff)
downloadmaster-187ad058-a7ccb5a1b33f422ef2116c4deeed7d793ffb913c.tar.gz
master-187ad058-a7ccb5a1b33f422ef2116c4deeed7d793ffb913c.tar.bz2
master-187ad058-a7ccb5a1b33f422ef2116c4deeed7d793ffb913c.zip
ramips: fix Netgear EX2700 images
The bootloader on this device expects the kernel partition to end on a 64k boundary. The last 64 byte of the kernel partition must contain a valid uImage header (the fakeroot partition). Signed-off-by: Joseph C. Lehner <joseph.c.lehner@gmail.com>
Diffstat (limited to 'target/linux/ramips')
-rw-r--r--target/linux/ramips/image/mt7620.mk12
1 files changed, 4 insertions, 8 deletions
diff --git a/target/linux/ramips/image/mt7620.mk b/target/linux/ramips/image/mt7620.mk
index f236ba5ddd..d7acb1b8f9 100644
--- a/target/linux/ramips/image/mt7620.mk
+++ b/target/linux/ramips/image/mt7620.mk
@@ -7,13 +7,9 @@ define Build/tplink-header
-o $@.new -k $@ && mv $@.new $@
endef
-define Build/pad-ex2700
- cat ex2700-fakeroot.uImage >> $@; cat ex2700-fakeroot.uImage >> $@;
- dd if=$@ of=$@.new bs=64k conv=sync && truncate -s 128 $@.new && mv $@.new $@
-endef
-
-define Build/append-ex2700
- cat ex2700-fakeroot.uImage >> $@
+define Build/pad-kernel-ex2700
+ dd if=$@ of=$@.new bs=64k conv=sync && truncate -s -64 $@.new \
+ && cat ex2700-fakeroot.uImage >> $@.new && mv $@.new $@
endef
define Build/netgear-header
@@ -58,7 +54,7 @@ define Device/ex2700
DTS := EX2700
IMAGE_SIZE := $(ex2700_mtd_size)
IMAGES += factory.bin
- KERNEL := $(KERNEL_DTB) | pad-ex2700 | uImage lzma | append-ex2700
+ KERNEL := $(KERNEL_DTB) | uImage lzma | pad-kernel-ex2700
IMAGE/factory.bin := $$(IMAGE/sysupgrade.bin) | netgear-header -B EX2700 -H 29764623+4+0+32+2x2+0
DEVICE_TITLE := Netgear EX2700
endef