[PATCH] firmware-utils: tplink-safeloader: Add support for Deco M4R V4

Mark Ceeha hi at shiz.me
Sun Jan 22 03:46:22 PST 2023


Software version:
soft_ver:1.0.3 Build 20220426 Rel. 32976

Partition table:
00000000 00040000 fs-uboot
00040000 00400000 os-image
00440000 00b60000 file-system
00fa0000 00000300 default-mac
00fa0300 00000100 device-id
00fa0400 0000fc00 product-info
00fb0000 00004000 group-info
00fb4000 0000c000 user-config
00fc0000 00010000 device-config
00fd0000 00010000 default-config
00fe0000 00000800 partition-table
00fe0800 00000100 soft-version
00fe0900 00000200 support-list
00fe0b00 00003000 profile
00fe3b00 00000100 extra-para
00ff0000 00010000 radio

os-image and file-system is merged.

Signed-off-by: Mark Ceeha <hi at shiz.me>
---
 src/tplink-safeloader.c | 36 ++++++++++++++++++++++++++++++++++++
 1 file changed, 36 insertions(+)

diff --git a/src/tplink-safeloader.c b/src/tplink-safeloader.c
index ddb5dff..df38193 100644
--- a/src/tplink-safeloader.c
+++ b/src/tplink-safeloader.c
@@ -1611,6 +1611,41 @@ static struct device_info boards[] = {
 		.first_sysupgrade_partition = "os-image",
 		.last_sysupgrade_partition = "file-system",
 	},
+	/** Firmware layout for the Deco M4R v4 */
+	{
+		.id     = "DECO-M4R-V4",
+		.vendor = "",
+		.support_list =
+			"SupportList:\n"
+			"{product_name:M4R,product_ver:4.0.0,special_id:55530000}\n"
+			"{product_name:M4R,product_ver:4.0.0,special_id:45550000}\n"
+			"{product_name:M4R,product_ver:4.0.0,special_id:4A500000}\n"
+			"{product_name:M4R,product_ver:4.0.0,special_id:42340000}\n"
+			"{product_name:M4R,product_ver:4.0.0,special_id:5A470000}\n",
+		.part_trail = 0x00,
+		.soft_ver = SOFT_VER_TEXT("soft_ver:1.0.2\n"),
+
+		.partitions = {
+			{"fs-uboot", 0x00000, 0x40000},
+			{"firmware", 0x40000, 0xf60000},
+			{"default-mac", 0xfa0000, 0x00300},
+			{"device-id", 0xfa0300, 0x00100},
+			{"product-info", 0xfa0400, 0x0fc00},
+			{"group-info", 0xfb0000, 0x04000},
+			{"user-config", 0xfb4000, 0x0c000},
+			{"device-config", 0xfc0000, 0x10000},
+			{"default-config", 0xfd0000, 0x10000},
+			{"partition-table", 0xfe0000, 0x00800},
+			{"soft-version", 0xfe0800, 0x00100},
+			{"support-list", 0xfe0900, 0x00200},
+			{"profile", 0xfe0b00, 0x03000},
+			{"extra-para", 0xfe3b00, 0x00100},
+			{"radio", 0xff0000, 0x10000},
+			{NULL, 0, 0}
+		},
+		.first_sysupgrade_partition = "os-image",
+		.last_sysupgrade_partition = "file-system",
+	},
 
 	/** Firmware layout for the Deco S4 v2 */
 	{
@@ -3524,6 +3559,7 @@ static void build_image(const char *output,
 	    strcasecmp(info->id, "ARCHER-C60-V2") == 0 ||
 	    strcasecmp(info->id, "ARCHER-C60-V3") == 0 ||
 	    strcasecmp(info->id, "ARCHER-C6U-V1") == 0 ||
+	    strcasecmp(info->id, "DECO-M4R-V4") == 0 ||
 	    strcasecmp(info->id, "ARCHER-C6-V3") == 0 ||
 	    strcasecmp(info->id, "MR70X") == 0 ||
 	    strcasecmp(info->id, "TLWR1043NV5") == 0) {
-- 
2.39.0




More information about the openwrt-devel mailing list