[OpenWrt-Devel] [PATCH v2] ath79: Utilize tplink-safeloader definition
Adrian Schmutzler
freifunk at adrianschmutzler.de
Tue Apr 2 06:21:54 EDT 2019
Currently, tplink-safeloader definition is only used as base for
another common definition, while multiple devices just repeat
the same relevant parameters in their definitions.
This patch adjusts tplink-safeloader so it can be actually used
for some targets in generic-tp-link.mk.
The only functional (i.e. non-cosmetic) change introduced with
this patch is the consistent use of "check-size $$$$(IMAGE_SIZE)".
Run-tested on TP-Link CPE210 v2.
Tested-by: Adrian Schmutzler <freifunk at adrianschmutzler.de>
Signed-off-by: Adrian Schmutzler <freifunk at adrianschmutzler.de>
---
Changes in v2:
- Include CPE210 v2/v3
- Rebased
- Improved commit description/justification
---
target/linux/ath79/image/common-tp-link.mk | 6 ++++--
target/linux/ath79/image/generic-tp-link.mk | 20 +++-----------------
2 files changed, 7 insertions(+), 19 deletions(-)
diff --git a/target/linux/ath79/image/common-tp-link.mk b/target/linux/ath79/image/common-tp-link.mk
index f22da2f801..9054284114 100644
--- a/target/linux/ath79/image/common-tp-link.mk
+++ b/target/linux/ath79/image/common-tp-link.mk
@@ -99,12 +99,14 @@ endef
define Device/tplink-safeloader
$(Device/tplink)
- KERNEL := kernel-bin | append-dtb | lzma | tplink-v1-header
- IMAGE/sysupgrade.bin := append-rootfs | tplink-safeloader sysupgrade | append-metadata
+ KERNEL := kernel-bin | append-dtb | lzma | tplink-v1-header -O
+ IMAGE/sysupgrade.bin := append-rootfs | tplink-safeloader sysupgrade | \
+ append-metadata | check-size $$$$(IMAGE_SIZE)
IMAGE/factory.bin := append-rootfs | tplink-safeloader factory
endef
define Device/tplink-safeloader-uimage
$(Device/tplink-safeloader)
KERNEL := kernel-bin | append-dtb | lzma | uImageArcher lzma
+ IMAGE/sysupgrade.bin := append-rootfs | tplink-safeloader sysupgrade | append-metadata
endef
diff --git a/target/linux/ath79/image/generic-tp-link.mk b/target/linux/ath79/image/generic-tp-link.mk
index e3a0abeb5f..ecc34b88e0 100644
--- a/target/linux/ath79/image/generic-tp-link.mk
+++ b/target/linux/ath79/image/generic-tp-link.mk
@@ -117,7 +117,6 @@ define Device/tplink_cpe210-v2
TPLINK_BOARD_ID := CPE210V2
DEVICE_PACKAGES := rssileds
LOADER_TYPE := elf
- KERNEL := kernel-bin | append-dtb | lzma | tplink-v1-header -O
SUPPORTED_DEVICES += cpe210-v2
endef
TARGET_DEVICES += tplink_cpe210-v2
@@ -130,13 +129,12 @@ define Device/tplink_cpe210-v3
DEVICE_PACKAGES := rssileds
TPLINK_BOARD_ID := CPE210V3
LOADER_TYPE := elf
- KERNEL := kernel-bin | append-dtb | lzma | tplink-v1-header -O
SUPPORTED_DEVICES += cpe210-v3
endef
TARGET_DEVICES += tplink_cpe210-v3
define Device/tplink_re350k-v1
- $(Device/tplink)
+ $(Device/tplink-safeloader)
ATH_SOC := qca9558
IMAGE_SIZE := 13760k
DEVICE_TITLE := TP-Link RE350K v1
@@ -144,15 +142,11 @@ define Device/tplink_re350k-v1
TPLINK_BOARD_ID := RE350K-V1
TPLINK_HWID := 0x0
TPLINK_HWREV := 0
- KERNEL := kernel-bin | append-dtb | lzma | tplink-v1-header -O
- IMAGE/sysupgrade.bin := append-rootfs | tplink-safeloader sysupgrade | \
- check-size $$$$(IMAGE_SIZE) | append-metadata
- IMAGE/factory.bin := append-rootfs | tplink-safeloader factory
endef
TARGET_DEVICES += tplink_re350k-v1
define Device/tplink_re450-v2
- $(Device/tplink)
+ $(Device/tplink-safeloader)
ATH_SOC := qca9563
IMAGE_SIZE := 6016k
DEVICE_TITLE := TP-Link RE450 v2
@@ -161,10 +155,6 @@ define Device/tplink_re450-v2
TPLINK_HWREV := 0
TPLINK_BOARD_ID := RE450-V2
LOADER_TYPE := elf
- KERNEL := kernel-bin | append-dtb | lzma | tplink-v1-header -O
- IMAGE/sysupgrade.bin := append-rootfs | tplink-safeloader sysupgrade | \
- append-metadata | check-size $$$$(IMAGE_SIZE)
- IMAGE/factory.bin := append-rootfs | tplink-safeloader factory
endef
TARGET_DEVICES += tplink_re450-v2
@@ -274,17 +264,13 @@ endef
TARGET_DEVICES += tplink_tl-wr1043nd-v3
define Device/tplink_tl-wr1043nd-v4
- $(Device/tplink)
+ $(Device/tplink-safeloader)
ATH_SOC := qca9563
IMAGE_SIZE := 15552k
DEVICE_TITLE := TP-Link TL-WR1043N/ND v4
DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport
TPLINK_HWID := 0x10430004
TPLINK_BOARD_ID := TLWR1043NDV4
- KERNEL := kernel-bin | append-dtb | lzma | tplink-v1-header -O
- IMAGE/sysupgrade.bin := append-rootfs | tplink-safeloader sysupgrade | \
- append-metadata | check-size $$$$(IMAGE_SIZE)
- IMAGE/factory.bin := append-rootfs | tplink-safeloader factory
SUPPORTED_DEVICES += tl-wr1043nd-v4
endef
TARGET_DEVICES += tplink_tl-wr1043nd-v4
--
2.11.0
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel
More information about the openwrt-devel
mailing list