firmware-utils: tplink-safeloader: add TP-Link Archer AX23 v1
[openwrt/staging/pepe2k.git] / tools / firmware-utils / patches / 001-tplink-safeloader-add-Archer-AX23.patch
1 From a2c80c586b81efc1662fec23202b88e2790e305e Mon Sep 17 00:00:00 2001
2 From: David Bauer <mail@david-bauer.net>
3 Date: Tue, 14 Mar 2023 04:04:18 +0100
4 Subject: [PATCH] tplink-safeloader: add Archer AX23
5
6 Original partition alignment
7 ----------------------------
8
9 partition fs-uboot base 0x00000 size 0x40000
10 partition os-image base 0x40000 size 0x400000
11 partition file-system base 0x440000 size 0xb60000
12 partition default-mac base 0xfa0000 size 0x00200
13 partition pin base 0xfa0200 size 0x00100
14 partition device-id base 0xfa0300 size 0x00100
15 partition product-info base 0xfa0400 size 0x0fc00
16 partition default-config base 0xfb0000 size 0x08000
17 partition ap-def-config base 0xfb8000 size 0x08000
18 partition user-config base 0xfc0000 size 0x0a000
19 partition ag-config base 0xfca000 size 0x04000
20 partition certificate base 0xfce000 size 0x02000
21 partition ap-config base 0xfd0000 size 0x06000
22 partition router-config base 0xfd6000 size 0x06000
23 partition favicon base 0xfdc000 size 0x02000
24 partition logo base 0xfde000 size 0x02000
25 partition partition-table base 0xfe0000 size 0x00800
26 partition soft-version base 0xfe0800 size 0x00100
27 partition support-list base 0xfe0900 size 0x00200
28 partition profile base 0xfe0b00 size 0x03000
29 partition extra-para base 0xfe3b00 size 0x00100
30 partition radio base 0xff0000 size 0x10000
31
32 Vendor image partition-table
33 ----------------------------
34
35 partition fs-uboot base 0x00000 size 0x40000
36 partition os-image base 0x40000 size 0x400000
37 partition file-system base 0x440000 size 0xb60000
38 partition default-mac base 0xfa0000 size 0x00200
39 partition pin base 0xfa0200 size 0x00100
40 partition device-id base 0xfa0300 size 0x00100
41 partition product-info base 0xfa0400 size 0x0fc00
42 partition default-config base 0xfb0000 size 0x08000
43 partition ap-def-config base 0xfb8000 size 0x08000
44 partition user-config base 0xfc0000 size 0x0a000
45 partition ag-config base 0xfca000 size 0x04000
46 partition certificate base 0xfce000 size 0x02000
47 partition ap-config base 0xfd0000 size 0x06000
48 partition router-config base 0xfd6000 size 0x06000
49 partition favicon base 0xfdc000 size 0x02000
50 partition logo base 0xfde000 size 0x02000
51 partition partition-table base 0xfe0000 size 0x00800
52 partition soft-version base 0xfe0800 size 0x00100
53 partition support-list base 0xfe0900 size 0x00200
54 partition profile base 0xfe0b00 size 0x03000
55 partition extra-para base 0xfe3b00 size 0x00100
56 partition radio base 0xff0000 size 0x10000
57
58 Signed-off-by: David Bauer <mail@david-bauer.net>
59 ---
60 src/tplink-safeloader.c | 44 +++++++++++++++++++++++++++++++++++++++++
61 1 file changed, 44 insertions(+)
62
63 --- a/src/tplink-safeloader.c
64 +++ b/src/tplink-safeloader.c
65 @@ -874,6 +874,49 @@ static struct device_info boards[] = {
66 .last_sysupgrade_partition = "file-system",
67 },
68
69 + /** Firmware layout for the Archer AX23 v1 */
70 + {
71 + .id = "ARCHER-AX23-V1",
72 + .vendor = "",
73 + .support_list =
74 + "SupportList:\n"
75 + "{product_name:Archer AX23,product_ver:1.0,special_id:45550000}\n"
76 + "{product_name:Archer AX23,product_ver:1.20,special_id:45550000}\n"
77 + "{product_name:Archer AX23,product_ver:1.0,special_id:4A500000}\n"
78 + "{product_name:Archer AX23,product_ver:1.20,special_id:4A500000}\n"
79 + "{product_name:Archer AX23,product_ver:1.0,special_id:4B520000}\n"
80 + "{product_name:Archer AX23,product_ver:1.0,special_id:52550000}\n"
81 + "{product_name:Archer AX1800,product_ver:1.20,special_id:52550000}\n",
82 + .part_trail = 0x00,
83 + .soft_ver = SOFT_VER_TEXT("soft_ver:3.0.3\n"),
84 +
85 + .partitions = {
86 + {"fs-uboot", 0x00000, 0x40000},
87 + {"firmware", 0x40000, 0xf60000},
88 + {"default-mac", 0xfa0000, 0x00200},
89 + {"pin", 0xfa0200, 0x00100},
90 + {"device-id", 0xfa0300, 0x00100},
91 + {"product-info", 0xfa0400, 0x0fc00},
92 + {"default-config", 0xfb0000, 0x08000},
93 + {"ap-def-config", 0xfb8000, 0x08000},
94 + {"user-config", 0xfc0000, 0x0a000},
95 + {"ag-config", 0xfca000, 0x04000},
96 + {"certificate", 0xfce000, 0x02000},
97 + {"ap-config", 0xfd0000, 0x06000},
98 + {"router-config", 0xfd6000, 0x06000},
99 + {"favicon", 0xfdc000, 0x02000},
100 + {"logo", 0xfde000, 0x02000},
101 + {"partition-table", 0xfe0000, 0x00800},
102 + {"soft-version", 0xfe0800, 0x00100},
103 + {"support-list", 0xfe0900, 0x00200},
104 + {"profile", 0xfe0b00, 0x03000},
105 + {"extra-para", 0xfe3b00, 0x00100},
106 + {"radio", 0xff0000, 0x10000},
107 + {NULL, 0, 0}
108 + },
109 + .first_sysupgrade_partition = "os-image",
110 + .last_sysupgrade_partition = "file-system",
111 + },
112 /** Firmware layout for the C2v3 */
113 {
114 .id = "ARCHER-C2-V3",
115 @@ -3353,6 +3396,7 @@ static void build_image(const char *outp
116 if (strcasecmp(info->id, "ARCHER-A6-V3") == 0 ||
117 strcasecmp(info->id, "ARCHER-A7-V5") == 0 ||
118 strcasecmp(info->id, "ARCHER-A9-V6") == 0 ||
119 + strcasecmp(info->id, "ARCHER-AX23-V1") == 0 ||
120 strcasecmp(info->id, "ARCHER-C2-V3") == 0 ||
121 strcasecmp(info->id, "ARCHER-C7-V4") == 0 ||
122 strcasecmp(info->id, "ARCHER-C7-V5") == 0 ||