aboutsummaryrefslogtreecommitdiffstats
path: root/tools/firmware-utils/src/tplink-safeloader.c
Commit message (Collapse)AuthorAgeFilesLines
...
* ath79: add support for TP-Link RE350K v1Piotr Dymacz2019-03-111-0/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | TP-Link RE350K v1 (FCC ID: TE7RE350K) is a wall-plug AC1200 Wi-Fi range extender with 'Kasa Smart' support. Device is based on Qualcomm/Atheros QCA9558 + QCA9882 + AR8035 platform and is available only on US market. Specification: - 720/600/200 MHz (CPU/DDR/AHB) - 128 MB of RAM (DDR2) - 16 MB of flash (SPI NOR) - 1x 1 Gbps Ethernet (AR8035) - 2T2R 2.4 GHz (QCA9558), with ext. PA (SE2565T) and LNA (SKY65971-11) - 2T2R 5 GHz (QCA9882), with ext. PA (SE5003L1-R) and LNA (SKY65981-11) - 2x U.FL connector on PCB - 2x dual-band PCB antennas - 1x LED, 2x dual-color LED (all driven by GPIO) - 3x button (app config, led, reset) - 1x mechanical on/off slide switch - 1x UART (4-pin, 2.54 mm pitch) header on PCB - 1x JTAG (8-pin, 1.27 mm pitch) header on PCB Flash instruction: Use 'factory' image directly in vendor GUI (default IP: 192.168.0.254, default credentials: admin/admin). Warning: This device does not include any kind of recovery mechanism in U-Boot. Vendor firmware access: You can access vendor firmware over serial (RX line requires jumper resistor in R306 place, near XTAL) with: root/sohoadmin credentials. Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
* ath79: add support for TP-Link Archer C2 V3 (AC900)Skirmantas Lauzikas2019-01-271-0/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | This commit adds support for the TP-link Archer C2 V3 (AC900). Specifications: - CPU: QCA9563 750Mhz - Ram: 64MB (DDR2) - Flash: 8MB (SPI NOR) - Ethernet: 5x 10/100/1000 - Wifi: QCA9563 bgn + QCA9887 an+ac - 9x Leds, 2x buttons Flash instructions: Upload openwrt-ath79-generic-tplink_archer-c2-v3-squashfs-factory.bin via the router Web interface and flash as normal firmware update. Signed-off-by: Skirmantas Lauzikas <skirmantas.lauzikas@blackraven.lt> [reorder entries, fix trailing whitespace in dts, add firmware partition compatible string, remove led default off states, use default on state for system led, reuse tplink-safeloader-uimage image build recipe, squash with dynamic partitioning commit, reword commit message, add installation instructions] Signed-off-by: Jo-Philipp Wich <jo@mein.io>
* firmware-utils: tplink-safeloader: Fix for Archer C2 V3 image generationSkirmantas Lauzikas2019-01-271-1/+2
| | | | | | | | | | | Fix for factory image generation, so that stock firmware will accept the openwrt image. Ref: https://forum.openwrt.org/t/support-for-tp-link-archer-c2-v3/15617/17 Signed-off-by: Skirmantas Lauzikas <skirmantas.lauzikas@blackraven.lt> [reword commit message, use correct order for conditions, trim trailing whitespace] Signed-off-by: Jo-Philipp Wich <jo@mein.io>
* tools: tplink-safeloader: add C7v5 RU SupportMichael Gray2019-01-271-1/+2
| | | | | | The added entry originates from TP-Links latest Archer C7 v5 RU firmware. Signed-off-by: Michael Gray <michael.gray@lantisproject.com>
* ath79: add support for TP-Link Archer C6 v2Georgi Vlaev2018-12-311-0/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds support for TP-Link Archer C6 v2 (EU) Hardware specification: - SOC: Qualcomm QCA9563 @ 775MHz - Flash: GigaDevice GD25Q64CSIG (8MiB) - RAM: Zentel A3R1GE40JBF (128 MiB DDR2) - Ethernet: Qualcomm QCA8337N: 4x 1Gbps LAN + 1x 1Gbps WAN - Wireless: - 2.4GHz (bgn) QCA9563 integrated (3x3) - 5GHz (ac) Qualcomm QCA9886 (2x2) - Button: 1x power, 1x reset, 1x wps - LED: 6x LEDs: power, wlan2g, wlan5g, lan, wan, wps - UART: There's no UART header on the board Flash instructions: Upload openwrt-ath79-generic-tplink_archer-c6-v2-squashfs-factory.bin via the router Web interface. Flash instruction using tftp recovery: 1. Connect the computer to one of the LAN ports of the router 2. Set the computer IP to 192.168.0.66 3. Start a tftp server with the OpenWrt factory image in the tftp root directory renamed to ArcherC6v2_tp_recovery.bin. 4. Connect power cable to router, press and hold the reset button and turn the router on 5. Keep the reset button pressed until the WPS LED lights up 6. Wait ~150 seconds to complete flashing According to the GPL source the non-EU variant has different GPIOs assigned to some of the LEDs and buttons. The flash layout might be different as well. The wikidevi entry for Archer A6/C6 assumes they are identical. Signed-off-by: Georgi Vlaev <georgi.vlaev@gmail.com>
* ath79: add support for TP-Link Archer A7Karl-Felix Glatzer2018-12-171-1/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds support for TP-Link Archer A7 Specification: - SOC: QCA9563 - Flash: 16 MiB (SPI) - RAM: 128 MiB (DDR2) - Ethernet: 4x 1Gbps LAN + 1x 1Gbps WAN - Wireless: - 2.4GHz (bgn) SoC internal - 5GHz (ac) QCA988x - USB: 1x USB 2.0 port - Button: 1x power, 1x reset, 1x wps - LED: 10x LEDs - UART: holes in PCB - Vcc, GND, RX, TX from ethernet port side - 115200n8 Flash instructions: Upload openwrt-ath79-generic-tplink_archer-a7-v5-squashfs-factory.bin via the Webinterface. Flash instruction using tftp recovery: 1. Connect the computer to one of the LAN ports of the Archer A7 2. Set the computer IP to 192.168.0.66 3. Start a tftp server with the OpenWrt factory image in the tftp root directory renamed to ArcherC7v5_tp_recovery.bin 2. Connect power cable to Archer A7, press and hold the reset button and turn the router on 3. Keep the reset button pressed for ~5 seconds 4. Wait ~150 seconds to complete flashing Changes since first revision: - Flash instructions using stock image webinterface - Changed "Version 5" in model string to "v5" - Split DTS file in qca9563_tplink_archer-x7-v5.dtsi and qca9563_tplink_archer-a7-v5.dts - Firmware image is now build with dynamic partitioning - Default to ath10k-ct Changes since second revision: - Changed uboot@0 to uboot@20000 in DTS file - Fixed ordering issue in board led script - Specify firmware partition format in DTS file - Rebased Makefile device definition on common Device/tplink-safeloader-uimage definition - Merged switch section in network script (same configuration as tplink,tl-wdr3600 and tplink,tl-wdr4300) Signed-off-by: Karl-Felix Glatzer <karl.glatzer@gmx.de>
* tools: tplink-safeloader: add C7v5 EU SupportListDavid Bauer2018-11-231-1/+5
| | | | | | | | | | Currently flash from WebIF is broken for Archer C7 v5 EU models as their SupportList entries are missing. The added entries originate from TP-Links latest Archer C7 v5 EU firmware. Signed-off-by: David Bauer <mail@david-bauer.net>
* ar71xx: fix sysupgrade generation for some targetsKoen Vandeputte2018-10-291-12/+6
| | | | | | | | | | | | | | | | | These targets are already defined as having a dynamic partition but the safeloader was not adapted for them. This causes a build warning for the sysupgrade image being too big. Targets: - c58-v1 - c60-v1 - c60-v2 - TL-WR1043 v5 - TL-WR902AC v1 - TL-WR942N V1 Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
* ar71xx: switch more targets to dynamic partitioningKoen Vandeputte2018-10-291-30/+13
| | | | | | | | | | | | | Targets: - TP-LINK ER355 - TP-LINK C25 V1 - TP-LINK C59 V1 - TP-LINK C7 V4 - TP-LINK C7 V5 Fixes build issues seen due to the kernel being too big Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
* ar71xx: switch TP-Link RE450 v1 to dynamic partitioningRadek Dostál2018-10-291-7/+2
| | | | | | | | | | | | | | | | | As mentioned in commit 5f24933 recent changes on ar71xx (switch to 4.14, memory compaction, ...) cause an increase in kernel size, making it too big for RE450. RE450 images were not build due to the following error message: os-image partition too big (more than 1572864 bytes): Success Tested on RE450, device boots and was used to send this patch. Reported-by: Enrico Mioso <mrkiko.rs@gmail.com> Suggested-by: David Bauer <mail@david-bauer.net> Signed-off-by: Radek Dostál <rd@radekdostal.com> [rewrote commit msg keeping it tight + fixed SoB lines] Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
* ar71xx: add support for TP-LINK CPE510 V2.0Andrew Cameron2018-08-021-1/+11
| | | | | | | | Adds Support for the TP-LINK CPE510 V2.0 by TP-Link. The hardware is almost the same as the CPE510 V1.0 Follow the same processes as for the CPE510 V1.0 Signed-off-by: Andrew Cameron <apcameron@softhome.net>
* ar71xx: add support for TP-Link Archer C59 v2Keith Maika2018-07-301-0/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | TP-Link Archer C59v2 is a dual-band AC1350 router based on Qualcomm/Atheros QCA9561+QCA9886 chips. Specification: - 775/650/258 MHz (CPU/DDR/AHB) - 128 MB of RAM (DDR2) - 16 MB of FLASH (SPI NOR) - 3T3R 2.4 GHz - 2T2R 5 GHz - 5x 10/100 Mbps Ethernet - USB 2.0 port - UART header on PCB Flash instruction: - via web UI: 1. Download openwrt-ar71xx-generic-archer-c59-v2-squashfs-factory.bin 2. Login to router and open the Advanced tab 3. Navigate to System Tools -> Firmware Upgrade 4. Upload firmware using the Manual Upgrade form - via TFTP: 1. Set PC to fixed ip address 192.168.0.66 2. Download openwrt-ar71xx-generic-archer-c59-v2-squashfs-factory.bin 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. Signed-off-by: Keith Maika <keithm@aoeex.com>
* firmware-utils: tplink-safeloader: add calloc error handlingHyeonsik Song2018-07-041-0/+4
| | | | Signed-off-by: Hyeonsik Song <blogcin@naver.com>
* ath79: add support for TP-Link RE450 v2Peter Lundkvist2018-07-021-0/+40
| | | | | | | | | | | | | | | | | | | | | | | | TP-Link RE450 v2 is a dual band router/range-extender based on Qualcomm/Atheros QCA9563 + QCA9880. Specification: - 775 MHz CPU - 64 MB of RAM (DDR2) - 8 MB of FLASH (SPI NOR) - 3T3R 2.4 GHz - 3T3R 5 GHz - 1x 10/100/1000 Mbps Ethernet (AR8033 PHY) - 7x LED, 4x button - UART header on PCB (needs unmounted R64 & R69 0201 resistors/jumpers) Flash instruction: Apply factory image in OEM firmware web-gui. U-Boot does not seem to have any recovery functions, so debricking requires connection via UART. Signed-off-by: Peter Lundkvist <peter.lundkvist@gmail.com>
* firmware-utils: tplink-safeloader: switch tl-wr1043nd-v4 to dynamic partitionsLucian Cristian2018-06-271-7/+2
| | | | | | | Use the new dynamic partition split in tplink-safeloader so we no longer have to worry about kernel size increases. Signed-off-by: Lucian Cristian <lucian.cristian@gmail.com>
* firmware-utils: tplink-safeloader: switch RE350 to dynamic partitionsAlex Maclean2018-06-261-6/+2
| | | | | | | Use the new dynamic partition split in tplink-safeloader so we no longer have to worry about kernel size increases. Signed-off-by: Alex Maclean <monkeh@monkeh.net>
* firmware-utils: tplink-safeloader: add dynamic partitionsAlex Maclean2018-06-261-13/+58
| | | | | | | | | | | | | | | | | Add support to dynamically split the firmware partition into os-image and file-system partitions. This is done by replacing those entries in the partition table with a single unified firmware partition, which is then split according to actual kernel image size. The factory image will have the file-system partition aligned to a 64K erase block, but the sysupgrade image skips this and aligns only the JFFS2 EOF marker to squeeze out more space. This should prevent further creeping updates to the kernel partition size while maximizing space for the overlay filesystem on smaller devices. Signed-off-by: Alex Maclean <monkeh@monkeh.net>
* ar71xx: Add support for TP-Link CPE210 v2Adrian Schmutzler2018-06-231-0/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This PR adds support for a popular low-cost 2.4GHz N based AP Specifications: - SoC: Qualcomm Atheros QCA9533 (650MHz) - RAM: 64MB - Storage: 8 MB SPI NOR - Wireless: 2.4GHz N based built into SoC 2x2 - Ethernet: 1x 100/10 Mbps, integrated into SoC, 24V POE IN Installation: Flash factory image through stock firmware WEB UI or through TFTP To get to TFTP recovery just hold reset button while powering on for around 4-5 seconds and release. Rename factory image to recovery.bin Stock TFTP server IP:192.168.0.100 Stock device TFTP adress:192.168.0.254 Notes: TP-Link does not use bootstrap registers so without this patch reference clock detects as 40MHz while it is actually 25MHz. This is due to messed up bootstrap resistor configuration on the PCB. Provided GPL code just forces 25MHz reference clock. That causes booting with completely wrong clocks, for example, CPU tries to boot at 1040MHz while the stock is 650MHz. So this PR depends on PR #672 to remove 40MHz reference clock. Thanks to Sven Eckelmann <sven@narfation.org> for properly patching that. Signed-off-by: Robert Marko <robimarko@gmail.com> Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ar71xx: add support for TP-LINK Archer C7 v5Arvid E. Picciani2018-06-201-1/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | TP-Link Archer C7 v5 is a dual-band AC1750 router, based on Qualcomm/Atheros QCA9563+QCA9880. Specification: - 750/400/250 MHz (CPU/DDR/AHB - 128 MB of RAM (DDR2) - 16 MB of FLASH (SPI NOR) - 3T3R 2.4 GHz - 3T3R 5 GHz - 5x 10/100/1000 Mbps Ethernet - 10x LED, 2x button - UART header on PCB Flash instruction: 1. Upload lede-ar71xx-generic-archer-c7-v5-squashfs-factory.bin via Web interface Flash instruction using TFTP recovery: 1. Set PC to fixed ip address 192.168.0.66 2. Download lede-ar71xx-generic-archer-c7-v5-squashfs-factory.bin and rename it to ArcherC7v5_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. Signed-off-by: Arvid E. Picciani <aep@exys.org>
* ath79: add tl-wr1043nd-v4 support everything is workingLucian Cristian2018-06-181-2/+2
| | | | | | | tplink-safeloader: resize kernel partition kernel 4.14 is much bigger, resize the partition Signed-off-by: Lucian Cristian <lucian.cristian@gmail.com>
* ipq806x: increase kernel partition size for the TP-Link Archer C2600Stefan Lippers-Hollmann2018-05-221-2/+7
| | | | | | | | | | | | | | | | | | The default image does not fit 2 MB anymore, expand os-image partition to 4 MB. Upgrading works transparently via sysupgrade in both directions. Another option would have been to merge "os-image" and "rootfs" into a single "firmware" partition using MTD_SPLIT_TPLINK_FW, but just changing the sizes of the existing partitioning has been deemed safer and actually tested on an affected device; the maximum for rootfs changes from 27 MB to 25 MB. Run-tested on TP-Link Archer C2600. Signed-off-by: Joris de Vries <joris@apptrician.nl> [slh: extend comments and commit message, rename rootfs] Signed-off-by: Stefan Lippers-Hollmann <s.l-h@gmx.de>
* firmware-utils: tplink-safeloader: increase RE350 kernel sizeAlex Maclean2018-04-231-3/+3
| | | | | | | | 4.14 increased kernel size, so grow the kernel partition by 128K to compensate. Fixes FS#1479. Signed-off-by: Alex Maclean <monkeh@monkeh.net>
* ar71xx: increase kernel partition size for CPE/WBS 210/510Matthias Schiffer2018-04-101-8/+8
| | | | Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
* firmware-utils: tplink-safeloader: move CPE/WBS 210/510 version metainfo to ↵Matthias Schiffer2018-04-101-20/+20
| | | | | | | | | the end Having the metainfo between kernel and rootfs prevents us from resizing the kernel partition as necessary. Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
* ar71xx: add support for TP-Link Archer C60 v2Henryk Heisig2018-04-071-0/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | TP-Link Archer C60 v2 is a dual-band AC1350 router, based on Qualcomm/Atheros QCA9561 + QCA9886. 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 - 7x LED, 2x button - UART header on PCB Flash instruction (web): Download lede-ar71xx-generic-archer-c60-v2-squashfs-factory.bin and use OEM System Tools - Firmware Upgrade site. Flash instruction (recovery): 1. Set PC to fixed IP address 192.168.0.66 2. Download lede-ar71xx-generic-archer-c60-v2-squashfs-factory.bin 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 Flash instruction (under U-Boot, using UART): tftp 0x81000000 lede-ar71xx-...-sysupgrade.bin erase 0x9f030000 +$filesize cp.b $fileaddr 0x9f030000 $filesize reset Signed-off-by: Henryk Heisig <hyniu@o2.pl>
* firmware-utils: tplink-safeloader: compile as gnu99Alexander Couzens2018-03-151-4/+5
| | | | | | Also fix minor coding style issue and one redeclaration. Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
* firmware-utils: fix erroneous variable redeclarationJo-Philipp Wich2018-03-151-1/+0
| | | | | Fixes: 638e2193fe ("tplink-safeloader: add support to split & extract firmwares") Signed-off-by: Jo-Philipp Wich <jo@mein.io>
* tplink-safeloader: add support to convert factory into sysupgradeAlexander Couzens2018-03-151-3/+103
| | | | | | | | | | | | Those converted factory images can be used to regain the original tp-link firmware. Be aware of firmware upgrade which additional require changes of other partition than os-image (kernel) & file-system (rootfs). OEM factory images from tplink can change nearly all partitions. However using those images, OpenWrt's sysupgrade will only modify the partitions os-image and file-system. Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
* tplink-safeloader: add support to split & extract firmwaresAlexander Couzens2018-03-151-17/+263
| | | | | | | Split the oem firmware upgrade images into seperate files. Useful when analysing oem firmware files. Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
* ar71xx: add support for TP-Link RE355Henryk Heisig2018-02-131-0/+43
| | | | | | | | | | | | | | | | | | | | | | | | This device is identical as TP-Link RE450 RE355 is a dual-band AC1200 router, based on Qualcomm/Atheros QCA9558+QCA9880. Specification: 720/600/200 MHz (CPU/DDR/AHB) 64/128 MB of RAM (DDR2) 8 MB of FLASH (SPI NOR) 3T3R 2.4 GHz 3T3R 5 GHz 1x 10/100/1000 Mbps Ethernet 7x LED, 3x button UART header on PCB Flash instruction: Web: Download lede-ar71xx-generic-archer-c60-v2-squashfs-factory.bin and use OEM System Tools - Firmware Upgrade site. Signed-off-by: Henryk Heisig <hyniu@o2.pl>
* ar71xx: add support for TP-Link TL-WR1043N v5Tim Thorpe2017-11-141-1/+39
| | | | | | | | | | | | | | | | | | | | | TP-Link TL-WR1043N v5 appears to be identical to the TL-WR1043ND v4, except that the USB port has been removed and there is no longer a removable antenna option. The software is more in line with the Archer series in that it uses a nested bootloader scheme. Specifications: - QCA9563 at 775 MHz - 64 MB RAM - 16 MB flash - 3 (non-detachable) Antennas / 450 Mbit - 1x/4x WAN/LAN Gbps Ethernet (QCA8337) - reset and Wi-Fi buttons Signed-off-by: Tim Thorpe <tim@tfthorpe.net> Signed-off-by: Ludwig Thomeczek <ledesrc@wxorx.net>
* firmware-utils: tplink-safeloader: add more country codes for Archer C7 v4Dmitry Tunin2017-11-141-0/+7
| | | | | | | If codes do not match, it is impossible to flash from the stock firmware. Signed-off-by: Dmitry Tunin <hanipouspilot@gmail.com>
* ar71xx: increase kernel partition size for TP-Link RE450 v1Piotr Dymacz2017-11-141-2/+2
| | | | | | | | | | | This increases kernel partition size and fixes rootfs (file-system) partition size on TP-Link RE450 v1. Also, while we are at it, switch from statically defined kernel and rootfs partitions in kernel cmdline to "tplink-fw" mtd splitter. Fixes: FS#1072. Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
* ar71xx: increase kernel partition size for some TP-Link boardsHenryk Heisig2017-11-141-8/+8
| | | | | | | | | | | | | | This patch increases kernel partition size and re-enables image generation for below TP-Link boards: - archer-c58-v1 - archer-c60-v1 - tl-wr902ac-v1 - tl-wr942n-v1 Signed-off-by: Henryk Heisig <hyniu@o2.pl> [commit message and title reworded] Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
* ar71xx: add support for TP-LINK Archer C7 v4Felix Fietkau2017-10-191-0/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | TP-Link Archer C7 v4 is a dual-band AC1750 router, based on Qualcomm/Atheros QCA9561+QCA9888. Specification: - 775/650/258 MHz (CPU/DDR/AHB) - 128 MB of RAM (DDR2) - 16 MB of FLASH (SPI NOR) - 3T3R 2.4 GHz - 3T3R 5 GHz - 5x 10/100/1000 Mbps Ethernet - 7x LED, 2x button - UART header on PCB Flash instruction: 1. Upload lede-ar71xx-generic-archer-c7-v4-squashfs-factory.bin via Web interface Flash instruction using TFTP recovery: 1. Set PC to fixed ip address 192.168.0.66 2. Download lede-ar71xx-generic-archer-c7-v4-squashfs-factory.bin and rename it to ArcherC7v4_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. Flash instruction under U-Boot, using UART: 1. tftp 0x81000000 lede-ar71xx-...-sysupgrade.bin 2. erase 0x9f040000 +$filesize 3. cp.b $fileaddr 0x9f040000 $filesize 4. reset Signed-off-by: Felix Fietkau <nbd@nbd.name>
* firmware-utils: tplink-safeloader: add support for TP-Link RE350Alex Maclean2017-07-251-0/+41
| | | | Signed-off-by: Alex Maclean <monkeh@monkeh.net>
* firmware-utils: tplink-safeloader: add support for TL-WR902AC v1 USPiotr Dymacz2017-07-221-1/+2
| | | | Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
* firmware-utils: tplink-safeloader: fix Archer C60 factory imageHenryk Heisig2017-07-091-2/+0
| | | | | | | | This commit fixes build factory image for TP-Link Archer C60v1. Size of partition "SupportList" is only 256 bytes, and can contain only 3 entries. Signed-off-by: Henryk Heisig <hyniu@o2.pl>
* ar71xx: add support for TP-Link TL-WR902AC v1Piotr Dymacz2017-07-041-0/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | TP-Link TL-WR902AC v1 is a pocket-size, dual-band (AC750), successor of TL-MR3020 (both devices use very similar enclosure, in same size). New device is based on Qualcomm QCA9531 v2 + QCA9887. FCC ID: TE7WR902AC. Specification: - 650/391/216 MHz (CPU/DDR/AHB) - 1x 10/100 Mbps Ethernet - 1x USB 2.0 (GPIO-controlled power) - 64 MB of RAM (DDR2) - 8 MB of FLASH - 2T2R 2.4 GHz (QCA9531) - 1T1R 5 GHz (QCA9887) - 5x LED (GPIO-controlled), 2x button, 1x 3-pos switch - UART pads on PCB (TP1 -> TX, TP2 -> RX, TP3 -> GND, TP4 -> 3V3, jumper resitors are missing on TX/RX lines) - 1x micro USB (for power only) Flash instructions: Use "factory" image under vendor GUI. Recovery instructions: This device contains tftp recovery mode inside U-Boot. You can use it to flash LEDE (use "factory" image) or vendor firmware. 1. Configure PC with static IP 192.168.0.66/24 and tftp server. 2. Rename "lede-ar71xx-generic-tl-wr902ac-v1-squashfs-factory.bin" to "wr902acv1_un_tp_recovery.bin" and place it in tftp server dir. 3. Connect PC with LAN port, press the reset button, power up the router and keep button pressed until WPS LED lights up. 4. Router will download file from server, write it to flash and reboot. Root access over serial line in vendor firmware: root/sohoadmin. Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
* ar71xx: add support for TP-Link Archer C58 v1Henryk Heisig2017-06-291-0/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | TP-Link Archer C58 v1 is a dual-band AC1350 router, based on Qualcomm QCA9561 + QCA9886. It looks like Archer C59 v1 without USB port. 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, 3x button - UART header on PCB, RX, TX at TP4+5 (backside) QCA9886 wlan needs pre_cal_data file and enable ieee80211 phy hotplug to patch macaddress. Flash instruction: Use "factory" image directly in vendor GUI. Recovery method: 1. Set PC to fixed ip address 192.168.0.66/24. 2. Download "lede-ar71xx-generic-archer-c58-v1-squashfs-factory.bin" 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. Flash instruction under U-Boot, using UART: tftp 0x81000000 lede-ar71xx-...-sysupgrade.bin erase 0x9f020000 +$filesize cp.b $fileaddr 0x9f020000 $filesize reset This commit is based on GitHub PR#1112 Signed-off-by: Henryk Heisig <hyniu@o2.pl>
* firmware-utils: tplink-safeloader: add support for Archer C5 v2 JP/USJean-Pierre St-Yves2017-06-291-3/+3
| | | | | | Add support for Japan and US versions of TP-Link Archer C5 v2 Signed-off-by: Jean-Pierre St-Yves <jpstyves@gmail.com>
* firmware-utils: tplink-safeloader: add support for Archer C59/C60 RUHenryk Heisig2017-06-291-0/+3
| | | | | | Add support for Russian version of TP-Link Archer C59/C60 v1 Signed-off-by: Henryk Heisig <hyniu@o2.pl>
* ar71xx: add support for TP-Link TL-WA855RE v1Federico Cappon2017-06-291-0/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | TP-Link TL-WA855RE v1 is a wall-plug N300 Wi-Fi range extender, based on Qualcomm/Atheros QCA9533 v2. Short specification: - 550/397/198 MHz (CPU/DDR/AHB) - 1x 10/100 Mbps Ethernet - 32 MB of RAM (DDR1) - 4 MB of FLASH - 2T2R 2.4 GHz - 2x external antennas - 2x LED (green and orange in the same package), 2x button - UART: TP5(TX) and TP4(RX) test points on PCB Flash instruction: use "factory" image directly in vendor GUI. Warning: this device does not include any kind of recovery mechanism in the bootloader and disassembling process is not trivial. You can access vendor firmware over serial line using: - login: root - password: sohoadmin Image was tested only in EU version of the device, but should work also with the same device version sold in other countries. Signed-off-by: Federico Cappon <dududede371@gmail.com>
* firmware-utils: honor env SOURCE_DATE_EPOCHAlexander Couzens2017-06-191-1/+18
| | | | | | | | Use the timestamp from the enviroment SOURCE_DATE_EPOCH if set instead of the build time. Fixes reproducible builds for certain firmware images. Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
* firmware-utils: tplink-safeloader: add TP-Link Archer C25 v1Ludwig Thomeczek2017-06-111-1/+58
| | | | | | | | | This adds the necessary firmware layout definitions for the Archer C25. It has an addtional partition containing some static data ("extra-para") without which no factory flash is possible, therefore put_data() has been added. Signed-off-by: Ludwig Thomeczek <ledesrc@wxorx.net>
* ar71xx: add support for TP-Link TL-WR942N v1Serg Studzinskii2017-06-111-0/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | TP-Link TL-WR942N v1 is a 2.4 GHz single-band N450 router, based on Qualcomm/Atheros QCA9561. Specification: - 775/650/258 MHz (CPU/DDR/AHB) - 128 MB of RAM (DDR2) - 16 MB of FLASH (SPI NOR) - 3T3R 2.4 GHz - 5x 10/100 Mbps Ethernet - 2x USB 2.0 - 11x LED (most are controlled by 74HC595) - 2x button - UART header on PCB* * Serial console is disabled in OEM non-beta firmwares and corresponding GPIO pins 14 and 15 are assigned to control USB1 and USB2 LEDs by production (non-beta) U-Boot and firmware. Currently not working: 1. USB1 and USB2 LEDs if UART RX and TX pins are assigned to their GPIOs by some U-Boot versions. Flash instruction under vendor GUI: 1. Download "lede-ar71xx-generic-tl-wr942n-v1-squashfs-factory.bin". 2. Go to WEB interface and perform usual firmware upgrade. FLash instruction under U-Boot recovery mode (doesn't work in beta firmware): 1. Setup PC with static IP "192.168.0.66/24" and tftp server. 2. Change "*-factory" image filename to "WR942v1_recovery.bin" and make it available to download from your tftp server. 3. Press "reset" button and power up the router, wait till "WPS" LED turns on. Flash instruction under U-Boot, using UART (can be done only with preinstalled UART-enabled U-Boot version!): 1. Use "tpl" to stop autobooting and obtain U-Boot CLI access. 2. Setup ip addresses for U-Boot and your tftp server. 3. Issue below commands: tftp 0x81000000 lede-ar71xx-generic-tl-wr942n-v1-sysupgrade.bin erase 0x9f020000 +$filesize cp.b 0x81000000 0x9f020000 $filesize reset Signed-off-by: Serg Studzinskii <serguzhg@gmail.com> [minor code style fixes, extended commit message] Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
* firmware-utils: tplink-safeloader: support strings as soft_versionJan Niehusmann2017-06-111-1/+36
| | | | | | | | | | | | | | | | | | | | | Some TP-Link routers (C25, C59, C60) contain a version string instead of a binary structure in the soft_version partition. Flashing LEDE from the original firmware's GUI, this version string taken from the soft_ver partition of the firmware image is written to the router's config partition. When using tftp recovery to go back to the original Archer C25 firmware, a version check compares that version to the version of the firmware to be flashed. Without proper contents in the config partition, reverting to the original firmware fails. Therefore, write the string "soft_ver:1.0.0\n" to that soft_ver partition. Signed-off-by: Jan Niehusmann <jan@gondor.com>
* firmware-utils: tplink-safeloader: add support for Archer C5 V2Rafał Miłecki2017-03-111-0/+34
| | | | Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
* ar71xx: add support for TP-Link TL-WA850RE v2Piotr Dymacz2017-02-141-0/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | TP-Link TL-WA850RE v2 is a wall-plug N300 Wi-Fi range extender, based on Qualcomm/Atheros QCA9533 v2. Short specification: - 550/391/195 MHz (CPU/DDR/AHB) - 1x 10/100 Mbps Ethernet - 32 MB of RAM (DDR1) - 4 MB of FLASH - 2T2R 2.4 GHz - 2x internal antennas (embedded on PCB) - 9x LED (all can be turned off with GPIO15), 2x button - UART (J3) header on PCB Flash instruction: use "factory" image directly in vendor GUI. Warning: this device does not include any kind of recovery mechanism in the bootloader and disassembling process is not trivial. You can access vendor firmware over serial line using: - login: root - password: sohoadmin Image was tested only in US version of the device, but should work also with the same device version sold in other countries. Available FLASH space, with LEDE trunk, is only 240 KB. Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
* ar71xx: add support to TP-Link Archer C59v1 and C60v1Henryk Heisig2017-01-261-0/+71
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | TP-Link Archer C59v1 is a dual-band AC1350 router, based on Qualcomm/Atheros QCA9561+QCA9886. Specification: - 775/650/258 MHz (CPU/DDR/AHB) - 128 MB of RAM (DDR2) - 16 MB of FLASH (SPI NOR) - 3T3R 2.4 GHz - 2T2R 5 GHz - 5x 10/100 Mbps Ethernet - USB 2.0 port - 8x LED (controled by 74HC595), 3x button - UART header on PCB TP-Link Archer C60v1 is a dual-band AC1350 router, based on Qualcomm/Atheros QCA9561+QCA9886. 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 - 7x LED, 2x button - UART header on PCB Currently not working: - Port LAN1 on C59, LAN4 on C60 - WiFi 5GHz (missing ath10k firmware for QCA9886 chip) - Update from oficial web interface ( tplink-saveloader not support "product-info") Flash instruction: 1. Set PC to fixed ip address 192.168.0.66 2. Download lede-ar71xx-generic-archer-cXX-v1-squashfs-factory.bin 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. Flash instruction under U-Boot, using UART: 1. tftp 0x81000000 lede-ar71xx-...-sysupgrade.bin 2. erase 0x9f020000 +$filesize 3. cp.b $fileaddr 0x9f020000 $filesize 4. reset Signed-off-by: Henryk Heisig <hyniu@o2.pl> [Jo-Philipp Wich: remove duplicate ATH79_MACH_ARCHER_C59/C60_V1 entries] Signed-off-by: Jo-Philipp Wich <jo@mein.io>