Author: nbd
Date: 2015-10-31 10:28:50 +0100 (Sat, 31 Oct 2015)
New Revision: 47315

Modified:
   trunk/target/linux/ar71xx/image/Makefile
Log:
ar71xx/image: introduce TPLINK_HEADER_VERSION variable for tplink image

Signed-off-by: Alexander Couzens <[email protected]>

Modified: trunk/target/linux/ar71xx/image/Makefile
===================================================================
--- trunk/target/linux/ar71xx/image/Makefile    2015-10-31 09:28:42 UTC (rev 
47314)
+++ trunk/target/linux/ar71xx/image/Makefile    2015-10-31 09:28:50 UTC (rev 
47315)
@@ -48,6 +48,7 @@
 define Build/mktplinkfw
        -$(STAGING_DIR_HOST)/bin/mktplinkfw \
                -H $(TPLINK_HWID) -W $(TPLINK_HWREV) -F $(TPLINK_FLASHLAYOUT) 
-N OpenWrt -V $(REVISION) $2 \
+               -m $(TPLINK_HEADER_VERSION) \
                -k $(word 1,$^) \
                -r $@ \
                -o [email protected] \
@@ -62,6 +63,7 @@
 define Build/mktplinkfw-initramfs
        $(STAGING_DIR_HOST)/bin/mktplinkfw \
                -H $(TPLINK_HWID) -W $(TPLINK_HWREV) -F $(TPLINK_FLASHLAYOUT) 
-N OpenWrt -V $(REVISION) $2 \
+               -m $(TPLINK_HEADER_VERSION) \
                -k $@ \
                -o [email protected] \
                -s -S \
@@ -99,7 +101,7 @@
        cat "$(1)" > "$@"
 endef
 
-DEVICE_VARS += TPLINK_HWID TPLINK_HWREV TPLINK_FLASHLAYOUT
+DEVICE_VARS += TPLINK_HWID TPLINK_HWREV TPLINK_FLASHLAYOUT 
TPLINK_HEADER_VERSION
 
 # UBNT_BOARD e.g. one of (XS2, XS5, RS, XM)
 # UBNT_TYPE e.g. one of (BZ, XM, XW)
@@ -249,6 +251,7 @@
 
 define Device/tplink
   TPLINK_HWREV := 0x1
+  TPLINK_HEADER_VERSION := 1
   KERNEL := kernel-bin | patch-cmdline | lzma
   KERNEL_INITRAMFS := kernel-bin | patch-cmdline | lzma | mktplinkfw-initramfs
   IMAGES := sysupgrade.bin factory.bin
@@ -258,8 +261,9 @@
 
 define Device/tplink-chn-v2
 $(Device/tplink)
-  IMAGE/sysupgrade.bin := append-rootfs | mktplinkfw sysupgrade "-m 2"
-  IMAGE/factory.bin := append-rootfs | mktplinkfw factory "-m 2"
+  TPLINK_HEADER_VERSION := 2
+  IMAGE/sysupgrade.bin := append-rootfs | mktplinkfw sysupgrade
+  IMAGE/factory.bin := append-rootfs | mktplinkfw factory
 endef
 
 define Device/tplink-nolzma
_______________________________________________
openwrt-commits mailing list
[email protected]
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-commits

Reply via email to