tplink-safeloader: Add support for Deco M4R V4
authorMark Ceeha <hi@shiz.me>
Sun, 29 Jan 2023 14:28:42 +0000 (15:28 +0100)
committerSander Vanheule <sander@svanheule.net>
Sun, 29 Jan 2023 14:45:09 +0000 (15:45 +0100)
Software version:
  soft_ver:1.0.0 Build 20211202 Rel. 69482

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` have been merged into `firmware`.

Signed-off-by: Mark Ceeha <hi@shiz.me>
src/tplink-safeloader.c

index ddb5dffcd9ed9930bb72b83dca16266fba95c6cb..d9e16058883cea37e43175c18bf5b62f94c13563 100644 (file)
@@ -1612,6 +1612,42 @@ static struct device_info boards[] = {
                .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.0\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 */
        {
                .id     = "DECO-S4-V2",
@@ -3525,6 +3561,7 @@ static void build_image(const char *output,
            strcasecmp(info->id, "ARCHER-C60-V3") == 0 ||
            strcasecmp(info->id, "ARCHER-C6U-V1") == 0 ||
            strcasecmp(info->id, "ARCHER-C6-V3") == 0 ||
+           strcasecmp(info->id, "DECO-M4R-V4") == 0 ||
            strcasecmp(info->id, "MR70X") == 0 ||
            strcasecmp(info->id, "TLWR1043NV5") == 0) {
                const uint8_t extra_para[2] = {0x01, 0x00};