[openwrt/openwrt] qualcommax: ipq807x: Create working factory images for EAP620 HD v1 and EAP660 HD v1

LEDE Commits lede-commits at lists.infradead.org
Thu Mar 27 09:42:08 PDT 2025


robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/8a15a75e9414bbb839ac457701b041454e89bbc4

commit 8a15a75e9414bbb839ac457701b041454e89bbc4
Author: Shymon Samsel <ssamsel at umass.edu>
AuthorDate: Mon Mar 24 13:24:02 2025 -0400

    qualcommax: ipq807x: Create working factory images for EAP620 HD v1 and EAP660 HD v1
    
    Create factory tar for EAP620 HD v1 and EAP660 HD v1 which is accepted by the stock UI.
    Fix bug in ipq807x and ipq60xx makefiles so TPLINK_SUPPORT_STRING is handled properly.
    Modify tplink-mkimage-2022 script and relevant makefiles to allow spaces in support strings (required for EAP620 HD v1 and EAP660 HD v1).
    
    Installation steps are identical to EAP610-Outdoor:
    Web UI method
    -------------
    
    Set up the device using the vendor's web UI. After that go to
    Management->SSH and enable the "SSH Login" checkbox. Select "Save".
    The connect to the machine via SSH:
    
        ssh -o hostkeyalgorithms=ssh-rsa <ip_of_device>
    
    Disable signature verification:
    
        cliclientd stopcs
    
    Rename the "-web-ui-factory" image to something less than 63
    characters, maintaining the ".bin" suffix.
     * Go to System -> Firmware Update.
     * Under "New Firmware File", click "Browse" and select the image
     * Select "Update" and confirm by clicking "OK".
    
    If the update fails, the web UI should show an error message.
    Otherwise, the device should reboot into OpenWRT.
    
    Signed-off-by: Shymon Samsel <ssamsel at umass.edu>
    Link: https://github.com/openwrt/openwrt/pull/18340
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 scripts/tplink-mkimage-2022.py           | 4 +++-
 target/linux/qualcommax/image/ipq60xx.mk | 8 +++++---
 target/linux/qualcommax/image/ipq807x.mk | 6 +++++-
 3 files changed, 13 insertions(+), 5 deletions(-)

diff --git a/scripts/tplink-mkimage-2022.py b/scripts/tplink-mkimage-2022.py
index 4db69409c9..07ab5a0cb4 100755
--- a/scripts/tplink-mkimage-2022.py
+++ b/scripts/tplink-mkimage-2022.py
@@ -19,8 +19,10 @@ import argparse
 import hashlib
 import os
 import pprint
+import re
 import struct
 
+
 def decode_header(datafile):
     '''Read the tplink2022 image header anbd decode it into a dictionary'''
     header = {}
@@ -151,7 +153,7 @@ def create_image(output_image, root, support):
 
     support_list = {}
     support_list['name'] = 'support-list'
-    support_list['data'] = support.replace(" ", "\r\n").encode('utf-8')
+    support_list['data'] = re.sub("\\\\r\\\\n ?", "\r\n", support).encode("utf-8")
     support_list['offset'] = header['rootfs_size']
     support_list['size'] = len(support_list['data'])
     header['items'].append(support_list)
diff --git a/target/linux/qualcommax/image/ipq60xx.mk b/target/linux/qualcommax/image/ipq60xx.mk
index e85204d796..4e88a7c920 100644
--- a/target/linux/qualcommax/image/ipq60xx.mk
+++ b/target/linux/qualcommax/image/ipq60xx.mk
@@ -1,3 +1,5 @@
+DEVICE_VARS += TPLINK_SUPPORT_STRING
+
 define Device/8devices_mango-dvk
 	$(call Device/FitImageLzma)
 	DEVICE_VENDOR := 8devices
@@ -107,9 +109,9 @@ define Device/tplink_eap610-outdoor
 	DEVICE_PACKAGES := ipq-wifi-tplink_eap610-outdoor
 	IMAGES += web-ui-factory.bin
 	IMAGE/web-ui-factory.bin := append-ubi | tplink-image-2022
-	TPLINK_SUPPORT_STRING := SupportList: \
-		EAP610-Outdoor(TP-Link|UN|AX1800-D):1.0 \
-		EAP610-Outdoor(TP-Link|JP|AX1800-D):1.0 \
+	TPLINK_SUPPORT_STRING := SupportList:\r\n \
+		EAP610-Outdoor(TP-Link|UN|AX1800-D):1.0\r\n \
+		EAP610-Outdoor(TP-Link|JP|AX1800-D):1.0\r\n \
 		EAP610-Outdoor(TP-Link|CA|AX1800-D):1.0
 endef
 TARGET_DEVICES += tplink_eap610-outdoor
diff --git a/target/linux/qualcommax/image/ipq807x.mk b/target/linux/qualcommax/image/ipq807x.mk
index 378f37501b..9a615eb0b4 100644
--- a/target/linux/qualcommax/image/ipq807x.mk
+++ b/target/linux/qualcommax/image/ipq807x.mk
@@ -1,4 +1,4 @@
-DEVICE_VARS += NETGEAR_BOARD_ID NETGEAR_HW_ID
+DEVICE_VARS += NETGEAR_BOARD_ID NETGEAR_HW_ID TPLINK_SUPPORT_STRING
 
 define Build/asus-fake-ramdisk
 	rm -rf $(KDIR)/tmp/fakerd
@@ -402,6 +402,8 @@ define Device/tplink_eap620hd-v1
 	PAGESIZE := 2048
 	SOC := ipq8072
 	DEVICE_PACKAGES := ipq-wifi-tplink_eap620hd-v1
+	IMAGES += web-ui-factory.bin
+	IMAGE/web-ui-factory.bin := append-ubi | tplink-image-2022
 	TPLINK_SUPPORT_STRING := SupportList:\r\nEAP620 HD(TP-Link|UN|AX1800-D):1.0\r\n
 endef
 TARGET_DEVICES += tplink_eap620hd-v1
@@ -416,6 +418,8 @@ define Device/tplink_eap660hd-v1
 	PAGESIZE := 2048
 	SOC := ipq8072
 	DEVICE_PACKAGES := ipq-wifi-tplink_eap660hd-v1
+	IMAGES += web-ui-factory.bin
+	IMAGE/web-ui-factory.bin := append-ubi | tplink-image-2022
 	TPLINK_SUPPORT_STRING := SupportList:\r\nEAP660 HD(TP-Link|UN|AX3600-D):1.0\r\n
 endef
 TARGET_DEVICES += tplink_eap660hd-v1




More information about the lede-commits mailing list