aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ath79/image
diff options
context:
space:
mode:
authorAdrian Schmutzler <freifunk@adrianschmutzler.de>2020-01-30 00:00:31 +0100
committerAdrian Schmutzler <freifunk@adrianschmutzler.de>2020-02-02 14:01:59 +0100
commit4897bf0ca5986663bae1086f12f7d76b860a7df3 (patch)
treef7290d0058e78fa5c7eb28844774b667096ffc4d /target/linux/ath79/image
parent8a6994eb03b2bbaefea781444a548eeff7670c92 (diff)
downloadupstream-4897bf0ca5986663bae1086f12f7d76b860a7df3.tar.gz
upstream-4897bf0ca5986663bae1086f12f7d76b860a7df3.tar.bz2
upstream-4897bf0ca5986663bae1086f12f7d76b860a7df3.zip
ath79: add common definition for Device/tplink-v2
This adds a shared definition Device/tplink-v2 to common-tp-link.mk. Though currently only one device in ath79 uses it, putting it in the common file seems more organized. The definitions are based on the implementation in ramips target, where a lot of devices is using tplink-v2-* commands already. The '-V "ver. 2.0"' suffix for Archer D50 v1 can be removed because it's default in Build/tplink-v2-image anyway. While at it, add TPLINK_HWREVADD and TPLINK_HVERSION to DEVICE_VARS, which seems to have been overlooked when adding Archer D50 v1. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Diffstat (limited to 'target/linux/ath79/image')
-rw-r--r--target/linux/ath79/image/common-tp-link.mk13
-rw-r--r--target/linux/ath79/image/generic-tp-link.mk8
2 files changed, 13 insertions, 8 deletions
diff --git a/target/linux/ath79/image/common-tp-link.mk b/target/linux/ath79/image/common-tp-link.mk
index a9fccd0fe6..cfc574e4fb 100644
--- a/target/linux/ath79/image/common-tp-link.mk
+++ b/target/linux/ath79/image/common-tp-link.mk
@@ -1,5 +1,5 @@
DEVICE_VARS += TPLINK_HWID TPLINK_HWREV TPLINK_FLASHLAYOUT TPLINK_HEADER_VERSION
-DEVICE_VARS += TPLINK_BOARD_ID
+DEVICE_VARS += TPLINK_BOARD_ID TPLINK_HWREVADD TPLINK_HVERSION
define Build/uImageArcher
mkimage -A $(LINUX_KARCH) \
@@ -21,6 +21,17 @@ define Device/tplink-v1
IMAGE/factory.bin := tplink-v1-image factory
endef
+define Device/tplink-v2
+ DEVICE_VENDOR := TP-Link
+ TPLINK_HWREV := 0x1
+ TPLINK_HWREVADD := 0x0
+ TPLINK_HVERSION := 3
+ KERNEL := kernel-bin | append-dtb | lzma
+ KERNEL_INITRAMFS := kernel-bin | append-dtb | lzma | tplink-v2-header
+ IMAGE/sysupgrade.bin := tplink-v2-image -s | append-metadata | \
+ check-size $$$$(IMAGE_SIZE)
+endef
+
define Device/tplink-nolzma
$(Device/tplink-v1)
LOADER_FLASH_OFFS := 0x22000
diff --git a/target/linux/ath79/image/generic-tp-link.mk b/target/linux/ath79/image/generic-tp-link.mk
index f1a603dc6d..2a2384762b 100644
--- a/target/linux/ath79/image/generic-tp-link.mk
+++ b/target/linux/ath79/image/generic-tp-link.mk
@@ -190,8 +190,8 @@ endef
TARGET_DEVICES += tplink_archer-c7-v5
define Device/tplink_archer-d50-v1
+ $(Device/tplink-v2)
SOC := qca9531
- DEVICE_VENDOR := TP-Link
DEVICE_MODEL := Archer D50
DEVICE_VARIANT := v1
DEVICE_PACKAGES := kmod-usb2 kmod-usb-ledtrig-usbport \
@@ -201,14 +201,8 @@ define Device/tplink_archer-d50-v1
TPLINK_HWID := 0xC1200001
TPLINK_HWREV := 0x00000046
TPLINK_FLASHLAYOUT := 8Mqca
- TPLINK_HWREVADD := 0x00000000
- TPLINK_HVERSION := 3
- KERNEL := kernel-bin | append-dtb | lzma
KERNEL_INITRAMFS := kernel-bin | append-dtb | lzma | \
tplink-v2-header -s -V "ver. 1.0"
- IMAGES := sysupgrade.bin
- IMAGE/sysupgrade.bin := tplink-v2-image -s -V "ver. 2.0" | append-metadata | \
- check-size $$$$(IMAGE_SIZE)
endef
TARGET_DEVICES += tplink_archer-d50-v1