From: Joseph C. Lehner Date: Wed, 1 Jun 2016 14:50:03 +0000 (+0200) Subject: ramips: fix Netgear EX2700 images X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=065de8bd7adf4b8f13f07d5a813e979547b9affe;p=openwrt%2Fstaging%2Fzorun.git ramips: fix Netgear EX2700 images Calling `cat foo bar | dd ... conv=sync` *may* add extraneous padding. Avoid this. Signed-off-by: Joseph C. Lehner --- diff --git a/target/linux/ramips/image/mt7620.mk b/target/linux/ramips/image/mt7620.mk index d6da803b52..935f755923 100644 --- a/target/linux/ramips/image/mt7620.mk +++ b/target/linux/ramips/image/mt7620.mk @@ -8,9 +8,9 @@ define Build/tplink-header endef define Build/pad-kernel-ex2700 - dd if=/dev/zero of=$@.pad bs=64 count=1 && cat $@ $@.pad \ - | dd of=$@.new bs=64k conv=sync && truncate -s -64 $@.new \ - && cat ex2700-fakeroot.uImage >> $@.new && rm $@.pad && mv $@.new $@ + cp $@ $@.tmp && dd if=/dev/zero bs=64 count=1 >> $@.tmp \ + && dd if=$@.tmp of=$@.new bs=64k conv=sync && truncate -s -64 $@.new \ + && cat ex2700-fakeroot.uImage >> $@.new && rm $@.tmp && mv $@.new $@ endef define Build/netgear-header