From: Adrian Schmutzler Date: Wed, 29 Jan 2020 23:00:31 +0000 (+0100) Subject: ath79: add common definition for Device/tplink-v2 X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=4897bf0ca5986663bae1086f12f7d76b860a7df3;p=openwrt%2Fstaging%2Fansuel.git 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 --- 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