[PATCH] tplink-safeloader: add WPA8631P v3 support

jwmullally at gmail.com jwmullally at gmail.com
Tue Feb 22 15:59:51 PST 2022


From: Joe Mullally <jwmullally at gmail.com>

Enable creating images compatible with TP-Link's WPA8631P powerline router.

This matches all current firmwares for all revisions and regions.

Users with older EU "Build 20200314 Rel.3608" & EU "Build 20200508 Rel.41814"
should first upgrade to EU "Build 20200927 Rel.61199" or later before flashing.

The original partition layout is as follows:
    partition fs-uboot base 0x00000 size 0x20000
    partition os-image base 0x20000 size 0x330000
    partition file-system base 0x350000 size 0x3e0000
    partition partition-table base 0x730000 size 0x02000
    partition default-mac base 0x732000 size 0x00020
    partition pin base 0x732100 size 0x00020
    partition device-id base 0x732200 size 0x00030
    partition default-region base 0x732300 size 0x00010
    partition product-info base 0x732400 size 0x00200
    partition extra-para base 0x732600 size 0x00200
    partition soft-version base 0x732800 size 0x00200
    partition support-list base 0x732a00 size 0x00100
    partition profile base 0x732b00 size 0x00100
    partition default-config base 0x732c00 size 0x00800
    partition plc-type base 0x733400 size 0x00020
    partition default-pib base 0x733500 size 0x06000
    partition user-config base 0x740000 size 0x10000
    partition plc-pib base 0x750000 size 0x10000
    partition plc-nvm base 0x760000 size 0x90000
    partition radio base 0x7f0000 size 0x10000

For OpenWrt, the os-image and file-system partition are merged into one
firmware partition, to enable dynamic rootfs partition splits.

Review of partitions in all known firmwares. This patch supports
layout md5sum 0771948573fffa726b8927ca6259ea16.

    filename
    grep -ao "partition .*$" filename | md5sum
    support_list

    wpa8631pv3_eu-up-ver3-0-0-P1-20200314-rel3608.bin
    33df2a8474670e785fb487dc9392dadf
    {product_name:TL-WPA8631P,product_ver:3.0.0,special_id:45550000}

    wpa8631pv3_eu-up-ver3-0-0-P1-20200508-rel41814-APPLC.bin
    68f3408ac2310e81fead071be4238aa9
    {product_name:TL-WPA8631P,product_ver:3.0.0,special_id:45550000}

    wpa8631pv3_us-up-ver3-0-0-P1-20200820-rel39000-APPLC.bin
    0771948573fffa726b8927ca6259ea16
    {product_name:TL-WPA8631P,product_ver:3.0.0,special_id:55530000}

    wpa8631pv3_eu-up-ver3-0-0-P1-20200927-rel61199-APPLC.bin
    0771948573fffa726b8927ca6259ea16
    {product_name:TL-WPA8631P,product_ver:3.0.0,special_id:45550000}

    wpa8631pv3_eu-up-ver3-0-0-P1-20210514-rel45003-APPLC.bin
    0771948573fffa726b8927ca6259ea16
    {product_name:TL-WPA8631P,product_ver:3.0.0,special_id:45550000}

    wpa8631pv3_us-up-ver3-0-0-P1-20210625-rel35759-APPLC.bin
    0771948573fffa726b8927ca6259ea16
    {product_name:TL-WPA8631P,product_ver:3.0.0,special_id:55530000}

    wpa8631pv3_au-up-ver3-0-0-P1-20210625-rel42417-APPLC.bin
    0771948573fffa726b8927ca6259ea16
    {product_name:TL-WPA8631P,product_ver:3.0.0,special_id:41550000}

Signed-off-by: Joe Mullally <jwmullally at gmail.com>
---
 src/tplink-safeloader.c | 39 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 39 insertions(+)

diff --git a/src/tplink-safeloader.c b/src/tplink-safeloader.c
index d0d345d..b009983 100644
--- a/src/tplink-safeloader.c
+++ b/src/tplink-safeloader.c
@@ -1936,6 +1936,45 @@ static struct device_info boards[] = {
 		.last_sysupgrade_partition = "file-system"
 	},
 
+	/** Firmware layout for the TL-WPA8631P v3 */
+	{
+		.id     = "TL-WPA8631P-V3",
+		.vendor = "",
+		.support_list =
+			"SupportList:\n"
+			"{product_name:TL-WPA8631P,product_ver:3.0.0,special_id:41550000}\n"
+			"{product_name:TL-WPA8631P,product_ver:3.0.0,special_id:45550000}\n"
+			"{product_name:TL-WPA8631P,product_ver:3.0.0,special_id:55530000}\n",
+		.part_trail = 0x00,
+		.soft_ver = SOFT_VER_DEFAULT,
+
+		.partitions = {
+			{"fs-uboot", 0x00000, 0x20000},
+			{"firmware", 0x20000, 0x710000},
+			{"partition-table", 0x730000, 0x02000},
+			{"default-mac", 0x732000, 0x00020},
+			{"pin", 0x732100, 0x00020},
+			{"device-id", 0x732200, 0x00030},
+			{"default-region", 0x732300, 0x00010},
+			{"product-info", 0x732400, 0x00200},
+			{"extra-para", 0x732600, 0x00200},
+			{"soft-version", 0x732800, 0x00200},
+			{"support-list", 0x732a00, 0x00100},
+			{"profile", 0x732b00, 0x00100},
+			{"default-config", 0x732c00, 0x00800},
+			{"plc-type", 0x733400, 0x00020},
+			{"default-pib", 0x733500, 0x06000},
+			{"user-config", 0x740000, 0x10000},
+			{"plc-pib", 0x750000, 0x10000},
+			{"plc-nvm", 0x760000, 0x90000},
+			{"radio", 0x7f0000, 0x10000},
+			{NULL, 0, 0}
+		},
+
+		.first_sysupgrade_partition = "os-image",
+		.last_sysupgrade_partition = "file-system"
+	},
+
 	/** Firmware layout for the TL-WR1043 v5 */
 	{
 		.id     = "TLWR1043NV5",
-- 
2.35.1




More information about the openwrt-devel mailing list