0052-ar71xx-add-support-for-TP-Link-Archer-C58-v1.patch 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411
  1. From: Henryk Heisig <hyniu@o2.pl>
  2. Date: Fri, 16 Jun 2017 15:26:30 +0200
  3. Subject: ar71xx: add support for TP-Link Archer C58 v1
  4. TP-Link Archer C58 v1 is a dual-band AC1350 router, based on Qualcomm
  5. QCA9561 + QCA9886. It looks like Archer C59 v1 without USB port.
  6. Specification:
  7. - 775/650/258 MHz (CPU/DDR/AHB)
  8. - 64 MB of RAM (DDR2)
  9. - 8 MB of FLASH (SPI NOR)
  10. - 3T3R 2.4 GHz
  11. - 2T2R 5 GHz
  12. - 5x 10/100 Mbps Ethernet
  13. - 6x LED, 3x button
  14. - UART header on PCB, RX, TX at TP4+5 (backside)
  15. QCA9886 wlan needs pre_cal_data file and enable ieee80211 phy hotplug to
  16. patch macaddress.
  17. Flash instruction:
  18. Use "factory" image directly in vendor GUI.
  19. Recovery method:
  20. 1. Set PC to fixed ip address 192.168.0.66/24.
  21. 2. Download "lede-ar71xx-generic-archer-c58-v1-squashfs-factory.bin" and
  22. rename it to "tp_recovery.bin".
  23. 3. Start a tftp server with the file "tp_recovery.bin" in its root
  24. directory.
  25. 4. Turn off the router.
  26. 5. Press and hold Reset button.
  27. 6. Turn on router with the reset button pressed and wait ~15 seconds.
  28. 7. Release the reset button and after a short time the firmware should
  29. be transferred from the tftp server.
  30. 8. Wait ~30 second to complete recovery.
  31. Flash instruction under U-Boot, using UART:
  32. tftp 0x81000000 lede-ar71xx-...-sysupgrade.bin
  33. erase 0x9f020000 +$filesize
  34. cp.b $fileaddr 0x9f020000 $filesize
  35. reset
  36. This commit is based on GitHub PR#1112
  37. Signed-off-by: Henryk Heisig <hyniu@o2.pl>
  38. diff --git a/target/linux/ar71xx/base-files/etc/board.d/01_leds b/target/linux/ar71xx/base-files/etc/board.d/01_leds
  39. index 5c6b47d0249c979934d61078e16759fc22aa41c7..f9483e9a706fbd98ce6a42e968bc0d31e9da5c84 100755
  40. --- a/target/linux/ar71xx/base-files/etc/board.d/01_leds
  41. +++ b/target/linux/ar71xx/base-files/etc/board.d/01_leds
  42. @@ -62,6 +62,7 @@ archer-c25-v1)
  43. ucidef_set_led_switch "lan3" "LAN3" "$board:green:lan3" "switch0" "0x04"
  44. ucidef_set_led_switch "lan4" "LAN4" "$board:green:lan4" "switch0" "0x02"
  45. ;;
  46. +archer-c58-v1|\
  47. archer-c59-v1|\
  48. archer-c60-v1)
  49. ucidef_set_led_switch "lan" "LAN" "$board:green:lan" "switch0" "0x1E"
  50. diff --git a/target/linux/ar71xx/base-files/etc/board.d/02_network b/target/linux/ar71xx/base-files/etc/board.d/02_network
  51. index 933ed22815ee076c98a83173aad143c010c9a131..57bc912aa5ede22a3fad4af6a1deb00c33f17cf8 100755
  52. --- a/target/linux/ar71xx/base-files/etc/board.d/02_network
  53. +++ b/target/linux/ar71xx/base-files/etc/board.d/02_network
  54. @@ -205,6 +205,7 @@ ar71xx_setup_interfaces()
  55. ucidef_add_switch "switch0" \
  56. "0@eth1" "2:lan" "3:lan" "4:lan" "5:lan" "6@eth0" "1:wan"
  57. ;;
  58. + archer-c58-v1|\
  59. archer-c59-v1|\
  60. rb-450g)
  61. ucidef_set_interfaces_lan_wan "eth1.1" "eth0"
  62. diff --git a/target/linux/ar71xx/base-files/etc/diag.sh b/target/linux/ar71xx/base-files/etc/diag.sh
  63. index 3aa1f054d4f791545a8b6644f7bd24f64ed546a3..382500b75ee6dc1fe1126fb3121f4ae205c901d4 100644
  64. --- a/target/linux/ar71xx/base-files/etc/diag.sh
  65. +++ b/target/linux/ar71xx/base-files/etc/diag.sh
  66. @@ -52,6 +52,7 @@ get_status_led() {
  67. ;;
  68. archer-c25-v1|\
  69. archer-c7-v4|\
  70. + archer-c58-v1|\
  71. archer-c59-v1|\
  72. archer-c60-v1|\
  73. mr12|\
  74. diff --git a/target/linux/ar71xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata b/target/linux/ar71xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
  75. index 5dd1d69e7e163c938759ce476846e4d985184b7b..538c86e4743109f7665096da32620d7862248aea 100644
  76. --- a/target/linux/ar71xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
  77. +++ b/target/linux/ar71xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
  78. @@ -134,6 +134,13 @@ case "$FIRMWARE" in
  79. ;;
  80. esac
  81. ;;
  82. +"ath10k/pre-cal-pci-0000:00:00.0.bin")
  83. + case $board in
  84. + archer-c58-v1)
  85. + ath10kcal_extract "art" 20480 12064
  86. + ;;
  87. + esac
  88. + ;;
  89. *)
  90. exit 1
  91. ;;
  92. diff --git a/target/linux/ar71xx/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac b/target/linux/ar71xx/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac
  93. new file mode 100644
  94. index 0000000000000000000000000000000000000000..7d2eca546d76b771b12026788510f73a293a9a93
  95. --- /dev/null
  96. +++ b/target/linux/ar71xx/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac
  97. @@ -0,0 +1,21 @@
  98. +#!/bin/ash
  99. +
  100. +[ "$ACTION" == "add" ] || exit 0
  101. +
  102. +PHYNBR=${DEVPATH##*/phy}
  103. +
  104. +[ -n $PHYNBR ] || exit 0
  105. +
  106. +. /lib/ar71xx.sh
  107. +. /lib/functions/system.sh
  108. +
  109. +board=$(ar71xx_board_name)
  110. +
  111. +case "$board" in
  112. + archer-c58-v1)
  113. + echo $(macaddr_add $(mtd_get_mac_binary mac 8) $(($PHYNBR - 1)) ) > /sys${DEVPATH}/macaddress
  114. + ;;
  115. + *)
  116. + ;;
  117. +esac
  118. +
  119. diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh
  120. index 780eda30d04b9bae0bf8dcf47a9cc49b19b810ca..a6cce7f42b43863f5bddade8ab6a0631c919beb1 100755
  121. --- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
  122. +++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
  123. @@ -469,6 +469,9 @@ ar71xx_board_detect() {
  124. *"Archer C7 v4")
  125. name="archer-c7-v4"
  126. ;;
  127. + *"Archer C58 v1")
  128. + name="archer-c58-v1"
  129. + ;;
  130. *"Archer C59 v1")
  131. name="archer-c59-v1"
  132. ;;
  133. diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
  134. index 31b293ca3c07d2f26ff96037fab5a51bbe9e834c..4a586ca523dcd65d0abbbab14e979f6f1bfee34e 100755
  135. --- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
  136. +++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
  137. @@ -208,6 +208,7 @@ platform_check_image() {
  138. ap90q|\
  139. archer-c25-v1|\
  140. archer-c7-v4|\
  141. + archer-c58-v1|\
  142. archer-c59-v1|\
  143. archer-c60-v1|\
  144. bullet-m|\
  145. diff --git a/target/linux/ar71xx/config-4.4 b/target/linux/ar71xx/config-4.4
  146. index 5b33d48e52309b807dbdf2697524809ad08072ae..396a4fa02adb37c6e5f9f7f1cc40fd1014361654 100644
  147. --- a/target/linux/ar71xx/config-4.4
  148. +++ b/target/linux/ar71xx/config-4.4
  149. @@ -52,6 +52,7 @@ CONFIG_ATH79_MACH_AP152=y
  150. CONFIG_ATH79_MACH_AP90Q=y
  151. CONFIG_ATH79_MACH_AP96=y
  152. CONFIG_ATH79_MACH_ARCHER_C25_V1=y
  153. +CONFIG_ATH79_MACH_ARCHER_C58_V1=y
  154. CONFIG_ATH79_MACH_ARCHER_C59_V1=y
  155. CONFIG_ATH79_MACH_ARCHER_C60_V1=y
  156. CONFIG_ATH79_MACH_ARCHER_C7=y
  157. diff --git a/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt b/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt
  158. index 468d9b333e43814cbadec8d85a20ab94e5cd6d01..4c9012acc6b4c40d88ffc8752086cac86b9b9c92 100644
  159. --- a/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt
  160. +++ b/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt
  161. @@ -1244,6 +1244,16 @@ config ATH79_MACH_ARCHER_C25_V1
  162. select ATH79_DEV_M25P80
  163. select ATH79_DEV_WMAC
  164. +config ATH79_MACH_ARCHER_C58_V1
  165. + bool "TP-LINK Archer C58 v1 support"
  166. + select SOC_QCA956X
  167. + select ATH79_DEV_AP9X_PCI if PCI
  168. + select ATH79_DEV_ETH
  169. + select ATH79_DEV_GPIO_BUTTONS
  170. + select ATH79_DEV_LEDS_GPIO
  171. + select ATH79_DEV_M25P80
  172. + select ATH79_DEV_WMAC
  173. +
  174. config ATH79_MACH_ARCHER_C59_V1
  175. bool "TP-LINK Archer C59 v1 support"
  176. select SOC_QCA956X
  177. diff --git a/target/linux/ar71xx/files/arch/mips/ath79/Makefile b/target/linux/ar71xx/files/arch/mips/ath79/Makefile
  178. index fbe7fcb0aebb6577b96c27088a158eb025f201cb..8408894669dc5f14f05701359073ef233a1b89f0 100644
  179. --- a/target/linux/ar71xx/files/arch/mips/ath79/Makefile
  180. +++ b/target/linux/ar71xx/files/arch/mips/ath79/Makefile
  181. @@ -57,6 +57,7 @@ obj-$(CONFIG_ATH79_MACH_AP152) += mach-ap152.o
  182. obj-$(CONFIG_ATH79_MACH_AP90Q) += mach-ap90q.o
  183. obj-$(CONFIG_ATH79_MACH_AP96) += mach-ap96.o
  184. obj-$(CONFIG_ATH79_MACH_ARCHER_C25_V1) += mach-archer-c25-v1.o
  185. +obj-$(CONFIG_ATH79_MACH_ARCHER_C58_V1) += mach-archer-c59-v1.o
  186. obj-$(CONFIG_ATH79_MACH_ARCHER_C59_V1) += mach-archer-c59-v1.o
  187. obj-$(CONFIG_ATH79_MACH_ARCHER_C60_V1) += mach-archer-c60-v1.o
  188. obj-$(CONFIG_ATH79_MACH_ARCHER_C7) += mach-archer-c7.o
  189. diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-archer-c59-v1.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-archer-c59-v1.c
  190. index d55f9b9f75b38159ed7209aa5acd73ff31088b51..f385d4a5a3148b83ee01007145e0eda2c0ef670f 100644
  191. --- a/target/linux/ar71xx/files/arch/mips/ath79/mach-archer-c59-v1.c
  192. +++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-archer-c59-v1.c
  193. @@ -1,7 +1,7 @@
  194. /*
  195. - * TP-Link Archer C59 v1 board support
  196. + * TP-Link Archer C58/C59 v1 board support
  197. *
  198. - * Copyright (C) 2016 Henryk Heisig <hyniu@o2.pl>
  199. + * Copyright (C) 2017 Henryk Heisig <hyniu@o2.pl>
  200. *
  201. * This program is free software; you can redistribute it and/or modify it
  202. * under the terms of the GNU General Public License version 2 as published
  203. @@ -65,6 +65,44 @@
  204. #define ARCHER_C59_V1_WMAC_CALDATA_OFFSET 0x1000
  205. #define ARCHER_C59_V1_PCI_CALDATA_OFFSET 0x5000
  206. +static struct gpio_led archer_c58_v1_leds_gpio[] __initdata = {
  207. + {
  208. + .name = "archer-c58-v1:green:power",
  209. + .gpio = ARCHER_C59_74HC_GPIO_LED_POWER,
  210. + .active_low = 1,
  211. + },
  212. + {
  213. + .name = "archer-c58-v1:green:wlan2g",
  214. + .gpio = ARCHER_C59_74HC_GPIO_LED_WLAN2,
  215. + .active_low = 1,
  216. + },
  217. + {
  218. + .name = "archer-c58-v1:green:wlan5g",
  219. + .gpio = ARCHER_C59_74HC_GPIO_LED_WLAN5,
  220. + .active_low = 1,
  221. + },
  222. + {
  223. + .name = "archer-c58-v1:green:lan",
  224. + .gpio = ARCHER_C59_74HC_GPIO_LED_LAN,
  225. + .active_low = 1,
  226. + },
  227. + {
  228. + .name = "archer-c58-v1:green:wan",
  229. + .gpio = ARCHER_C59_74HC_GPIO_LED_WAN_GREEN,
  230. + .active_low = 1,
  231. + },
  232. + {
  233. + .name = "archer-c58-v1:amber:wan",
  234. + .gpio = ARCHER_C59_74HC_GPIO_LED_WAN_AMBER,
  235. + .active_low = 1,
  236. + },
  237. + {
  238. + .name = "archer-c58-v1:green:wps",
  239. + .gpio = ARCHER_C59_74HC_GPIO_LED_WPS,
  240. + .active_low = 1,
  241. + },
  242. +};
  243. +
  244. static struct gpio_led archer_c59_v1_leds_gpio[] __initdata = {
  245. {
  246. .name = "archer-c59-v1:green:power",
  247. @@ -177,7 +215,7 @@ static struct spi_board_info archer_c59_v1_spi_info[] = {
  248. },
  249. };
  250. -static void __init archer_c59_v1_setup(void)
  251. +static void __init archer_c5x_v1_setup(void)
  252. {
  253. u8 *mac = (u8 *) KSEG1ADDR(0x1f010008);
  254. u8 *art = (u8 *) KSEG1ADDR(0x1fff0000);
  255. @@ -187,9 +225,6 @@ static void __init archer_c59_v1_setup(void)
  256. ARRAY_SIZE(archer_c59_v1_spi_info));
  257. platform_device_register(&archer_c59_v1_spi_device);
  258. - ath79_register_leds_gpio(-1, ARRAY_SIZE(archer_c59_v1_leds_gpio),
  259. - archer_c59_v1_leds_gpio);
  260. -
  261. ath79_register_gpio_keys_polled(-1, ARCHER_C59_V1_KEYS_POLL_INTERVAL,
  262. ARRAY_SIZE(archer_c59_v1_gpio_keys),
  263. archer_c59_v1_gpio_keys);
  264. @@ -233,5 +268,22 @@ static void __init archer_c59_v1_setup(void)
  265. "LED reset");
  266. }
  267. +static void __init archer_c58_v1_setup(void)
  268. +{
  269. + archer_c5x_v1_setup();
  270. + ath79_register_leds_gpio(-1, ARRAY_SIZE(archer_c58_v1_leds_gpio),
  271. + archer_c58_v1_leds_gpio);
  272. +}
  273. +
  274. +MIPS_MACHINE(ATH79_MACH_ARCHER_C58_V1, "ARCHER-C58-V1",
  275. + "TP-LINK Archer C58 v1", archer_c58_v1_setup);
  276. +
  277. +static void __init archer_c59_v1_setup(void)
  278. +{
  279. + archer_c5x_v1_setup();
  280. + ath79_register_leds_gpio(-1, ARRAY_SIZE(archer_c59_v1_leds_gpio),
  281. + archer_c59_v1_leds_gpio);
  282. +}
  283. +
  284. MIPS_MACHINE(ATH79_MACH_ARCHER_C59_V1, "ARCHER-C59-V1",
  285. "TP-LINK Archer C59 v1", archer_c59_v1_setup);
  286. diff --git a/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h b/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h
  287. index 9fbf354e44992f4dff43df0fb0ea99c344801d97..72c1e38c74707aba8fbd3aebc36f35becabd4987 100644
  288. --- a/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h
  289. +++ b/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h
  290. @@ -42,6 +42,7 @@ enum ath79_mach_type {
  291. ATH79_MACH_AP96, /* Atheros AP96 */
  292. ATH79_MACH_ARCHER_C25_V1, /* TP-LINK Archer C25 V1 board */
  293. ATH79_MACH_ARCHER_C5, /* TP-LINK Archer C5 board */
  294. + ATH79_MACH_ARCHER_C58_V1, /* TP-LINK Archer C58 V1 board */
  295. ATH79_MACH_ARCHER_C59_V1, /* TP-LINK Archer C59 V1 board */
  296. ATH79_MACH_ARCHER_C60_V1, /* TP-LINK Archer C60 V1 board */
  297. ATH79_MACH_ARCHER_C7, /* TP-LINK Archer C7 board */
  298. diff --git a/target/linux/ar71xx/image/tp-link.mk b/target/linux/ar71xx/image/tp-link.mk
  299. index 9e4aa8ea30aedba8050a77ebdcfc8f0034cc14d1..557bcdab2237a03957313cc3cda471a9fe3a3706 100644
  300. --- a/target/linux/ar71xx/image/tp-link.mk
  301. +++ b/target/linux/ar71xx/image/tp-link.mk
  302. @@ -119,6 +119,21 @@ define Device/archer-c25-v1
  303. endef
  304. TARGET_DEVICES += archer-c25-v1
  305. +define Device/archer-c58-v1
  306. + DEVICE_TITLE := TP-LINK Archer C58 v1
  307. + DEVICE_PACKAGES := kmod-ath10k
  308. + BOARDNAME := ARCHER-C58-V1
  309. + TPLINK_BOARD_NAME := ARCHER-C58-V1
  310. + DEVICE_PROFILE := ARCHERC58V1
  311. + IMAGE_SIZE := 7936k
  312. + KERNEL := kernel-bin | patch-cmdline | lzma | uImageArcher lzma
  313. + IMAGES := sysupgrade.bin factory.bin
  314. + IMAGE/sysupgrade.bin := append-rootfs | tplink-safeloader sysupgrade
  315. + IMAGE/factory.bin := append-rootfs | tplink-safeloader factory
  316. + MTDPARTS := spi0.0:64k(u-boot)ro,64k(mac)ro,1344k(kernel),6592k(rootfs),64k(tplink)ro,64k(art)ro,7936k@0x20000(firmware)
  317. +endef
  318. +TARGET_DEVICES += archer-c58-v1
  319. +
  320. define Device/archer-c59-v1
  321. DEVICE_TITLE := TP-LINK Archer C59 v1
  322. DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport kmod-ath10k
  323. diff --git a/target/linux/ar71xx/mikrotik/config-default b/target/linux/ar71xx/mikrotik/config-default
  324. index 3f6884dcf44c83f9867e4e9936caa79c0abc5dc1..23e862762600f0724a37fe1a390d4d09639c472c 100644
  325. --- a/target/linux/ar71xx/mikrotik/config-default
  326. +++ b/target/linux/ar71xx/mikrotik/config-default
  327. @@ -17,6 +17,7 @@
  328. # CONFIG_ATH79_MACH_AP90Q is not set
  329. # CONFIG_ATH79_MACH_AP96 is not set
  330. # CONFIG_ATH79_MACH_ARCHER_C25_V1 is not set
  331. +# CONFIG_ATH79_MACH_ARCHER_C58_V1 is not set
  332. # CONFIG_ATH79_MACH_ARCHER_C59_V1 is not set
  333. # CONFIG_ATH79_MACH_ARCHER_C60_V1 is not set
  334. # CONFIG_ATH79_MACH_ARCHER_C7 is not set
  335. diff --git a/target/linux/ar71xx/nand/config-default b/target/linux/ar71xx/nand/config-default
  336. index a50099aca12aafdcb27f4f2b77ca2a5ce4b4d6f2..c11ccfe29795d013776870cf21fb6ca8d907af1b 100644
  337. --- a/target/linux/ar71xx/nand/config-default
  338. +++ b/target/linux/ar71xx/nand/config-default
  339. @@ -10,6 +10,7 @@
  340. # CONFIG_ATH79_MACH_AP147 is not set
  341. # CONFIG_ATH79_MACH_AP96 is not set
  342. # CONFIG_ATH79_MACH_ARCHER_C25_V1 is not set
  343. +# CONFIG_ATH79_MACH_ARCHER_C58_V1 is not set
  344. # CONFIG_ATH79_MACH_ARCHER_C59_V1 is not set
  345. # CONFIG_ATH79_MACH_ARCHER_C60_V1 is not set
  346. # CONFIG_ATH79_MACH_ARCHER_C7 is not set
  347. diff --git a/tools/firmware-utils/src/tplink-safeloader.c b/tools/firmware-utils/src/tplink-safeloader.c
  348. index aeebf8e0bbdc3ec53c42d5cc01a3ffe892b46804..67e2c4475bbd468bd20915767a481711ae872a3a 100644
  349. --- a/tools/firmware-utils/src/tplink-safeloader.c
  350. +++ b/tools/firmware-utils/src/tplink-safeloader.c
  351. @@ -376,6 +376,41 @@ static struct device_info boards[] = {
  352. .last_sysupgrade_partition = "file-system"
  353. },
  354. + /** Firmware layout for the C58v1 */
  355. + {
  356. + .id = "ARCHER-C58-V1",
  357. + .vendor = "",
  358. + .support_list =
  359. + "SupportList:\r\n"
  360. + "{product_name:Archer C58,product_ver:1.0.0,special_id:00000000}\r\n"
  361. + "{product_name:Archer C58,product_ver:1.0.0,special_id:45550000}\r\n"
  362. + "{product_name:Archer C58,product_ver:1.0.0,special_id:55530000}\r\n",
  363. + .support_trail = '\x00',
  364. + .soft_ver = "soft_ver:1.0.0\n",
  365. +
  366. + .partitions = {
  367. + {"fs-uboot", 0x00000, 0x10000},
  368. + {"default-mac", 0x10000, 0x00200},
  369. + {"pin", 0x10200, 0x00200},
  370. + {"product-info", 0x10400, 0x00100},
  371. + {"partition-table", 0x10500, 0x00800},
  372. + {"soft-version", 0x11300, 0x00200},
  373. + {"support-list", 0x11500, 0x00100},
  374. + {"device-id", 0x11600, 0x00100},
  375. + {"profile", 0x11700, 0x03900},
  376. + {"default-config", 0x15000, 0x04000},
  377. + {"user-config", 0x19000, 0x04000},
  378. + {"os-image", 0x20000, 0x150000},
  379. + {"file-system", 0x170000, 0x678000},
  380. + {"certyficate", 0x7e8000, 0x08000},
  381. + {"radio", 0x7f0000, 0x10000},
  382. + {NULL, 0, 0}
  383. + },
  384. +
  385. + .first_sysupgrade_partition = "os-image",
  386. + .last_sysupgrade_partition = "file-system",
  387. + },
  388. +
  389. /** Firmware layout for the C59v1 */
  390. {
  391. .id = "ARCHER-C59-V1",