gluon/patches/openwrt/0070-ar71xx-backport-support-for-new-TP-Link-region-codes.patch
Matthias Schiffer 7dce74c0f9
Refresh patches
2016-12-20 01:09:53 +01:00

39 lines
1.5 KiB
Diff

From: Matthias Schiffer <mschiffer@universe-factory.net>
Date: Sun, 28 Aug 2016 20:38:58 +0200
Subject: ar71xx: backport support for new TP-Link region codes
Generate flashable images for the Archer C7 v2 with current stock firmware
again.
diff --git a/target/linux/ar71xx/image/Makefile b/target/linux/ar71xx/image/Makefile
index 868a5021acb49878359497c90509de07faa3ca49..95f6d46d15b43faabb0bbf9301476d3ea5bee470 100644
--- a/target/linux/ar71xx/image/Makefile
+++ b/target/linux/ar71xx/image/Makefile
@@ -58,13 +58,14 @@ define Build/mktplinkfw
-o $@.new \
-j -X 0x40000 \
-a $(call rootfs_align,$(FILESYSTEM)) \
- $(if $(findstring sysupgrade,$1),-s) && mv $@.new $@ || rm -f $@
+ $(wordlist 2,$(words $(1)),$(1)) \
+ $(if $(findstring sysupgrade,$(word 1,$(1))),-s) && mv $@.new $@ || rm -f $@
endef
# -c combined image
define Build/mktplinkfw-initramfs
$(STAGING_DIR_HOST)/bin/mktplinkfw \
- -H $(TPLINK_HWID) -W $(TPLINK_HWREV) -F $(TPLINK_FLASHLAYOUT) -N OpenWrt -V $(REVISION) \
+ -H $(TPLINK_HWID) -W $(TPLINK_HWREV) -F $(TPLINK_FLASHLAYOUT) -N OpenWrt -V $(REVISION) $(1) \
-k $@ \
-o $@.new \
-s -S \
@@ -300,6 +301,9 @@ define Device/archer-c7-v2
BOARDNAME := ARCHER-C7
DEVICE_PROFILE := ARCHERC7
TPLINK_HWID := 0xc7000002
+ IMAGES := sysupgrade.bin factory.bin factory-us.bin factory-eu.bin
+ IMAGE/factory-us.bin := append-rootfs | mktplinkfw factory -C US
+ IMAGE/factory-eu.bin := append-rootfs | mktplinkfw factory -C EU
endef
TARGET_DEVICES += archer-c5 archer-c7-v1 archer-c7-v2