aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ar71xx/base-files/lib
Commit message (Collapse)AuthorAgeFilesLines
* ar71xx: fix tl-wdr3320-v2 upgrade南浦月2019-11-121-1/+1
| | | | | | | | | | Fix the error that tl-wdr3320-v2 can't upgrade firmware via web interface by using magic_ver="0200" for this device. Signed-off-by: 南浦月 <nanpuyue@gmail.com> [commit message facelift] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de> (cherry picked from commit 0ff2385a92c0a31769fce954b7bd571d6114dbc8)
* ar71xx: improve support for TP-Link CPE510 v2Adrian Schmutzler2019-11-062-20/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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> (cherry picked from commit c79b796280fa5cd64bac663f9d5e5d9a737c30d6) [added CPE510V2 entry to tplink-safeloader.c] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ar71xx: add model detection for UniFi AC-LRAndreas Ziegler2019-10-271-0/+3
| | | | | | | | | | | | | | | | This commit adds correct model detection for UniFi AC-LR. Previously, said device was incorrectly detected as UniFi-AC-LITE/MESH. The Information about the device is stored at 0xC in the EEPROM partition. It corresponds to the sysid in /etc/board.info of the Ubiquiti stock firmware. Signed-off-by: Andreas Ziegler <dev@andreas-ziegler.de> [adjust naming style of target to existing ones] Signed-off-by: David Bauer <mail@david-bauer.net> (cherry picked from commit 2bc7c519dcc0e7ca09feed24a3b9a105bc49f423) Signed-off-by: David Bauer <mail@david-bauer.net>
* ar71xx: sysupgrade: accept ath79 combined-imageTomasz Maciej Nowak2019-09-291-1/+1
| | | | | | | | | | | There is md5 sum of whole image embedded in combined-image header which is checked on sysupgrade. The check will fail for ath79 images which may have embedded metadata. This is because metadata are appended after the combined image is created. To allow smooth transition from ar71xx to ath79, strip metadata before calculating md5 sum for whole image. Signed-off-by: Tomasz Maciej Nowak <tomek_n@o2.pl> (cherry picked from commit 8b4109c2b4d60495d046157d1baca9b1cdbf8dc8)
* ar71xx: fix typo in platform_do_upgrade_compex()Rafał Miłecki2019-09-161-1/+1
| | | | | | Fixes: a71742882855 ("treewide: use new procd sysupgrade $UPGRADE_BACKUP variable") Signed-off-by: Rafał Miłecki <rafal@milecki.pl> (cherry picked from commit 63d611390c4d34a838e744e278529f30f9d2cc20)
* treewide: sysupgrade: use $UPGRADE_BACKUP to check for backupRafał Miłecki2019-09-163-4/+4
| | | | | | | | Now that $UPGRADE_BACKUP is set conditionally there is no need to check the $UPGRADE_OPT_SAVE_CONFIG anymore. All conditions can be simplified. Signed-off-by: Rafał Miłecki <rafal@milecki.pl> (cherry picked from commit a858db313687ddfa6ed1ddba76bd74844a7b89dc)
* treewide: use new procd sysupgrade $UPGRADE_BACKUP variableRafał Miłecki2019-09-123-4/+4
| | | | | | | | | | | It's a variable set by procd that should replace hardcoded /tmp/sysupgrade.tgz. This change requires the most recent procd with the commit 0f3c136 ("sysupgrade: set UPGRADE_BACKUP env variable"). Signed-off-by: Rafał Miłecki <rafal@milecki.pl> (cherry picked from commit 641f6b6c26cb9ab5e1198810015e5f4b2b5b34ad)
* treewide: sysupgrade: don't use $ARGV in platform_do_upgrade()Rafał Miłecki2019-09-072-11/+11
| | | | | | | | | | stage2 passes image path to platform_do_upgrade() as an argument so it can be simply accessed using $1 Signed-off-by: Rafał Miłecki <rafal@milecki.pl> (cherry picked from commit 8b4bc7abe073489a3595eeb2d81818852319c148) [rmilecki: dropping ARGV without this change broke sysupgrade] Fixes: 6ac62c4b6cae ("base-files: don't set ARGV and ARGC")
* treewide: fix invalid UPGRADE_OPT_SAVE_CONFIG spellingsRafał Miłecki2019-09-063-4/+4
| | | | | | | | That was a result of accidentally running "sed" twice on some files. Fixes: 9b9412d55cca ("treewide: replace remaining (not working now) $SAVE_CONFIG uses") Signed-off-by: Rafał Miłecki <rafal@milecki.pl> (cherry picked from commit 1078de96e315f3cc2675b2c5935009e8c6159ad4)
* treewide: replace remaining (not working now) $SAVE_CONFIG usesRafał Miłecki2019-09-063-4/+4
| | | | | | | | This var has been replaced by the $UPGRADE_OPT_UPGRADE_OPT_SAVE_CONFIG Fixes: f25d164aca80 ("base-files: pass "save_config" option to the "sysupgrade" method") Signed-off-by: Rafał Miłecki <rafal@milecki.pl> (cherry picked from commit 5797fe84a3b508483f7d82e177157c1bf2f342d9)
* ar71xx: really fix Mikrotik board detectionKoen Vandeputte2019-08-011-0/+1
| | | | | | | | | | | | | | | | | | commit e09da0169a08 ("ar71xx: fix Mikrotik board detection") was generated based on testing a rb-912 board, on which detection failed. Testing on more hardware shows something fun: machine : MikroTik RouterBOARD 922UAGS-5HPacD machine : Mikrotik RouterBOARD 912UAG-5HPnD Both lowercase and uppercase are used. So ensure we support both now .. Fixes: e09da0169a08 ("ar71xx: fix Mikrotik board detection") Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com> (cherry picked from commit 845b2a1cfe307394f3f2144cce085bbb5e171ecc)
* ar71xx: fix Mikrotik board detectionKoen Vandeputte2019-07-291-1/+1
| | | | | | | | | | | Fix a typo in the machine type being extracted from /proc/cpuinfo which causes all Mikrotik board to be undetected properly. This lead to sysupgrade issues and probably some others too. Fixes: 76c963bb01fb ("ar71xx: base-files: fix board detect on new MikroTik devices") Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
* ar71xx: base-files: fix board detect on new MikroTik devicesHenryk Heisig2019-06-191-147/+165
| | | | | | | | | | | | | | | | | | | | Move all MikroTik devices to new function to increase script execution speed. Machine name in new version of MikroTik RouterBOARD devices add "RB" before model name: Old machine name: MikroTik RouterBOARD 951Ui-2nD New: MikroTik RouterBOARD RB951Ui-2nD So this patch should fix it for all currently supported MikroTik boards. Tested-by: Cezary Jackiewicz <cezary@eko.one.pl> [wAP R-2nD] Signed-off-by: Henryk Heisig <hyniu@o2.pl> [rebased,commit message facelift,script fixes] Signed-off-by: Petr Štetiar <ynezz@true.cz> [spotted missing 922UAGS-5HPacD] Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
* ar71xx: fix failsafe interface for TL-WR940nv6Joachim Fünfer2019-05-051-0/+1
| | | | | | | | Switches failsafe mode interface from WAN to LAN ports. Tested on TL-WR940Nv6.0 and TL-WR940Nv6.1 Signed-off-by: Joachim Fünfer <joachim.fuenfer@stusta.net>
* ar71xx: add support for Mikrotik RouterBOARD 2011UiAS-2HnD r2Koen Vandeputte2019-04-232-0/+5
| | | | | | This board got a new hardware revision, without any change in functionality. Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
* ar71xx: Add support for Ubiquity Bullet M (XW)Petr Štetiar2019-04-082-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | CPU: AR9342 SoC RAM: 64 MB DDR2 Flash: 8 MB NOR SPI Ports: 100 MBit (24V PoE in) WLAN: 2.4/5 GHz UART: 1 UART on PCB marked as J1 with 115200 8N1 config LEDs: Power, Ethernet, 4x RSSI LEDs (orange, red, 2x green) Buttons: Reset UART connection details .---------------------------------. | | [ETH] J1 [ANT] | o VCC o RX o TX o GND | `---------------------------------' Flashing instructions using recovery method over TFTP 1. Unplug the ethernet cable from the router. 2. Using paper clip press and hold the router's reset button. Make sure you can feel it depressed by the paper clip. Do not release the button until step 4. 3. While keeping the reset button pressed in, plug the ethernet cable back into the AP. Keep the reset button depressed until you see the device's LEDs flashing in upgrade mode (alternating LED1/LED3 and LED2/LED4), this may take up to 25 seconds. 4. You may release the reset button, now the device should be in TFTP transfer mode. 5. Set a static IP on your Computer's NIC. A static IP of 192.168.1.25/24 should work. 6. Plug the PoE injector's LAN cable directly to your computer. 7. Start tftp client and issue following commands: tftp> binary tftp> connect 192.168.1.20 tftp> put openwrt-ar71xx-generic-ubnt-bullet-m-xw-squashfs-factory.bin Tested only on Bullet M2HP. Signed-off-by: Petr Štetiar <ynezz@true.cz>
* ar71xx: Add support for TP-Link CPE210 v3Robert Marko2019-04-022-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | Looks identical to the v2. 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 Tested-by: Adrian Schmutzler <freifunk@adrianschmutzler.de> Signed-off-by: Robert Marko <robimarko@gmail.com> [Rebased, adjusted for separate tplink-safeloader entry, dynamic partitioning] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ar71xx: add support for MikroTik RouterBOARD 922UAGS-5HPacDKoen Vandeputte2019-03-262-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds support for the MikroTik RouterBOARD 922UAGS-5HPacD with a built-in 802.11ac High-Power radio (31dBm). See https://mikrotik.com/product/RB922UAGS-5HPacD for more info. Specifications: - SoC: Qualcomm Atheros QCA9557 (720 MHz) - RAM: 128 MB - Storage: 128 MB NAND - Wireless: external QCA9882 802.11a/ac 2x2:2 - Ethernet: 1x 1000/100/10 Mbps, integrated, via AR8031 PHY, passive PoE-in 24V - SFP: 1x host - USB: 1x 2.0 type A - PCIe: 1x Mini slot (also contains USB 2.0 for 3G/LTE modems) - SIM slot: 1x mini-SIM Working: - Board/system detection - NAND storage detection - PCIe - USB: Type A & mini PCIe - Wireless - Ethernet - LED's (excl. SFP and RSSI levels) - Reset button - Sysupgrade Not working: - SFP cage Installation: - Boot vmlinux-initramfs image via BOOTP/TFTP and then flash sysupgrade image using "sysupgrade -n" Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com> Signed-off-by: Roger Pueyo Centelles <roger.pueyo@guifi.net>
* ar71xx: Add support for Mikrotik RB SXT 2nD r3Xavier Douville2019-03-222-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The Mikrotik RouterBOARD SXT 2nD r3 is an outdoor WiFi AP / CPE with a single 2.4 GHz radio and a 100 Mbps Ethernet port. The device similar to the SXT 2nD r2, but it has SPI NOR flash instead of NAND flash. Hardware -------- CPU: Atheros AR9344 (600 MHz) RAM: 64 MiB FLASH: 16 MiB SPI NOR W25Q128 ETH: 1x 100 Mbps Atheros AG71xx WiFi: 2T2R 802.11b/g/n (ath9k) Power: Passive PoE 8-30 V Installation instructions: 1. Boot openwrt-ar71xx-mikrotik-vmlinux-initramfs.elf using a DHCP+TFTP server. 2. Erase the "firmware" partition using the mtd command. This should no longer be required once this patch is merged. 3. Use sysupgrade to install to flash. The file openwrt-ar71xx-mikrotik-rb-nor-flash-16M-squashfs-sysupgrade.bin should be used. Signed-off-by: Xavier Douville <github@douville.org>
* ar71xx: Speed up mtd extraction in ar71xx.shAdrian Schmutzler2019-03-131-2/+2
| | | | | | | | Although the amount of data read here is smaller than for the caldata, there still might be some speed gain compared to reading bytewise. And there is no harm ... Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ar71xx: fix RB941-2nD detectionJulien Rabier2019-02-081-1/+1
| | | | | | | | | | | | Some hAP lite routers aren't detected because /proc/cpuinfo shows "RouterBOARD RB941-2nD" instead of "RouterBOARD 941-2nD". Fix that. Signed-off-by: Julien Rabier <taziden@flexiden.org> [Alter string to include all flavours + slight rewrite of commit msg] Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
* ar71xx: add support for UniFi-AC-Mesh-ProChristoph Krapp2018-11-261-5/+12
| | | | | | | | | | | | | | | | This adds the build option for UniFi AC Mesh Pro as well as model detection for it. The device is a hardware clone of the AC Pro. - SoC: QCA9563-AL3A (775Mhz) - RAM: 128MiB - Flash: 16MiB - dual firmware partitions! - LAN: 2x 1000M - POE+ - Wireless: 2.4G: QCA9563 5G: UniFi Chip, QCA988X compatible Signed-off-by: Christoph Krapp <achterin@googlemail.com>
* ar71xx: add support for Gainstrong MiniBox V3.2Pau Escrich2018-11-152-0/+4
| | | | | | | | | | | | Adds MiniBox V3.2 ar71xx target (QCA99531 + QCA9887) Info: http://oolite.cn/minibox-v3-2-qca9531-qca9887-module-pin-specification.html Reference patch: http://oolite.cn/wp-content/uploads/2017/09/minibox_v3_cc15.05_20160325.patch Installation: Upload firmware to uboot via HTTP at 192.168.1.1 (press button for 5 seconds) Signed-off-by: Pau Escrich <p4u@dabax.net> Signed-off-by: Daniel Golle <daniel@makrotopia.org> (daniel@makrotopia.org: rebased and fixed conflicts, fixed LED name, added ath10k eeprom)
* ar71xx: Create /var/lock directory in platform_do_upgrade_*Sven Eckelmann2018-10-072-16/+3
| | | | | | | | | | | | | | | | | | The sysupgrade_pre_upgrade hook was removed with 5e1b4c57ded7 ("base-files: drop fwtool_pre_upgrade") while there were still scripts using it: * target/linux/ar71xx/base-files/lib/upgrade/allnet.sh * target/linux/ar71xx/base-files/lib/upgrade/openmesh.sh * target/linux/ipq40xx/base-files/lib/upgrade/openmesh.sh Not running the hooks can either prevent a successful upgrade or brick the device because the fw_setenv program cannot be started correctly. Instead of adding this hook again, the directory /var/lock for fw_setenv can also just be created directly before fw_setenv is called. Fixes: 5e1b4c57ded7 ("base-files: drop fwtool_pre_upgrade") Signed-off-by: Sven Eckelmann <sven.eckelmann@openmesh.com>
* ar71xx: Use sysupgrade's RAMFS_COPY_* for fw_(set|print)envSven Eckelmann2018-10-073-9/+6
| | | | | | | | | | | | The install_bin from /lib/upgrade/common.sh is no longer creating the symlinks when a secondary parameter is added. But the fw_setenv program was always copied this way to the ramdisk for the upgrade. Instead, this should be done using RAMFS_COPY_* like on all other platforms. Fixes: 438dcbfe74a6 ("base-files: automatically handle paths and symlinks for RAMFS_COPY_BIN") Signed-off-by: Sven Eckelmann <sven.eckelmann@openmesh.com>
* ar71xx: add support for TP-LINK CPE510 V2.0Andrew Cameron2018-08-022-2/+22
| | | | | | | | 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-302-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* ar71xx:add support for E750G v8张鹏2018-07-302-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Qxwlan E750G v8 is based on Qualcomm QCA9344. Specification: - 560/450/225 MHz (CPU/DDR/AHB) - 128 MB of RAM (DDR2) - 8/16 MB of FLASH (SPI NOR) - 2T2R 2.4G GHz (AR9344) - 2x 10/100 Mbps Ethernet (PoE support) - 2x 10/100/1000 Mbps Ethernet - 7x LED (6 driven by GPIO) - 1x button (reset) - 1x DC jack for main power input (9-48 V) - UART (J23) and LEDs (J2) headers on PCB Flash instruction (using U-Boot CLI and tftp server): - Configure PC with static IP 192.168.1.10 and tftp server. - Rename "sysupgrade" filename to "firmware.bin" and place it in tftp server directory. - Connect PC with one of RJ45 ports, power up the board and press "enter" key to access U-Boot CLI. - Use the following command to update the device to OpenWrt: "run lfw". Flash instruction (using U-Boot web-based recovery): - Configure PC with static IP 192.168.1.xxx(2-254)/24. - Connect PC with one of RJ45 ports, press the reset button, power up the board and keep button pressed for around 6-7 seconds, until LEDs start flashing. - Open your browser and enter 192.168.1.1, select "sysupgrade" image and click the upgrade button. Signed-off-by: 张鹏 <sd20@qxwlan.com>
* ar71xx:add support for E750A v4张鹏2018-07-302-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Qxwlan E750A v4 is based on Qualcomm QCA9344. Specification: - 560/450/225 MHz (CPU/DDR/AHB) - 128 MB of RAM (DDR2) - 8/16 MB of FLASH (SPI NOR) - 2T2R 5G GHz (AR9344) - 2x 10/100 Mbps Ethernet (one port with PoE support) - 1x miniPCIe slot (USB 2.0 bus only) - 7x LED (6 driven by GPIO) - 1x button (reset) - 1x DC jack for main power input (9-48 V) - UART (J23) and LEDs (J2) headers on PCB Flash instruction (using U-Boot CLI and tftp server): - Configure PC with static IP 192.168.1.10 and tftp server. - Rename "sysupgrade" filename to "firmware.bin" and place it in tftp server directory. - Connect PC with one of RJ45 ports, power up the board and press "enter" key to access U-Boot CLI. - Use the following command to update the device to OpenWrt: "run lfw". Flash instruction (using U-Boot web-based recovery): - Configure PC with static IP 192.168.1.xxx(2-254)/24. - Connect PC with one of RJ45 ports, press the reset button, power up the board and keep button pressed for around 6-7 seconds, until LEDs start flashing. - Open your browser and enter 192.168.1.1, select "sysupgrade" image and click the upgrade button. Signed-off-by: 张鹏 <sd20@qxwlan.com>
* ar71xx:add support for E558 v2张鹏2018-07-302-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Qxwlan E558 v2 is based on Qualcomm QCA9558 + AR8327. Specification: - 720/600/200 MHz (CPU/DDR/AHB) - 128 MB of RAM (DDR2) - 8/16 MB of FLASH (SPI NOR) - 2T2R 2.4 GHz (QCA9558) - 3x 10/100/1000 Mbps Ethernet (one port with PoE support) - 4x miniPCIe slot (USB 2.0 bus only) - 1x microSIM slot - 5x LED (4 driven by GPIO) - 1x button (reset) - 1x 3-pos switch - 1x DC jack for main power input (9-48 V) - UART (JP5) and LEDs (J8) headers on PCB Flash instruction (using U-Boot CLI and tftp server): - Configure PC with static IP 192.168.1.10 and tftp server. - Rename "sysupgrade" filename to "firmware.bin" and place it in tftp server directory. - Connect PC with one of RJ45 ports, power up the board and press "enter" key to access U-Boot CLI. - Use the following command to update the device to OpenWrt: "run lfw". Flash instruction (using U-Boot web-based recovery): - Configure PC with static IP 192.168.1.xxx(2-254)/24. - Connect PC with one of RJ45 ports, press the reset button, power up the board and keep button pressed for around 6-7 seconds, until LEDs start flashing. - Open your browser and enter 192.168.1.1, select "sysupgrade" image and click the upgrade button. Signed-off-by: 张鹏 <sd20@qxwlan.com>
* ar71xx: add support for MikroTik RB931-2nDThibaut VARÈNE2018-07-162-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds support for the MikroTik RB931-2nD (hAP mini): https://mikrotik.com/product/RB931-2nD Specifications: * SoC: Qualcomm QCA9533 (650MHz) * RAM: 32MiB * Storage: 16MiB SPI NOR flash * Ethernet: 3x100M * Wireless: QCA9533 built-in, dual-chain 802.11b/g/n Installation: 1. Setup a DHCP/BOOTP Server with the following parameters: * DHCP-Option 66 (TFTP server name): pointing to a local TFTP server within the same subnet of the DHCP range * DHCP-Option 67 (Bootfile-Name): matching the initramfs filename of the to be booted image. The usable intramfs files are: - openwrt-ar71xx-mikrotik-vmlinux-initramfs.elf - openwrt-ar71xx-mikrotik-vmlinux-initramfs-lzma.elf - openwrt-ar71xx-mikrotik-rb-nor-flash-16M-initramfs-kernel.bin 2. Press the reset button on the board and keep that pressed. 3. Connect the board to your local network via its Internet port. 4. Release the button after the LEDs on the board are turned off. Now the board should load and start the initramfs image from the TFTP server. 5. Now connect the board via either of its LAN ports (2 or 3). 6. Upload the sysupgrade image to the board with scp: $ scp openwrt-ar71xx-mikrotik-rb-nor-flash-16M-squashfs-sysupgrade.bin root@192.168.1.1:/tmp/fw.bin 7. Log in to the running system listening on 192.168.1.1 via ssh as root (without password): $ ssh root@192.168.1.1 8. Flash the uploaded firmware file from the ssh session via the sysupgrade command: root@OpenWrt:~# sysupgrade /tmp/fw.bin Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
* ar71xx: Add TP-Link Pharos v2 board detectionAdrian Schmutzler2018-06-232-14/+33
| | | | | | | | | | Add support for detecting TP-Link Pharos v2 boards. They use different format in product-info partition than v1 boards. Code was written mostly by Alexander Couzens <lynxis@fe80.eu> 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-202-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* ar71x: add support for Mikrotik Routerboard wAP RDavid Ehrmann2018-06-192-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit adds support for the Mikrotik wAP R (RBwAPR-2nD). The change is based on 3b15eb0 which added support for the wAP 2nD. This change lacks LED support. Specifications: - SoC: Qualcomm QCA9531 (650 MHz) - RAM: 64 MB - Storage: 16 MB NOR SPI flash - Wireless: built-in QCA9531, 802.11b/g/n 2x2:2 - Ethernet: 1x100Mbps - Power: 9-30V Passive PoE, 9-30V DC jack, 9-30V automotive jack - SIM card slot - Mini-PCIe slot Installation: 1. Login to the Mikrotik WebUI to backup your licence key 2. Change the following settings in System->Routerboard->Settings: - Boot device: try ethernet once then NAND - Boot protocol: DHCP - Force Backup Booter: checked 3. Setup a DHCP/BOOTP server with: - DHCP-Option 66 (TFTP server name) pointing to a local TFTP server within the same subnet of the DHCP range - DHCP-Option 67 (Bootfile-Name) matching the initramfs filename of the to be booted image, e.g. openwrt-ar71xx-mikrotik-vmlinux-initramfs.elf 4. Power off the device 5. If this is the second attempt to boot OpenWRT or the boot device isn't "try ethernet once then NAND," press and hold the reset button while powered off. If this is the first attempt, this step isn't necessary. 6. Power on the device, holding the reset button for 15-20s if already pressed from the previous step. The board should load and start the initramfs image from the TFTP server. Login as root/without password to the started OpenWRT via SSH listing on IPv4 address 192.168.1.1. Use sysupgrade to install OpenWRT. Revert to RouterOS Use the "rbcfg" package on in OpenWRT: - rbcfg set boot_protocol bootp - rbcfg set boot_device ethnand - rbcfg apply Open Netinstall and reboot routerboard. Now Netinstall sees RouterBOARD and you can install RouterOS. If NetInstall gets stuck on Sending offer just wait for it to timeout and then close and open Netinstall again. Click on install again. In order for RouterOS to function properly, you need to restore license for the device. You can do that by including license in NetInstall. Signed-off-by: David Ehrmann <ehrmann@gmail.com>
* ar71xx: add support for Fritz!WLAN Repeater 450EDavid Bauer2018-06-182-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit adds support for the AVM Fritz!WLAN Repeater 450E SOC: Qualcomm QCA9556 (Scorpion) 560MHz MIPS74Kc RAM: 64MB Zentel A3R12E40CBF DDR2 FLASH: 16MiB Winbond W25Q128 SPI NOR WLAN1: QCA9556 2.4 GHz 802.11b/g/n 3x3 INPUT: WPS button LED: Power, WiFi, LAN, RSSI indicator Serial: Header Next to Black metal shield Pinout is 3.3V - RX - TX - GND (Square Pad is 3.3V) The Serial setting is 115200-8-N-1. Tested and working: - Ethernet - 2.4GHz WiFi (correct MAC) - Installation via EVA bootloader - OpenWRT sysupgrade - Buttons - Most LEDs Not working: - 2 RSSI LEDs AVM used for RSSI{0,1} two of the Ethernet PHYs LEDs which they control over MDIO. Our driver doesn't expose these LEDs as GPIOs. While it is possible to implement this feature, it would require an additional kernel patch for a minor functionality. Installation via EVA: In the first seconds after Power is connected, the bootloader will listen for FTP connections on 192.168.178.1. Firmware can be uploaded like following: ftp> quote USER adam2 ftp> quote PASS adam2 ftp> binary ftp> debug ftp> passive ftp> quote MEDIA FLSH ftp> put openwrt-sysupgrade.bin mtd1 Note that this procedure might take up to two minutes. You need to powercycle the Device afterwards to boot OpenWRT. Signed-off-by: David Bauer <mail@david-bauer.net>
* ar71xx: add support for OCEDO KoalaDavid Bauer2018-06-072-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit adds support for the OCEDO Koala SOC: Qualcomm QCA9558 (Scorpion) RAM: 128MB FLASH: 16MiB WLAN1: QCA9558 2.4 GHz 802.11bgn 3x3 WLAN2: QCA9880 5 GHz 802.11nac 3x3 INPUT: RESET button LED: Power, LAN, WiFi 2.4, WiFi 5, SYS Serial: Header Next to Black metal shield Pinout is 3.3V - GND - TX - RX (Arrow Pad is 3.3V) The Serial setting is 115200-8-N-1. Tested and working: - Ethernet - 2.4 GHz WiFi - 5 GHz WiFi - TFTP boot from ramdisk image - Installation via ramdisk image - OpenWRT sysupgrade - Buttons - LEDs Installation seems to be possible only through booting an OpenWRT ramdisk image. Hold down the reset button while powering on the device. It will load a ramdisk image named 'koala-uImage-initramfs-lzma.bin' from 192.168.100.8. Note: depending on the present software, the device might also try to pull a file called 'koala-uimage-factory'. Only the name differs, it is still used as a ramdisk image. Wait for the ramdisk image to boot. OpenWRT can be written to the flash via sysupgrade or mtd. Due to the flip-flop bootloader which we not (yet) support, you need to set the partition the bootloader is selecting. It is possible from the initramfs image with > fw_setenv bootcmd run bootcmd_1 Afterwards you can reboot the device. Signed-off-by: David Bauer <mail@david-bauer.net>
* ar71xx: add support for GL.iNet GL-AR750SLuo chongjun2018-05-272-0/+4
| | | | | | | | | | | | | | | | | | | This patch adds supports for GL-AR750S. Specification: - SOC: QCA9563 (775MHz) - Flash: 16 MiB (W25Q128FVSG) - RAM: 128 MiB DDR2 - Ethernet: 2x 1Gbps LAN + 1x 1Gbps WAN - Wireless: 2.4GHz (bgn) and 5GHz (ac) - USB: 1x USB 2.0 port - Button: 1x switch button, 1x reset button - LED: 3x LEDS (green) Flash instruction: Apply factory image via web-gui. Signed-off-by: Luo chongjun <luochongjun@gl-inet.com>
* ar71xx: Add support for PISEN TS-D084Chuanhong Guo2018-05-222-0/+4
| | | | | | | | | | | | | | | | | | PISEN TS-D084 is an wireless router with a battery and integrated power supply based on Atheros AR9331. Specification: - 400/400/200 MHz (CPU/DDR/AHB) - 64 MB of RAM (DDR2) - 8 MB of FLASH (SPI NOR) - 1x 10/100 Mbps Ethernet - 1T1R 2.4 GHz (AR9331) - 1x USB 2.0 Flash instruction: The manufacturer are using exactly the same firmware header as TP-LINK TL-WR703N (including device ID!). Simply upload the factory firmware into WebUI and flashing is done. Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
* ar71xx: add support for Fritz!Box 4020David Bauer2018-05-072-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit adds support for the AVM Fritz!Box 4020 WiFi-router. SoC: Qualcomm Atheros QCA9561 (Dragonfly) 750MHz RAM: Winbond W971GG6KB-25 FLASH: Macronix MX25L12835F WiFi: QCA9561 b/g/n 3x3 450Mbit/s USB: 1x USB 2.0 IN: WPS button, WiFi button OUT: Power LED green, Internet LED green, WLAN LED green, LAN LED green, INFO LED green, INFO LED red UART: Header Next to Black metal shield Pinout is 3.3V - RX - TX - GND (Square Pad is 3.3V) The Serial setting is 115200-8-N-1. Tested and working: - Ethernet (LAN + WAN) - WiFi (correct MAC) - Installation via EVA bootloader - OpenWRT sysupgrade - Buttons - LEDs Not working: - USB port Installation via EVA: In the first seconds after Power is connected, the bootloader will listen for FTP connections on 169.254.157.1 (Might also be 192.168.178.1). Firmware can be uploaded like following: ftp> quote USER adam2 ftp> quote PASS adam2 ftp> binary ftp> debug ftp> passive ftp> quote MEDIA FLSH ftp> put openwrt-sysupgrade.bin mtd1 Note that this procedure might take up to two minutes. After transfer is complete you need to powercycle the device to boot OpenWRT. Signed-off-by: David Bauer <mail@david-bauer.net>
* ar71xx: Add userspace support for Mikrotik rb-2011iLSSimon Paterson2018-04-302-0/+5
| | | | | | | | | | Kernel support already present. Patch adds userspace for the 'iLS' suffix model of the RB2011 family. Enables correct initial switch settings, sysupgrade, etc. https://mikrotik.com/product/RB2011iLS-IN Signed-off-by: Simon Paterson <simon.paterson.nz@gmail.com>
* ar71xx: sysupgrade: improve CPE/WBS 210/510 validation, add new metadata offsetMatthias Schiffer2018-04-101-12/+20
| | | | | | | | | Previously, tplink_pharos_check_image() would accept any image with ELF magic and only non-printable data in the support-list, as in this case the while-read loop would not run at all. Add the new support-list offset and ensure an image is only accepted when the model string is actually found. Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
* ar71xx: add support for TP-Link Archer C60 v2Henryk Heisig2018-04-072-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* ar71xx: add support for TP-Link TL-WR940N v6Robert Marko2018-04-062-0/+4
| | | | | | | | | Add support for TL-WR940N v6 board. It is pretty much the same as v5 except they only left WAN LED and removed other ones. Installation: flash factory image through WEB UI or use TFTP. Signed-off-by: Robert Marko <robimarko@gmail.com>
* ar71xx: add model detection for UBNT AC-MeshDavid Bauer2018-04-051-0/+22
| | | | | | | | | | | | This commit adds correct model detection for UniFi AC-Mesh. Previously said device was incorrectly detected as UniFi AC-Lite. The Information about the device is stored at 0xC in the EEPROM partition. It corresponds to the sysid in /etc/board.info of the Ubiquiti stock firmware. Signed-off-by: David Bauer <mail@david-bauer.net>
* ar71xx: Add support for D-Link DAP-1330 a1Nicolò Veronese2018-04-052-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | D-Link DAP-1330 rev. A1 is a wall-plug N300 Wi-Fi range extender, based on Qualcomm/Atheros QCA9533 v2. Short specification: - 650/393/216 MHz (CPU/DDR/AHB) - 1x 10/100 Mbps Ethernet - 64 MB of RAM (DDR1) - 8 MB of FLASH - 2T2R 2.4 GHz - 2x external antennas - 6x LED (2 are bi-color), 2x button - 4 pin on pcb (looking from eth port and from left to right tx,rx,gnd,vcc) Flash instruction: use "factory" image directly in vendor GUI. This device has a recovery system that assign the ip addr of env variable "serverip" via dhcp to a pc, and the "ipaddr" value to itself. The recovery it's triggered by a not bootable firmware, or pressing the reset button during the bootloader startup (first 30 seconds). The recovery uses a http page to restore the firmware, and it's checking the firmware image header, so use the "factory" image to restore or the original firmware. You can access vendor firmware over serial using: - login: root - password: linuxrocks 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: Nicolò Veronese <nicveronese@gmail.com>
* ar71xx: add support for Ubiquiti Litebeam M5Arne Zachlod2018-03-152-0/+4
| | | | | | | | | | | | | | | | | Specification: - SoC: Atheros AR9342 - Flash: 8 MiB - RAM: 64 MiB - UART: 1x UART on PCB - 115200 8N1 - Ethernet: 1 x 100 Mbit with passive PoE (24V/0.2A) Doesn't work: * Flash via TFTP with Ubiquiti Uboot Installation via vendor firmware: - upload factory image via webinterface Signed-off-by: Arne Zachlod <arne@nerdkeller.org>
* ar71xx: add support for GainStrong Oolite V5.2Piotr Dymacz2018-02-222-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | GainStrong Oolite V5.2 is a small (39.5 x 78 mm), dual-band system on module, based on Qualcomm QCA9531 + QCA9887. All QCA9531 SOC GPIOs are available on castellated pins. Specification: - 650/400/200 MHz (CPU/DDR/AHB) - 64/128 MB of RAM (DDR2) - 16 MB of FLASH (SPI NOR) - 5x 10/100 Mbps Ethernet (all ports available on castellated pins) - 2T2R 2.4 GHz (QCA9531), with ext. PA and LNA - 1T1R 5 GHz (QCA9887) with ext. FEM (SKY85710-11) - 3x U.FL - 1x USB 2.0 The dedicated development board includes 5 FE ports, USB 2.0 port, two buttons (one directly connected to SOC reset input), header with all GPIOs and several LEDs. Flash instruction: Vendor firmware is based on OpenWrt. LuCI or sysupgrade can be used to flash OpenWrt firmware. Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
* ar71xx: rework GainStrong devices supportPiotr Dymacz2018-02-222-8/+2
| | | | | | | | | - combine support for Oolite/MiniBox V1.0 in single mach-*.c file - fix model/board names - include correct/full vendor name - drop redundant package and factory image Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
* ar71xx: add support for AR9331 based Hak5 devicesSebastian Kinne2018-02-222-1/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds support for AR9331 based Hak5 penetration testing tools: - WiFi Pineapple NANO - LAN Turtle - Packet Squirrel WiFi Pineapple NANO specifications: - SoC: Atheros AR9331 (400 MHz) - RAM: 64 MB (DDR2) - FLASH: 16 MB - WiFi: 1T1R AR9331 (built-in), 1T1R AR9271 (built-in via USB bus) - Ethernet: 1x FE over USB (ASIX AX88772A) - Ports: 2x RP-SMA for antennas, 1x USB 2.0 (host), 1x micro SD - Power: USB 5 V, 1.5 A - Other: status LED, reset button LAN Turtle specifications: - SoC: Atheros AR9331 (400 MHz) - RAM: 64 MB (DDR2) - FLASH: 16 MB - WiFi: none - Ethernet: 1x FE (AR9331), 1x FE over USB (Realtek RTL8152B) - Ports: 1x RJ45, version dependent: micro SD or 3G SIM slot - Power: USB 5 V, 0.5 A - Other: status LED, reset button (inside, on PCB) Packet Squirrel specifications: - SoC: Atheros AR9331 (400 MHz) - RAM: 64 MB (DDR2) - FLASH: 16 MB - WiFi: none - Ethernet: 2x FE (AR9331) - Ports: 2x RJ45, 1x USB 2.0 - Power: USB 5 V, 0.12 A - Other: status LED, reset button, 4-way switch Flash instructions for all 3 devices: Original firmware is based on OpenWrt. Use sysupgrade via SSH to flash. Signed-off-by: Sebastian Kinne <contact@sebkinne.com> [squashed commits, combined and reworked mach files, aligned board naming with general convention, fixed minor issues, tested on real hardware, reworded commit subject and description] Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
* ar71xx: add support for YunCore T830Piotr Dymacz2018-02-222-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | YunCore T830 is a simple N300 router with 5-port FE switch, detachable antennas and USB 2.0 port. Specification: - 650/597/216 MHz (CPU/DDR/AHB) - 128 MB of RAM (DDR2) - 16 MB of FLASH (SPI NOR) - 5x 10/100 Mbps Ethernet - 2T2R 2.4 GHz (QCA9531), with ext. PA (SKY65174-21) and LNA - two external, detachable antennas (RP-SMA) - 1x USB 2.0 - 8x LED (7 driven by GPIO) - 1x button (reset) - DC jack for main power input (12 V) - UART and JTAG headers on PCB Flash instruction: 1. First, gain root access to the device, following below steps: - Login into web gui (default password/IP: admin/192.168.188.253). - Go to "Advanced" -> "Management" -> "System" and download backup of configuration (bakfile.bin). - Open the file as tar.gz archive, edit/update "shadow" file and change hash of root password to something known. - Repack the archive, rename it back to "bakfile.bin" and use to restore configuration of the device. - After that, device will reboot and can be accessed over SSH. 2. Then, install OpenWrt: - Login over SSH and issue command: fw_setenv bootcmd "bootm 0x9f050000 || bootm 0x9fe80000" - Upload "sysupgrade" image and install it (only if previous command succeeded) with command: "sysupgrade -n -F openwrt-...". Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>