From: Mathias Kresin Date: Sun, 17 Dec 2017 09:44:41 +0000 (+0100) Subject: ramips: move common tplink image build code into own recipe X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=8ca650b8ce22fe2175cf15cfdd0e25206dd77481;p=openwrt%2Fstaging%2Fneocturne.git 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 --- 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