ramips: fix Netgear EX2700 images
authorJoseph C. Lehner <[email protected]>
Wed, 1 Jun 2016 14:50:03 +0000 (16:50 +0200)
committerJohn Crispin <[email protected]>
Sun, 5 Jun 2016 21:23:57 +0000 (23:23 +0200)
Calling `cat foo bar | dd ... conv=sync` *may* add
extraneous padding. Avoid this.

Signed-off-by: Joseph C. Lehner <[email protected]>
target/linux/ramips/image/mt7620.mk

index d6da803b525dfe0f69a8284bf0861e4a1126bd1e..935f755923107466d5b77cd43d3534de1971b558 100644 (file)
@@ -8,9 +8,9 @@ define Build/tplink-header
 endef
 
 define Build/pad-kernel-ex2700
-       dd if=/dev/zero [email protected] bs=64 count=1 && cat $@ [email protected] \
-               | dd [email protected] bs=64k conv=sync && truncate -s -64 [email protected] \
-               && cat ex2700-fakeroot.uImage >> [email protected] && rm $@.pad && mv [email protected] $@
+       cp $@ [email protected] && dd if=/dev/zero bs=64 count=1 >> [email protected] \
+               && dd [email protected] [email protected] bs=64k conv=sync && truncate -s -64 [email protected] \
+               && cat ex2700-fakeroot.uImage >> [email protected] && rm $@.tmp && mv [email protected] $@
 endef
 
 define Build/netgear-header