Просмотр исходного кода

ramips: fix Netgear EX2700 images

The previous image creation code would have failed if the
unpadded kernel uImage size was less than 64 bytes from the
next erase block boundary. Fix that.

Signed-off-by: Joseph C. Lehner <[email protected]>
Joseph C. Lehner 9 лет назад
Родитель
Сommit
2a589539ba
1 измененных файлов с 3 добавлено и 2 удалено
  1. 3 2
      target/linux/ramips/image/mt7620.mk

+ 3 - 2
target/linux/ramips/image/mt7620.mk

@@ -8,8 +8,9 @@ define Build/tplink-header
 endef
 
 define Build/pad-kernel-ex2700
-	dd if=$@ [email protected] bs=64k conv=sync && truncate -s -64 [email protected] \
-		&& cat ex2700-fakeroot.uImage >> [email protected] && mv [email protected] $@
+	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 [email protected] && mv [email protected] $@
 endef
 
 define Build/netgear-header