aboutsummaryrefslogtreecommitdiffstats
path: root/tools/firmware-utils/src/tplink-safeloader.c
diff options
context:
space:
mode:
authorAdrian Schmutzler <freifunk@adrianschmutzler.de>2020-02-12 14:43:15 +0100
committerAdrian Schmutzler <freifunk@adrianschmutzler.de>2020-03-20 12:22:18 +0100
commite7fae8fc970bfe0c5aaa370d314ffa6713c72328 (patch)
tree480282482df87c38ef27f674c07e3bc37bf46883 /tools/firmware-utils/src/tplink-safeloader.c
parent2bd9d2e08be4eb392b07fe42dbeea26a1e1cb7da (diff)
downloadupstream-e7fae8fc970bfe0c5aaa370d314ffa6713c72328.tar.gz
upstream-e7fae8fc970bfe0c5aaa370d314ffa6713c72328.tar.bz2
upstream-e7fae8fc970bfe0c5aaa370d314ffa6713c72328.zip
ath79: add support for TP-Link Archer C60 v3
TP-Link Archer C60 v3 is a dual-band AC1350 router, based on Qualcomm/Atheros QCA9561 + QCA9886. It seems to be identical to the v2 revision, except that it lacks a WPS LED and has different GPIO for amber WAN LED. Specification: - 775/650/258 MHz (CPU/DDR/AHB) - 64 MB of RAM (DDR2) - 8 MB of FLASH (SPI NOR) - 3T3R 2.4 GHz - 2T2R 5 GHz - 5x 10/100 Mbps Ethernet - 6x LED, 2x button - UART header on PCB Flash instruction (WebUI): Download *-factory.bin image and upload it via the firmwary upgrade function of the stock firmware WebUI. Flash instruction (TFTP): 1. Set PC to fixed IP address 192.168.0.66 2. Download *-factory.bin image and rename it to tp_recovery.bin 3. Start a tftp server with the file tp_recovery.bin in its root directory 4. Turn off the router 5. Press and hold reset button 6. Turn on router with the reset button pressed and wait ~15 seconds 7. Release the reset button and after a short time the firmware should be transferred from the tftp server 8. Wait ~30 second to complete recovery While TFTP works for OpenWrt images, my device didn't accept the only available official firmware "Archer C60(EU)_V3.0_190115.bin". In contrast to earlier revisions (v2), the v3 contains the (same) MAC address twice, once in 0x1fa08 and again in 0x1fb08. While the partition-table on the device refers to the latter, the firmware image contains a different partition-table for that region: name device firmware factory-boot 0x00000-0x1fb00 0x00000-0x1fa00 default-mac 0x1fb00-0x1fd00 0x1fa00-0x1fc00 pin 0x1fd00-0x1fe00 0x1fc00-0x1fd00 product-info 0x1fe00-0x1ff00 0x1fd00-0x1ff00 device-id 0x1ff00-0x20000 0x1ff00-0x20000 While the MAC address is present twice, other data like the PIN isn't, so with the partitioning from the firmware image the PIN on the device would actually be outside of its partition. Consequently, the patch uses the MAC location from the device (which is the same as for the v2). Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de> (cherry picked from commit 646d95c374072598fab9e949ef4425177c5c7960)
Diffstat (limited to 'tools/firmware-utils/src/tplink-safeloader.c')
-rw-r--r--tools/firmware-utils/src/tplink-safeloader.c37
1 files changed, 37 insertions, 0 deletions
diff --git a/tools/firmware-utils/src/tplink-safeloader.c b/tools/firmware-utils/src/tplink-safeloader.c
index 1c5792f70b..b6ad5c0869 100644
--- a/tools/firmware-utils/src/tplink-safeloader.c
+++ b/tools/firmware-utils/src/tplink-safeloader.c
@@ -799,6 +799,42 @@ static struct device_info boards[] = {
.last_sysupgrade_partition = "file-system",
},
+ /** Firmware layout for the C60v3 */
+ {
+ .id = "ARCHER-C60-V3",
+ .vendor = "",
+ .support_list =
+ "SupportList:\r\n"
+ "{product_name:Archer C60,product_ver:3.0.0,special_id:42520000}\r\n"
+ "{product_name:Archer C60,product_ver:3.0.0,special_id:45550000}\r\n"
+ "{product_name:Archer C60,product_ver:3.0.0,special_id:55530000}\r\n",
+ .support_trail = '\x00',
+ .soft_ver = "soft_ver:3.0.0\n",
+
+ .partitions = {
+ {"factory-boot", 0x00000, 0x1fb00},
+ {"default-mac", 0x1fb00, 0x00200},
+ {"pin", 0x1fd00, 0x00100},
+ {"product-info", 0x1fe00, 0x00100},
+ {"device-id", 0x1ff00, 0x00100},
+ {"fs-uboot", 0x20000, 0x10000},
+ {"firmware", 0x30000, 0x7a0000},
+ {"soft-version", 0x7d9500, 0x00100},
+ {"support-list", 0x7d9600, 0x00100},
+ {"extra-para", 0x7d9700, 0x00100},
+ {"profile", 0x7d9800, 0x03000},
+ {"default-config", 0x7dc800, 0x03000},
+ {"partition-table", 0x7df800, 0x00800},
+ {"user-config", 0x7e0000, 0x0c000},
+ {"certificate", 0x7ec000, 0x04000},
+ {"radio", 0x7f0000, 0x10000},
+ {NULL, 0, 0}
+ },
+
+ .first_sysupgrade_partition = "os-image",
+ .last_sysupgrade_partition = "file-system",
+ },
+
/** Firmware layout for the C5 */
{
.id = "ARCHER-C5-V2",
@@ -1835,6 +1871,7 @@ static void build_image(const char *output,
strcasecmp(info->id, "ARCHER-C25-V1") == 0 ||
strcasecmp(info->id, "ARCHER-C59-V2") == 0 ||
strcasecmp(info->id, "ARCHER-C60-V2") == 0 ||
+ strcasecmp(info->id, "ARCHER-C60-V3") == 0 ||
strcasecmp(info->id, "TLWR1043NV5") == 0) {
const char mdat[11] = {0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00};
parts[5] = put_data("extra-para", mdat, 11);