[source] ramips: fix Airlink AR670W factory image

LEDE Commits lede-commits at lists.infradead.org
Sun Nov 27 06:39:04 PST 2016


mkresin pushed a commit to source.git, branch master:
https://git.lede-project.org/6cc0ae27b90f73a547130be7b5b25ea576615dd6

commit 6cc0ae27b90f73a547130be7b5b25ea576615dd6
Author: Mathias Kresin <dev at kresin.me>
AuthorDate: Fri Nov 25 13:03:01 2016 +0100

    ramips: fix Airlink AR670W factory image
    
    Move the mkwrgimg build step to the makefile. It will be required by
    other boards as well.
    
    Signed-off-by: Mathias Kresin <dev at kresin.me>
---
 target/linux/ramips/image/Makefile  |  5 +++++
 target/linux/ramips/image/rt288x.mk | 10 ++--------
 2 files changed, 7 insertions(+), 8 deletions(-)

diff --git a/target/linux/ramips/image/Makefile b/target/linux/ramips/image/Makefile
index 42cd63b..25396f5 100644
--- a/target/linux/ramips/image/Makefile
+++ b/target/linux/ramips/image/Makefile
@@ -99,6 +99,11 @@ define Build/seama-seal
 	$(call Build/seama,-s $@.seama $(1))
 endef
 
+define Build/wrg-header
+	mkwrgimg -i $@ -d "/dev/mtdblock/2" -s $(1) -o $@.new
+	mv $@.new $@
+endef
+
 #
 # The real magic happens inside these templates
 #
diff --git a/target/linux/ramips/image/rt288x.mk b/target/linux/ramips/image/rt288x.mk
index d9dd3ae..ab56fcc 100644
--- a/target/linux/ramips/image/rt288x.mk
+++ b/target/linux/ramips/image/rt288x.mk
@@ -6,13 +6,6 @@ define Build/gemtek-header
 	mkheader_gemtek $@ $@.new $(1) && mv $@.new $@
 endef
 
-define Build/airlink-header
-	mkwrgimg -i $@ \
-		-d "/dev/mtdblock/2" \
-		-s "wrgn16a_airlink_ar670w" \
-		-o $@.new && mv $@.new $@
-endef
-
 define Device/ar670w
   DTS := AR670W
   BLOCKSIZE := 64k
@@ -20,7 +13,8 @@ define Device/ar670w
   IMAGE_SIZE := $(ralink_default_fw_size_4M)
   KERNEL := $(KERNEL_DTB)
   IMAGES += factory.bin
-  IMAGE/factory.bin := $$(sysupgrade_bin) | gemtek-header ar725w
+  IMAGE/factory.bin := $$(sysupgrade_bin) | check-size $$$$(IMAGE_SIZE) | \
+	wrg-header wrgn16a_airlink_ar670w
 endef
 TARGET_DEVICES += ar670w
 



More information about the lede-commits mailing list