ramips: Add support to TP-Link Archer MR200
[openwrt/openwrt.git] / tools / firmware-utils / src / mktplinkfw2.c
index 34c4b14064aae9cb0f0638f377d19f84c4a4513f..3ab5c52ec2a3b26f927fe76f63e4a0fc67f35b45 100644 (file)
@@ -143,12 +143,24 @@ static struct flash_layout layouts[] = {
                .kernel_la      = 0x80002000,
                .kernel_ep      = 0x80002000,
                .rootfs_ofs     = 0x140000,
+       }, {
+               .id             = "16Mltq",
+               .fw_max_len     = 0xf90000,
+               .kernel_la      = 0x80002000,
+               .kernel_ep      = 0x800061b0,
+               .rootfs_ofs     = 0x140000,
        }, {
                .id             = "8Mmtk",
                .fw_max_len     = 0x7a0000,
                .kernel_la      = 0x80000000,
                .kernel_ep      = 0x80000000,
                .rootfs_ofs     = 0x140000,
+       }, {
+               .id             = "8MLmtk",
+               .fw_max_len     = 0x7b0000,
+               .kernel_la      = 0x80000000,
+               .kernel_ep      = 0x80000000,
+               .rootfs_ofs     = 0x140000,
        }, {
                /* terminating entry */
        }
@@ -160,6 +172,11 @@ static struct board_info boards[] = {
                .hw_id          = 0x89700001,
                .hw_rev         = 1,
                .layout_id      = "8Mltq",
+       }, {
+               .id             = "TD-W8980v1",
+               .hw_id          = 0x89800001,
+               .hw_rev         = 14,
+               .layout_id      = "8Mltq",
        }, {
                .id             = "ArcherC20i",
                .hw_id          = 0xc2000001,
@@ -167,6 +184,26 @@ static struct board_info boards[] = {
                .layout_id      = "8Mmtk",
                .hdr_ver        = 3,
                .endian_swap    = true,
+       }, {
+               .id             = "ArcherVR200V",
+               .hw_id          = 0x73b70801,
+               .hw_rev         = 0x2f,
+               .layout_id      = "16Mltq",
+               .hdr_ver        = 2,
+       }, {
+               .id             = "ArcherC50",
+               .hw_id          = 0xc7500001,
+               .hw_rev         = 69,
+               .layout_id      = "8Mmtk",
+               .hdr_ver        = 3,
+               .endian_swap    = true,
+       }, {
+               .id             = "ArcherMR200",
+               .hw_id          = 0xd7500001,
+               .hw_rev         = 0x4a,
+               .layout_id      = "8MLmtk",
+               .hdr_ver        = 3,
+               .endian_swap    = true,
        }, {
                /* terminating entry */
        }
@@ -184,7 +221,7 @@ static struct board_info boards[] = {
 #define ERRS(fmt, ...) do { \
        int save = errno; \
        fflush(0); \
-       fprintf(stderr, "[%s] *** error: " fmt "\n", \
+       fprintf(stderr, "[%s] *** error: " fmt ": %s\n", \
                        progname, ## __VA_ARGS__, strerror(save)); \
 } while (0)