-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
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