aboutsummaryrefslogtreecommitdiffstats
path: root/tools/firmware-utils/src/tplink-safeloader.c
Commit message (Collapse)AuthorAgeFilesLines
* ath79: add support for TP-Link Archer C6 v2 (US) and A6 (US/TW)Anderson Vulczak2019-11-271-1/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch is based on #1689 and adds support for TP-Link Archer C6 v2 (US) and A6 (US/TW). The hardware is the same as EU and RU variant, except for GPIOs (LEDS/Buttons), flash(chip/partitions) and UART being available on the board. - SOC: Qualcomm QCA9563 @ 775MHz - Flash: GigaDevice GD25Q127CS1G (16MiB) - 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: 115200, 8n1 (header available on board) Known issues: - Wireless: 5GHz is known to have lower RSSI signal, it affects speed and range. Flash instructions: Upload openwrt-ath79-generic-tplink_archer-c6-v2-us-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 ArcherA6v2_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 Flash partitioning: I've followed #1689 for defining the partition layout for this patch. The partition named as "tplink" @ 0xfd0000 is marked as read only as it is where some config for stock firmware are stored. On stock firmware those stock partitions starts at 0xfd9400 however I had not been able to make it functional starting on the same address as on stock fw, so it has been partitioned following #1689 and not the stock partition layout for this specific partition. Due to that firmware/rootfs partition lenght is 0xf80000 and not 0xf89400 as stock. According to the GPL code, the EU/RU/JP variant does have different GPIO pins assignment to LEDs and buttons, also the flash memory layout is different. GPL Source Code: https://static.tp-link.com/resources/gpl/gpl-A6v2_us.tar.gz Signed-off-by: Anderson Vulczak <andi@andi.com.br> [wrap commit message, remove soft_ver change for C6 v2 EU, move LED aliases to DTS files, remove dts-v1 in DTSI, node/property reorder in DTSI] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* tplink-safeloader: shorten version number of TP-Link WBS210 v2Bernhard Geier2019-11-231-3/+3
| | | | | | | | | "2.0" instead of "2.00" is sufficient and more in line with the other definitions. Signed-off-by: Bernhard Geier <freifunk@geierb.de> [commit message/title adjustments] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ath79: add support for the TP-LINK WBS510 V1Andrew Cameron2019-11-221-1/+2
| | | | | | | | | | | | | | | | | | | | | | This adds support for a popular low-cost 5GHz N based AP Specifications: - SoC: Atheros AR9344 - RAM: 64MB - Storage: 8 MB SPI NOR - Wireless: 5GHz 300 Mbps, 2x RP-SMA connector, 27 dBm TX power - Ethernet: 1x 10/100 Mbps with 24V POE IN, 1x 10/100 Mbps 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 Signed-off-by: Andrew Cameron <apcameron@softhome.net>
* ath79: add support for the TP-LINK WBS510 V2Andrew Cameron2019-11-221-0/+33
| | | | | | | | | | | | | | | | | | | | | | This adds support for a popular low-cost 5GHz N based AP Specifications: - SoC: Atheros AR9344 - RAM: 64MB - Storage: 8 MB SPI NOR - Wireless: 5GHz 300 Mbps, 2x RP-SMA connector, 27 dBm TX power - Ethernet: 1x 10/100 Mbps with 24V POE IN, 1x 10/100 Mbps 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 Signed-off-by: Andrew Cameron <apcameron@softhome.net>
* ath79: add support for the TP-LINK CPE220 V3Andrew Cameron2019-11-061-0/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This 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: 2x 100/10 Mbps, integrated into SoC 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 This also applies some minor changes to the common DTSI: - use &wmac for label-mac-device, as this one is actually set up in common DTSI - move &eth0 to parent DTSI - fix several leading spaces, added/removed newlines Signed-off-by: Andrew Cameron <apcameron@softhome.net> [DTS style fixes/improvements, updated commit message/title] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ath79: add support for TP-Link WBS210 v2Bernhard Geier2019-11-031-0/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | TP-Link WBS210 v2 is an outdoor wireless CPE for 2.4 GHz with two Ethernet ports based on Atheros AR9344 The device is the same as TP-Link CPE220 v2, but with higher TX power (27 dBm instead of 12 dBm) and two antenna connectors instead of built-in antennas. Specifications: - SoC: Atheros AR9344 - RAM: 64MB - Storage: 8 MB SPI NOR - Wireless: 2.4GHz 300 Mbps, 2x RP-SMA connector, 27 dBm TX power - Ethernet: 1x 10/100 Mbps with 24V POE IN, 1x 10/100 Mbps 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 The TP-Link WBS devices use the same GPIOs as the CPE devices, except for the link4 LED. For this one, WBS devices use "2", while CPE devices use "16". (Tested on WBS210 v2) Signed-off-by: Bernhard Geier <freifunk@geierb.de> [added comment about GPIO] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ar71xx: improve support for TP-Link CPE510 v2Adrian Schmutzler2019-10-211-12/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes commit bae927c551fd ("ar71xx: add support for TP-LINK CPE510 V2.0") where the support for this device wasn't optimal. Device support for the CPE510v2 so far has been a hack to enable flashing with CPE510v1 images. Those even have different hardware (e.g. additional ethernet port). With this patch, we provide proper support for this device in ar71xx. 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 address: 192.168.0.254 Fixes: bae927c551fd ("ar71xx: add support for TP-LINK CPE510 V2.0") Signed-off-by: Andrew Cameron <apcameron@softhome.net> [Rebased onto revert commit, changed comments in mach-cpe510.c, changed commit title and description, fixed eth0 MAC address, removed eth1 initialization] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de> [squashed revert, added fixes tag] Signed-off-by: Petr Štetiar <ynezz@true.cz>
* tplink-safeloader: fix compilation warningsIlya Gordeev2019-10-191-12/+13
| | | | Signed-off-by: Ilya Gordeev <Mirraz@users.noreply.github.com>
* ath79: add support for TP-Link CPE220 v2Adrian Schmutzler2019-08-071-1/+41
| | | | | | | | | | | | | | | | | | | | | | | | | This seems to be identical to CPE210 v1 despite having removable antennas. Specifications: * SoC: Qualcomm Atheros AR9344 (560 MHz) * RAM: 64MB * Storage: 8 MB * Wireless: 2.4GHz N based built into SoC 2x2 * Ethernet: 2x 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 address:192.168.0.254 Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* tplink-safeloader: increase kernel partition for CPE/WBSx10v1Adrian Schmutzler2019-08-071-8/+8
| | | | | | | | | | | | | This is a preparation for ath79 support of the CPE210/CPE510 v1. Kernel size is chosen equal to the latest update for CPE610 v1. This also updates the partition size in ar71xx target, so code remains consistent if someone looks up the device. Since CPE210, CPE510, WBS210 and WBS510 (all v1) share the same partition layout definition, and are on deprecated target anyway, this changes them all at once. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ath79: add support for TP-Link CPE510-v2/v3Andrew Cameron2019-07-181-0/+85
| | | | | | | | | | | | | | | | | | | | | | | | | TP-Link CPE510-v2/v3 is an outdoor wireless CPE for 5 GHz with one Ethernet port based on Atheros AR9344 Specifications: - Based on the same underlying hardware as the TP-Link CPE510 - Power, LAN, and 4 green LEDs - 1 10/100Mbps Shielded Ethernet Port (Passive PoE in) - Built-in 13dBi 2x2 dual-polarized directional MIMO antenna - Adjustable transmission power from 0 to 23dBm/200mw Flashing instructions: 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 Signed-off-by: Andrew Cameron <apcameron@softhome.net> [whitespace fixes] Signed-off-by: Petr Štetiar <ynezz@true.cz>
* ramips: add support for TP-Link RE650 v1Georgi Vlaev2019-07-171-0/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | TP-Link RE650 v1 is a dual-band AC2600 range extender, based on MediaTek MT7621A and MT7615E. According to the wikidevi entry for RE650 this device is identical with TP-Link RE500 as hardware. This patch supports only RE650. Hardware specification: - SoC 880 MHz - MediaTek MT7621AT - 128 MB of DDR3 RAM - 16 MB - Winbond 25Q128FVSG - 4T4R 2.4 GHz - MediaTek MT7615E - 4T4R 5 GHz - MediaTek MT7615E - 1x 1 Gbps Ethernet - MT7621AT integrated - 7x LEDs (Power, 2G, 5G, WPS(x2), Lan(x2)) - 4x buttons (Reset, Power, WPS, LED) - UART header (J1) - 2:GND, 3:RX, 4:TX Serial console @ 57600,8n1 Flash instructions: Upload openwrt-ramips-mt7621-tplink_re650-v1-squashfs-factory.bin from the RE650 web interface. TFTP recovery to stock firmware: Unfortunately, I can't find an easy way to recover the RE without opening the device and using modified binaries. The TFTP upload will only work if selected from u-boot, which means you have to open the device and attach to the serial console. The TFTP update procedure does *not* accept the published vendor firmware binaries. However, it allows to flash kernel + rootfs binaries, and this works if you have a backup of the original contents of the flash. It's probably possible to create special image out of the vendor binaries and use that as recovery image. Signed-off-by: Georgi Vlaev <georgi.vlaev@gmail.com> [re-added variables for kernel header] Signed-off-by: David Bauer <mail@david-bauer.net>
* ath79: increase kernel partition size for CPE610v1Andrew Cameron2019-07-071-2/+2
| | | | | | | | | Increase the Kernel partition to address the issue discussed here https://forum.openwrt.org/t/cpe610-v1-sysupgrade-bin-missing-too-big/39637/5 Switch Back to the okli Loader to support increased partition size Signed-off-by: Andrew Cameron <apcameron@softhome.net> Signed-off-by: Christian Lamparter <chunkeey@gmail.com> [add <> for e-mail]
* ath79: add support for TP-Link CPE610-v1Andrew Cameron2019-06-241-0/+39
| | | | | | | | | | | | | | | | | | | | | TP-Link CPE610-v1 is an outdoor wireless CPE for 5 GHz with one Ethernet port based on Atheros AR9344 Specifications: - Based on the same underlying hardware as the TP-Link CPE510 - Power, LAN, WLAN5G green LEDs - 23dBi high-gain directional 2×2 MIMO antenna and a dedicated metal reflector Flashing instructions: 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 Signed-off-by: Andrew Cameron <apcameron@softhome.net>
* tools: tplink-safeloader: add C7v5 KR SupportMichael Gray2019-04-061-1/+2
| | | | | | The added entry originates from TP-Links latest Archer C7 v5 KR firmware. Signed-off-by: Michael Gray <michael.gray@lantisproject.com>
* ath79: Add support for TP-Link CPE210 v3Mario Schroen2019-04-021-0/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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 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 Thanks to robimarko for the work inside the ar71xx tree. Thanks to adrianschmutzler for deep discussion and fixes. Signed-off-by: Mario Schroen <m.schroen@web.de> [Split into DTS/DTSI, read-only config partition in DTSI] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de> [renamed dtsi filename, light subject touches] Signed-off-by: Petr Štetiar <ynezz@true.cz>
* ar71xx: Use dynamic partitions for TP-Link CPE210 v2Adrian Schmutzler2019-04-021-2/+1
| | | | | | | This is also helpful to add support in ath79. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de> Tested-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* 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>