aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux
diff options
context:
space:
mode:
authorMathias Kresin <dev@kresin.me>2017-12-17 10:44:41 +0100
committerMathias Kresin <dev@kresin.me>2017-12-23 15:35:52 +0100
commit8ca650b8ce22fe2175cf15cfdd0e25206dd77481 (patch)
tree776d54aa9fae3df6e68ffdc33dec4162d6a68fe0 /target/linux
parentcb2c0649ee85f4247a112031bdab822bb4d98ff6 (diff)
downloadupstream-8ca650b8ce22fe2175cf15cfdd0e25206dd77481.tar.gz
upstream-8ca650b8ce22fe2175cf15cfdd0e25206dd77481.tar.bz2
upstream-8ca650b8ce22fe2175cf15cfdd0e25206dd77481.zip
ramips: move common tplink image build code into own recipe
Move common tplink image build code into own recipe. Include the common parts instead of including a full build recipe and overwriting former set varaibles. Signed-off-by: Mathias Kresin <dev@kresin.me>
Diffstat (limited to 'target/linux')
-rw-r--r--target/linux/ramips/image/mt76x8.mk28
1 files changed, 20 insertions, 8 deletions
diff --git a/target/linux/ramips/image/mt76x8.mk b/target/linux/ramips/image/mt76x8.mk
index 78293535f6..e11a89bb55 100644
--- a/target/linux/ramips/image/mt76x8.mk
+++ b/target/linux/ramips/image/mt76x8.mk
@@ -2,8 +2,23 @@
# MT76x8 Profiles
#
+define Device/tplink
+ TPLINK_FLASHLAYOUT :=
+ TPLINK_HWID :=
+ TPLINK_HWREV :=
+ TPLINK_HWREVADD :=
+ TPLINK_HVERSION :=
+ KERNEL := $(KERNEL_DTB)
+ KERNEL_INITRAMFS := $(KERNEL_DTB) | tplink-v2-header -e
+ IMAGES += tftp-recovery.bin
+ IMAGE/factory.bin := tplink-v2-image -e
+ IMAGE/tftp-recovery.bin := pad-extra 128k | $$(IMAGE/factory.bin)
+ IMAGE/sysupgrade.bin := tplink-v2-image -s -e | append-metadata | \
+ check-size $$$$(IMAGE_SIZE)
+endef
DEVICE_VARS += TPLINK_FLASHLAYOUT TPLINK_HWID TPLINK_HWREV TPLINK_HWREVADD TPLINK_HVERSION
+
define Device/duzun-dm06
DTS := DUZUN-DM06
DEVICE_TITLE := DuZun DM06
@@ -83,6 +98,7 @@ endef
TARGET_DEVICES += pbr-d1
define Device/tl-wr840n-v4
+ $(Device/tplink)
DTS := TL-WR840NV4
IMAGE_SIZE := 7808k
DEVICE_TITLE := TP-Link TL-WR840N v4
@@ -91,13 +107,6 @@ define Device/tl-wr840n-v4
TPLINK_HWREV := 0x1
TPLINK_HWREVADD := 0x4
TPLINK_HVERSION := 3
- KERNEL := $(KERNEL_DTB)
- KERNEL_INITRAMFS := $(KERNEL_DTB) | tplink-v2-header -e
- IMAGES += tftp-recovery.bin
- IMAGE/factory.bin := tplink-v2-image -e
- IMAGE/tftp-recovery.bin := pad-extra 128k | $$(IMAGE/factory.bin)
- IMAGE/sysupgrade.bin := tplink-v2-image -s -e | append-metadata | \
- check-size $$$$(IMAGE_SIZE)
endef
TARGET_DEVICES += tl-wr840n-v4
@@ -118,12 +127,15 @@ endef
TARGET_DEVICES += tl-wr840n-v5
define Device/tl-wr841n-v13
- $(Device/tl-wr840n-v4)
+ $(Device/tplink)
DTS := TL-WR841NV13
+ IMAGE_SIZE := 7808k
DEVICE_TITLE := TP-Link TL-WR841N v13
+ TPLINK_FLASHLAYOUT := 8Mmtk
TPLINK_HWID := 0x08410013
TPLINK_HWREV := 0x268
TPLINK_HWREVADD := 0x13
+ TPLINK_HVERSION := 3
endef
TARGET_DEVICES += tl-wr841n-v13