Skip to content
Snippets Groups Projects
Unverified Commit 639c12b8 authored by Matthias Schiffer's avatar Matthias Schiffer
Browse files

ar71xx-generic: add support for new TP-Link region codes

Generate flashable images for the Archer C7 v2 with current stock firmware
again.

To set the region code, the GLUON_REGION variable must be set to "us" or
"eu" in site.mk or as a make argument.

Fixes #860
parent b2473f05
No related branches found
No related tags found
No related merge requests found
......@@ -52,5 +52,8 @@ GLUON_RELEASE ?= $(DEFAULT_GLUON_RELEASE)
# Default priority for updates.
GLUON_PRIORITY ?= 0
# Region code required for some images; supported values: us eu
GLUON_REGION ?= eu
# Languages to include
GLUON_LANGS ?= en de
......@@ -334,6 +334,10 @@ GLUON_PRIORITY
The default priority for the generated manifests (see the autoupdater documentation
for more information).
GLUON_REGION
Region code to build into images where necessary. Valid values are the empty string,
``us`` and ``eu``.
GLUON_LANGS
List of languages (as two-letter-codes) to be included in the web interface. Should always contain
``en``.
......
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 dfc0d71..cbd8a49 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
......@@ -159,9 +159,13 @@ $(eval $(call GluonProfile,TLWR2543))
$(eval $(call GluonModel,TLWR2543,tl-wr2543-v1,tp-link-tl-wr2543n-nd-v1))
ifneq ($(BROKEN),)
# Archer C5 v1, C7 v2
# Archer C5 v1
$(eval $(call GluonProfile,ARCHERC5,kmod-ath10k-ct ath10k-firmware-qca988x-ct,ARCHERC7))
$(eval $(call GluonModel,ARCHERC5,archer-c5,tp-link-archer-c5-v1)) # BROKEN: ath10k
# Archer C7 v2
$(eval $(call GluonProfile,ARCHERC7,kmod-ath10k-ct ath10k-firmware-qca988x-ct))
$(eval $(call GluonModel,ARCHERC7,archer-c5,tp-link-archer-c5-v1)) # BROKEN: ath10k
$(eval $(call GluonProfileFactorySuffix,ARCHERC7,-squashfs-factory$(if $(GLUON_REGION),-$(GLUON_REGION)),.bin))
$(eval $(call GluonModel,ARCHERC7,archer-c7-v2,tp-link-archer-c7-v2)) # BROKEN: ath10k
endif
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment