diff --git a/scripts/tplink-mkimage-2022.py b/scripts/tplink-mkimage-2022.py index 4db69409c9e..07ab5a0cb4e 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 e85204d796c..4e88a7c920f 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 378f37501bf..9a615eb0b49 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