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>
This commit is contained in:
Adrian Schmutzler 2020-01-30 00:00:31 +01:00
parent 8a6994eb03
commit 4897bf0ca5
2 changed files with 13 additions and 8 deletions

View File

@ -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

View File

@ -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