[OpenWrt-Devel] [PATCH] ath79: Utilize tplink-safeloader definition

Adrian Schmutzler freifunk at adrianschmutzler.de
Wed Mar 27 14:14:34 EDT 2019


Currently, tplink-safeloader definition is only used a base for
another common definition.

This patch adjusts tplink-safeloader so it can be actually used
for some targets in generic-tp-link.mk.

This patch is cosmetic except for the order of
"check-size $$$$(IMAGE_SIZE)" and "append-metadata" exchanged
for the tplink_re350k-v1 .

Signed-off-by: Adrian Schmutzler <freifunk at adrianschmutzler.de>
---
 target/linux/ath79/image/common-tp-link.mk  |  6 ++++--
 target/linux/ath79/image/generic-tp-link.mk | 18 +++---------------
 2 files changed, 7 insertions(+), 17 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 19a156be79..5b4543ac57 100644
--- a/target/linux/ath79/image/generic-tp-link.mk
+++ b/target/linux/ath79/image/generic-tp-link.mk
@@ -110,7 +110,7 @@ endef
 TARGET_DEVICES += tplink_archer-c7-v5
 
 define Device/tplink_re350k-v1
-  $(Device/tplink)
+  $(Device/tplink-safeloader)
   ATH_SOC := qca9558
   IMAGE_SIZE := 13760k
   DEVICE_TITLE := TP-Link RE350K v1
@@ -118,15 +118,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
@@ -135,10 +131,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
 
@@ -248,17 +240,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