[PATCH v2 3/3] ath79: wlr-7100: move to tiny target

Tomasz Maciej Nowak tmn505 at terefe.re
Sat Mar 14 07:27:30 PDT 2026


From: Tomasz Maciej Nowak <tmn505 at gmail.com>

On 25.12.0 the device has not enough free blocks to initialize overlay.
Move the device to tiny target and consume backup with storage
partitions, which were previously unused. This operation will reclaim
~800 KiB of flash memory. OEM used storage partition for configuration,
while backup was used to store copy of U-Boot environment and copy of
calibration data.

Signed-off-by: Tomasz Maciej Nowak <tmn505 at gmail.com>
---
v2
add block size for sysupgrade to work

 target/linux/ath79/dts/ar1022_sitecom_wlr-7100.dts | 14 +-------------
 .../generic/base-files/etc/board.d/02_network      |  6 ------
 .../etc/hotplug.d/ieee80211/10_fix_wifi_mac        |  5 -----
 target/linux/ath79/image/generic.mk                | 13 -------------
 target/linux/ath79/image/tiny.mk                   | 14 ++++++++++++++
 .../ath79/tiny/base-files/etc/board.d/02_network   |  8 +++++++-
 .../etc/hotplug.d/ieee80211/10_fix_wifi_mac        |  6 ++++++
 7 files changed, 28 insertions(+), 38 deletions(-)

diff --git a/target/linux/ath79/dts/ar1022_sitecom_wlr-7100.dts b/target/linux/ath79/dts/ar1022_sitecom_wlr-7100.dts
index a009d1be30cb..f618fe17e751 100644
--- a/target/linux/ath79/dts/ar1022_sitecom_wlr-7100.dts
+++ b/target/linux/ath79/dts/ar1022_sitecom_wlr-7100.dts
@@ -141,19 +141,7 @@
 			partition at 40000 {
 				compatible = "denx,uimage";
 				label = "firmware";
-				reg = <0x040000 0x750000>;
-			};
-
-			partition at 790000 {
-				label = "backup";
-				reg = <0x790000 0x010000>;
-				read-only;
-			};
-
-			partition at 7a0000 {
-				label = "storage";
-				reg = <0x7a0000 0x050000>;
-				read-only;
+				reg = <0x040000 0x7b0000>;
 			};
 
 			partition at 7f0000 {
diff --git a/target/linux/ath79/generic/base-files/etc/board.d/02_network b/target/linux/ath79/generic/base-files/etc/board.d/02_network
index 42e53f331013..5078995ec6c8 100644
--- a/target/linux/ath79/generic/base-files/etc/board.d/02_network
+++ b/target/linux/ath79/generic/base-files/etc/board.d/02_network
@@ -338,7 +338,6 @@ ath79_setup_interfaces()
 	engenius,esr1200|\
 	engenius,esr1750|\
 	engenius,esr900|\
-	sitecom,wlr-7100|\
 	tplink,archer-c2-v3|\
 	tplink,tl-wr1043nd-v4|\
 	tplink,tl-wr1043n-v5)
@@ -806,11 +805,6 @@ ath79_setup_macs()
 		lan_mac=$(mtd_get_mac_binary board-data 0x807E)
 		label_mac=$lan_mac
 		;;
-	sitecom,wlr-7100)
-		lan_mac=$(mtd_get_mac_ascii u-boot-env ethaddr)
-		wan_mac=$(mtd_get_mac_ascii u-boot-env wanaddr)
-		label_mac=$lan_mac
-		;;
 	sitecom,wlr-8100)
 		wan_mac=$(mtd_get_mac_ascii u-boot-env wanaddr)
 		;;
diff --git a/target/linux/ath79/generic/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac b/target/linux/ath79/generic/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac
index cde032c0fd2d..0ef322e898ec 100644
--- a/target/linux/ath79/generic/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac
+++ b/target/linux/ath79/generic/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac
@@ -103,11 +103,6 @@ case "$board" in
 	siemens,ws-ap3610)
 		mtd_get_mac_ascii cfg1 RADIOADDR${PHYNBR} > /sys${DEVPATH}/macaddress
 		;;
-	sitecom,wlr-7100)
-		[ "$PHYNBR" -eq 0 ] && \
-			macaddr_add "$(mtd_get_mac_ascii u-boot-env ethaddr)" 1 > /sys${DEVPATH}/macaddress
-		[ "$PHYNBR" -eq 1 ] && \
-			macaddr_add "$(mtd_get_mac_ascii u-boot-env ethaddr)" > /sys${DEVPATH}/macaddress
 	tplink,deco-s4-v2)
 		base_mac=$(mtd_get_mac_encrypted_deco $(find_mtd_part config))
 		[ "$PHYNBR" -eq 0 ] && \
diff --git a/target/linux/ath79/image/generic.mk b/target/linux/ath79/image/generic.mk
index 7f43fde57fe1..1784f854ab65 100644
--- a/target/linux/ath79/image/generic.mk
+++ b/target/linux/ath79/image/generic.mk
@@ -3002,19 +3002,6 @@ define Device/siemens_ws-ap3610
 endef
 TARGET_DEVICES += siemens_ws-ap3610
 
-define Device/sitecom_wlr-7100
-  SOC := ar1022
-  DEVICE_VENDOR := Sitecom
-  DEVICE_MODEL := WLR-7100
-  DEVICE_PACKAGES := ath10k-firmware-qca988x-ct kmod-ath10k-ct-smallbuffers kmod-usb2
-  IMAGES += factory.dlf
-  IMAGE/factory.dlf := append-kernel | pad-to $$$$(BLOCKSIZE) | \
-	append-rootfs | pad-rootfs | check-size | \
-	senao-header -r 0x222 -p 0x53 -t 2
-  IMAGE_SIZE := 7488k
-endef
-TARGET_DEVICES += sitecom_wlr-7100
-
 define Device/sitecom_wlr-8100
   SOC := qca9558
   DEVICE_VENDOR := Sitecom
diff --git a/target/linux/ath79/image/tiny.mk b/target/linux/ath79/image/tiny.mk
index 951c9aa48d34..23d39b9df940 100644
--- a/target/linux/ath79/image/tiny.mk
+++ b/target/linux/ath79/image/tiny.mk
@@ -187,3 +187,17 @@ define Device/pqi_air-pen
   DEFAULT := n
 endef
 TARGET_DEVICES += pqi_air-pen
+
+define Device/sitecom_wlr-7100
+  SOC := ar1022
+  DEVICE_VENDOR := Sitecom
+  DEVICE_MODEL := WLR-7100
+  DEVICE_PACKAGES := ath10k-firmware-qca988x-ct kmod-ath10k-ct-smallbuffers kmod-usb2
+  BLOCKSIZE := 4k
+  IMAGES += factory.dlf
+  IMAGE/factory.dlf := append-kernel | pad-to $$$$(BLOCKSIZE) | \
+	append-rootfs | pad-rootfs | check-size | \
+	senao-header -r 0x222 -p 0x53 -t 2
+  IMAGE_SIZE := 7872k
+endef
+TARGET_DEVICES += sitecom_wlr-7100
diff --git a/target/linux/ath79/tiny/base-files/etc/board.d/02_network b/target/linux/ath79/tiny/base-files/etc/board.d/02_network
index 608b6b7f8674..414a36f2d76e 100644
--- a/target/linux/ath79/tiny/base-files/etc/board.d/02_network
+++ b/target/linux/ath79/tiny/base-files/etc/board.d/02_network
@@ -63,7 +63,8 @@ ath79_setup_interfaces()
 		;;
 	dlink,dir-859-a1|\
 	dlink,dir-859-a3|\
-	dlink,dir-869-a1)
+	dlink,dir-869-a1|\
+	sitecom,wlr-7100)
 		ucidef_add_switch "switch0" \
 			"0 at eth0" "1:lan:4" "2:lan:3" "3:lan:2" "4:lan:1" "5:wan"
 		;;
@@ -163,6 +164,11 @@ ath79_setup_macs()
 		wan_mac=$(mtd_get_mac_binary config 0xc)
 		label_mac=$wan_mac
 		;;
+	sitecom,wlr-7100)
+		lan_mac=$(mtd_get_mac_ascii u-boot-env ethaddr)
+		wan_mac=$(mtd_get_mac_ascii u-boot-env wanaddr)
+		label_mac=$lan_mac
+		;;
 	tplink,tl-wr941-v2|\
 	tplink,tl-wr941n-v7-cn)
 		base_mac=$(mtd_get_mac_binary u-boot 0x1fc00)
diff --git a/target/linux/ath79/tiny/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac b/target/linux/ath79/tiny/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac
index 0a950d8582ef..981068537531 100755
--- a/target/linux/ath79/tiny/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac
+++ b/target/linux/ath79/tiny/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac
@@ -16,4 +16,10 @@ case "$board" in
 		[ "$PHYNBR" -eq 0 ] && \
 			mtd_get_mac_ascii "nvram" "lan_mac" > /sys${DEVPATH}/macaddress
 		;;
+	sitecom,wlr-7100)
+		[ "$PHYNBR" -eq 0 ] && \
+			macaddr_add "$(mtd_get_mac_ascii u-boot-env ethaddr)" 1 > /sys${DEVPATH}/macaddress
+		[ "$PHYNBR" -eq 1 ] && \
+			macaddr_add "$(mtd_get_mac_ascii u-boot-env ethaddr)" > /sys${DEVPATH}/macaddress
+		;;
 esac
-- 
2.53.0




More information about the openwrt-devel mailing list