aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ath79/image/generic.mk
Commit message (Collapse)AuthorAgeFilesLines
* ath79: add support for Sitecom WLR-8100Davide Fioravanti2020-03-071-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sitecom WLR-8100 v1 002 (marketed as X8 AC1750) is a dual band wireless router. Specification: - Qualcomm Atheros SoC QCA9558 - 128 MB of RAM (DDR2) - 16 MB of FLASH (Macronix MX25L12845EMI-10G - SPI NOR) - 5x 10/100/1000 Mbps Ethernet - 3T3R 2.4 GHz (QCA9558 WMAC) - 3T3R 5.8 Ghz (QCA9880-BR4A) - 1x USB 3.0 (Etron EJ168A) - 1x USB 2.0 - 9x LEDs - 2x GPIO buttons Everything working. Installation and restore procedure tested Installation 1. Connect to one of LAN (yellow) ethernet ports, 2. Open router configuration interface, 3. Go to Toolbox > Firmware, 4. Browse for OpenWrt factory image with dlf extension and hit Apply, 5. Wait few minutes, after the Power LED will stop blinking, the router is ready for configuration. Restore OEM FW (Linux only) 1. Download OEM FW from website (tested with WLR-8100v1002-firmware-v27.dlf) 2. Compile the FW for this router and locate the "mksenaofw" tool in build_dir/host/firmware-utils/bin/ inside the OpenWrt buildroot 3. Execute "mksenaofw -d WLR-8100v1002-firmware-v27.dlf -o WLR-8100v1002-firmware-v27.dlf.out" where: WLR-8100v1002-firmware-v27.dlf is the path to the input file (use the downloaded file) WLR-8100v1002-firmware-v27.dlf.out is the path to the output file (you can use the filename you want) 4. Flash the new WLR-8100v1002-firmware-v27.dlf.out file. WARNING: Do not keep settings. Additional notes. The original firmware has the following button configuration: - Press for 2s the 2.4GHz button: WPS for 2.4GHz - Press for 2s the 5GHz button: WPS for 5GHz - Press for 15s both 2.4GHz and 5GHz buttons: Reset I am not able to replicate this behaviour, so I used the following configuration: - Press the 2.4GHz button: RFKILL (disable/enable every wireless interfaces) - Press the 5GHz button: Reset Signed-off-by: Davide Fioravanti <pantanastyle@gmail.com>
* ath79: add support for Devolo Magic 2 WIFIManuel Giganto2020-03-071-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch support Devolo Magic 2 WIFI, board devolo_dlan2-2400-ac. This device is a plc wifi AC2400 router/extender with 2 Ethernet ports, has a G.hn PLC and uses LCMP protocol from Home Grid Forum. Hardware: SoC: AR9344 CPU: 560 MHz Flash: 16 MiB (W25Q128JVSIQ) RAM: 128 MiB DDR2 Ethernet: 2xLAN 10/100/1000 PLC: 88LX5152 (MaxLinear G.hn) PLC Flash: W25Q32JVSSIQ PLC Uplink: 1Gbps MIMO PLC Link: RGMII 1Gbps (WAN) WiFi: Atheros AR9340 2.4GHz 802.11bgn Atheros AR9882-BR4A 5GHz 802.11ac Switch: QCA8337, Port0:CPU, Port2:PLC, Port3:LAN1, Port4:LAN2 Button: 3x Buttons (Reset, wifi and plc) LED: 3x Leds (wifi, plc white, plc red) GPIO Switch: 11-PLC Pairing (Active Low) 13-PLC Enable 21-WLAN power MACs Details verified with the stock firmware: Radio1: 2.4 GHz &wmac *:4c Art location: 0x1002 Radio0: 5.0 GHz &pcie *:4d Art location: 0x5006 Ethernet &ethernet *:4e = 2.4 GHz + 2 PLC uplink --- *:4f = 2.4 GHz + 3 Label MAC address is from PLC uplink OEM SSID: echo devolo-$(grep SerialNumber /dev/mtd1 | grep -o ...$) OEM WiFi password: grep DlanSecurityID /dev/mtd1|tr -d -|cut -d'=' -f 2 Recommendations: Configure and link your PLC with OEM firmware BEFORE you flash the device. PLC configuration/link should remain in different memory and should work straight forward after flashing. Restrictions: PLC link detection to trigger plc red led is not available. PLC G.hn chip is not compatible with open-plc-tools, it uses LCMP protocol with AES-128 and requires different software. Notes: Pairing should be possible with gpio switch. Default configuration will trigger wifi led with 2.4Ghz wifi traffic and plc white led with wan traffic. Flash instruction (TFTP): 1. Set PC to fixed ip address 192.168.0.100 2. Download the sysupgrade image and rename it to uploadfile 3. Start a tftp server with the image file 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. Allow 1-2 minutes for the first boot. Signed-off-by: Manuel Giganto <mgigantoregistros@gmail.com>
* ath79: add support for Teltonika RUT955Daniel Golle2020-02-211-0/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Specification: - 550/400/200 MHz (CPU/DDR/AHB) - 128 MB of RAM (DDR2) - 16 MB of FLASH (SPI NOR) - 4x 10/100 Mbps Ethernet, with passive PoE support on LAN1 - 2T2R 2,4 GHz (AR9344) - built-in 4G/3G module (example: Quectel EC-25EU) - internal microSD slot (spi-mmc, buggy and disabled for now) - RS232 on D-Sub9 port (Cypress ACM via USB, /dev/ttyACM0) - RS422/RS485 (AR934x high speed UART, /dev/ttyATH1) - analog 0-24V input (MCP3221) - various digital inputs and outputs incl. a relay - 11x LED (4 are driven by AR9344, 7 by 74HC595) - 2x miniSIM slot (can be swapped via GPIO) - 2x RP-SMA/F (Wi-Fi), 3x SMA/F (2x WWAN, GPS) - 1x button (reset) - DC jack for main power input (9-30 V) - debugging UART available on PCB edge connector Serial console (/dev/ttyS0) pinout: - RX: pin1 (square) on top side of the main PCB (AR9344 is on top) - TX: pin1 (square) on bottom side Flash instruction: Vendor firmware is based on OpenWrt CC release. Use the "factory" image directly in GUI (make sure to uncheck "keep settings") or in U-Boot web based recovery. To avoid any problems, make sure to first update vendor firmware to latest version - "factory" image was successfully tested on device running "RUT9XX_R_00.06.051" firmware and U-Boot "3.0.2". Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* ath79: correct Siemens WS-AP3610 blocksizeDavid Bauer2020-02-201-0/+1
| | | | | | | With the wrong blocksize, the rootfs was not positioned on the boundary of a block, thus breaking the mtdsplit driver. Signed-off-by: David Bauer <mail@david-bauer.net>
* ath79: add support for Siemens WS-AP3610David Bauer2020-02-161-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Hardware -------- SoC: Atheros AR7161 RAM: Samsung K4H511638D-UCCC 2x 64M DDR1 SPI: Micron M25P128 (16M) WiFi: Atheros AR9160 bgn Atheros AR9160 an ETH: Broadcom BCM5481 LED: Power (Green/Red) ETH (Green / Blue / Yellow) (PHY-controlled) WiFi 5 (Green / Blue) WiFi 2 (Green / Blue) BTN: Reset Serial: Cisco-Style RJ45 - 115200 8N1 Installation ------------ 1. Download the OpenWrt initramfs-image. Place it into a TFTP server root directory and rename it to 1401A8C0.img. Configure the TFTP server to listen at 192.168.1.66/24. 2. Connect the TFTP server to the access point. 3. Connect to the serial console of the access point. Attach power and interrupt the boot procedure when prompted (bootdelay is 1 second). 4. Configure the U-Boot environment for booting OpenWrt from Ram and flash: $ setenv boot_openwrt 'setenv bootargs; bootm 0xbf080000' $ setenv ramboot_openwrt 'setenv serverip 192.168.1.66; tftpboot; bootm' $ saveenv 5. Load OpenWrt into memory: $ run ramboot_openwrt Wait for the image to boot. 6. Transfer the OpenWrt sysupgrade image to the device. Write the image to flash using sysupgrade: $ sysupgrade -n /path/to/openwrt-sysuograde.bin Signed-off-by: David Bauer <mail@david-bauer.net>
* ath79: enable forceless sysupgrade from ar71xx on fritz300eAdrian Schmutzler2020-02-131-0/+1
| | | | | | | This adds the ar71xx board name to the SUPPORTED_DEVICES on ath79, so forceless sysupgrade on this device becomes possible. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ath79: add support for COMFAST CF-E560ACAugust Huber2020-02-031-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit adds support for the COMFAST CF-E560AC, an ap143 based in-wall access point. Specifications: - SoC: Qualcomm Atheros QCA9531 - RAM: 128 MB DDR2 (Winbond W971GG6SB-25) - Storage: 16 MB NOR (Winbond 25Q128JVSO) - WAN: 1x 10/100 PoE ethernet (48v) - LAN: 4x 10/100 ethernet - WLAN1: QCA9531 - 802.11b/g/n - 2x SKY85303-21 FEM - WLAN2: QCA9886 - 802.11ac/n/a - 2x SKY85735-11 FEM - USB: one external USB2.0 port - UART: 3.3v, 2.54mm headers already populated on board - LED: 7x external - Button: 1x external - Boot: U-Boot 1.1.4 (pepe2k/u-boot_mod) MAC addressing: - stock LAN *:40 (label) WAN *:41 5G *:42 2.4G *:4a - flash (art partition) 0x0 *:40 (label) 0x6 *:42 0x1002 *:41 0x5006 *:43 This device contains valid MAC addresses in art 0x0, 0x6, 0x1002 and 0x5006, however the vendor firmware only reads from art:0x0 for the LAN interface and then increments in 02_network. They also jump 8 addresses for the second wifi interface (2.4 GHz). This behavior has been duplicated in the DTS and ath10k hotplug to align addresses with the vendor firmware v2.6.0. Recovery instructions: This device contains built-in u-boot tftp recovery. 1. Configure PC with static IP 192.168.1.10/24 and tftp server. 2. Place desired image at /firmware_auto.bin at tftp root. 3. Connect device to PC, and power on. 4. Device will fetch flash from tftp, flash and reboot into new image. Signed-off-by: August Huber <auh@google.com> [move jtag_disable_pins, remove unnecessary statuses in DTS, remove duplicate entry in 11-ath10k-caldata, remove hub_port0 label in DTS] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ath79: WNDR3700 v2: add dash before version in device nameMichal Cieslakiewicz2020-02-031-3/+3
| | | | | | | | Adapt Netgear WNDR3700v2 device identification string to ath79 naming scheme by changing from 'wndr3700v2' to 'wndr3700-v2' (affects config, makefile, init scripts and device tree definition). Signed-off-by: Michal Cieslakiewicz <michal.cieslakiewicz@wp.pl>
* ath79: add support for GL.iNet 6408/6416 (GL.iNet V1)Adrian Schmutzler2020-01-291-0/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This ports the GL.iNet 6408/6416 from ar71xx. The GL-Connect GL.iNet v1 routers are basically a TP-Link TL-WR710N with more DRAM/Flash and console/GPIO header in the same small form-factor. Specifications: - SoC: Atheros AR9331 - CPU: 400 MHz - Flash: 8/16 MiB - RAM: 64 MiB - WiFi: 2.4 GHz b/g/n (SoC) - Ethernet: 2x 100M ports (LAN/WAN) - USB: 1x 2.0 The difference between 6408 and 6416 is just the flash size. It looks like only the 16 MiB version has been advertised, while the 6408 is a modified version. There are also 1-port versions sold by third parties. Installation: Install the sysupgrade image via stock firmware GUI or upload it via uboot (web-based). The device will be available at 192.168.1.1. Attention: In ar71xx, the same board name is used for both flash versions. So, please make sure you flash the correct ath79 image when upgrading. This has been device-tested on a GL.iNet 6416. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ath79: fix SUPPORTED_DEVICES not matching ar71xx board namesAdrian Schmutzler2020-01-231-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Based on a script for comparison, this fixes (hopefully) all errors in SUPPORTED_DEVICES for ar71xx->ath79 upgrade. Devices where old string is removed as the device does not exist in ar71xx: - dlink_dir-859-a1 - tplink_archer-a7-v5 - tplink_cpe510-v3 Devices where string is changed because it did not match the board name in ar71xx: - tplink_tl-mr3220-v1 - tplink_tl-mr3420-v1 - tplink_tl-wr2543-v1 - tplink_tl-wr741nd-v4 - tplink_tl-wr841-v7 - ubnt_unifiac-mesh - ubnt_unifiac-mesh-pro - ubnt_unifiac-pro For this device, the correct string could not be found, but we could not determine the correct one. Thus, the string is removed for now: - tplink_tl-wr740n-v4 The script for checking this is quite simple (note that newer entries, i.e. ath79->ath79 upgrade, are displayed as missing): newpath=target/linux/ath79/image/ oldpath=target/linux/ar71xx/base-files/lib/ar71xx.sh for s in $(grep -roh "SUPPORTED_DEVICES.*" $newpath | sed 's/SUPPORTED_DEVICES *.= *//'); do found="Missing" grep -q -r "\"$s\"" $oldpath && found="Found" echo "$s: $found." done The errors might be filtered by appending 'grep "Missing"' to the script. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ath79: add support for MikroTik RouterBOARD wAP G-5HacT2HnDRoger Pueyo Centelles2020-01-231-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit adds support for the MikroTik RouterBOARD wAP G-5HacT2HnD (wAP AC), a small weatherproof dual band, dual-radio 802.11ac wireless AP with integrated omnidirectional anntennae and one 10/100/1000 Mbps Ethernet port. See https://mikrotik.com/product/RBwAPG-5HacT2HnD for more info. Specifications: - SoC: Qualcomm Atheros QCA9556 - RAM: 64 MB - Storage: 16 MB NOR - Wireless: · Atheros AR9550 (SoC) 802.11b/g/n 2x2:2, 2 dBi antennae · Qualcomm QCA9880 802.11a/n/ac 3x3:3, 2 dBi antennae - Ethernet: Atheros AG71xx (SoC, AR8033), 1x 1000/100/10 port, passive PoE in Working: - Board/system detection - Sysupgrade - Serial console - Ethernet - 2.4 GHz radio - 5 GHz radio and LED - Reset button Not working/Unsupported: - 2.4 GHz LED - AP/CAP LED - ZT2046Q SPI temperature and voltage sensor This adds the basic features for supporting MikroTik devices: - a common recipe for mikrotik images in common-mikrotik.mk - support for minor (MikroTik NOR) split firmware (only for generic subtarget so far) Acknowledgments: Robert Marko <robimarko@gmail.com> Andrew Cameron <apcameron@softhome.net> Koen Vandeputte <koen.vandeputte@ncentric.com> Chuanhong Guo <gch981213@gmail.com> Signed-off-by: Roger Pueyo Centelles <roger.pueyo@guifi.net> Co-developed-by: Adrian Schmutzler <freifunk@adrianschmutzler.de> Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de> Tested-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
* ath79: add support for D-Link DIR-505David Bauer2020-01-151-0/+10
| | | | | | | | | | | | | | | | | | | | | | | This commit adds support for the D-Link DIR-505, previously supported in ar71xx. Hardware -------- SoC: Atheros AR9330 FLASH: 8M SPI-NOR RAM: 64M WIFI: 1T1R 1SS Atheros AR9330 LED: Power green, Status red BTN: WPS, Reset Installation ------------ Currently, installation is only possible by sysupgrading from an earlier OpenWrt version, U-Boot TFTP or a modded U-Boot. I do not have the original bootloader from D-Link on my device anymore, so i cannot test the factory image. Signed-off-by: David Bauer <mail@david-bauer.net>
* ath79: wlr-7100: use ath10k-ct smallbuffers package variantTomasz Maciej Nowak2020-01-151-1/+1
| | | | | | | | The memory hacks got removed from ath10k with 1e27bef ("mac80211: remove ath10k_pci memory hacks"). As this device has low amount of RAM, switch to ath-10k-ct small buffers variant, to avoid the OOM Reaper. Signed-off-by: Tomasz Maciej Nowak <tomek_n@o2.pl>
* ath79: use ath10k-ct-smallbuffers for 64 MiB devicesPaul Fertser2019-12-241-4/+4
| | | | Signed-off-by: Paul Fertser <fercerpav@gmail.com>
* ath79: rename ATH_SOC to SOCAdrian Schmutzler2019-12-201-75/+75
| | | | | | | This replaces ATH_SOC by the newly introduced common SOC device variable. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ath79: harmonize line breaks in image MakefilesAdrian Schmutzler2019-12-201-70/+98
| | | | | | | | | | | | | | | | This harmonizes the line wrapping in image Makefile device definitions, as those are frequently copy-pasted and are a common subject of review comments. Having the treatment unifying should reduce the cases where adjustment is necessary afterwards. Harmonization is achieved by consistently (read "strictly") applying certain rules: - Never put more than 80 characters into one line - Fill lines up (do not break after 40 chars because of ...) - Use one tab for indent after wrapping by "\" - Only break after pipe "|" for IMAGE variables Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ath79: add support for YunCore XD4200 and A782Piotr Dymacz2019-11-251-0/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | YunCore XD4200 ('XD4200_W6.0' marking on PCB) is Qualcomm/Atheros based (QCA9563, QCA9886, QCA8334) dual-band, Wave-2 AC1200 ceiling AP with PoE (802.3at) support. A782 model ('T750_V5.1' marking on PCB) is a smaller version of the XD4200, with similar specification but lower TX power. Specification: - QCA9563 (775 MHz) - 128 MB of RAM (DDR2) - 16 MB of FLASH (SPI NOR) - 2x 10/100/1000 Mbps Ethernet (QCA8334), with 802.3at PoE support (WAN) - Wi-Fi 2.4 GHz: - XD4200: 2T2R (QCA9563), with ext. PA (SKY65174-21) and LNA - A782: 2T2R (QCA9563), with ext. FEM (SKY85329-11) - Wi-Fi 5 GHz: - XD4200: 2T2R (QCA9886), with ext. FEM (SKY85728-11) - A782: 2T2R (QCA9886), with ext. FEM (SKY85735-11) - LEDs: - XD4200: 5x (2x driven by SOC, 1x driven by AC radio, 2x Ethernet) - A782: 3x (1x RGB, driven by SOC and radio, 2x Ethernet) - 1x button (reset) - 1x UART (4-pin, 2.54 mm pitch) header on PCB - 1x DC jack (12 V) Flash instructions: If your device comes with generic QSDK based firmware, you can login over telnet (login: root, empty password, default IP: 192.168.188.253), issue first (important!) 'fw_setenv' command and then perform regular upgrade, using 'sysupgrade -n -F ...' (you can use 'wget' to download image to the device, SSH server is not available): fw_setenv bootcmd "bootm 0x9f050000 || bootm 0x9fe80000" sysupgrade -n -F openwrt-...-yuncore_...-squashfs-sysupgrade.bin In case your device runs firmware with YunCore custom GUI, you can use U-Boot recovery mode: 1. Set a static IP 192.168.0.141/24 on PC and start TFTP server with 'tftp' image renamed to 'upgrade.bin' 2. Power the device with reset button pressed and release it after 5-7 seconds, recovery mode should start downloading image from server (unfortunately, there is no visible indication that recovery got enabled - in case of problems check TFTP server logs) Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
* ath79: add support for YunCore TFTP image generationVincent Wiemann2019-11-251-0/+3
| | | | | | | | | | | | | | | | | | YunCore QCA9k based devices released in 2019 require a custom TFTP image for U-Boot built-in recovery mode (triggered with reset button). Image has to be prepended with 'YUNCORE' keyword followed by U-Boot CLI commands which will be executed later. Images without the custom header will be ignored by U-Boot. To be able to support both the vendor firmware (QSDK) and OpenWrt flash layouts, used here commands change the 'bootcmd' before flashing image. This commit adds generic helper script for YunCore devices with 16 MB of flash and enables TFTP image generation for A770 model. Signed-off-by: Vincent Wiemann <vincent.wiemann@ironai.com> [pepe2k@gmail.com: commit description reworded, recipe renamed] Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
* ath79: fix sysupgrade from ar71xx for WNDR3700 V2 and WNDR3800(CH)Adrian Schmutzler2019-11-141-3/+3
| | | | | | | | | | | ar71xx has just one board name "wndr3700" for WNDR3700 V1/V2, WNDR3800 and WNDR3800CH, whereas ath79 provides separate images for the boards. So, update SUPPORTED_DEVICES to store the correct ar71xx board names. Fixes: FS#2510 Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ath79: GL-AR750S: provide NAND support; increase kernel to 4 MBJeff Kletsky2019-11-141-10/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The GL.iNet GL-AR750S has been supported by the ar71xx and ath79 platforms with access to its 16 MB NOR flash, but not its 128 MB SPI NAND flash. This commit provides support for the NAND through the upstream SPI-NAND framework. At this time, the OEM U-Boot appears to only support loading the kernel from NOR. This configuration is preserved as this time, with the glinet,gl-ar750s-nand name reserved for a potential, future, NAND-only boot. The family of GL-AR750S devices on the ath79 platform now includes: * glinet,gl-ar750m-nor-nand "nand" target * glinet,gl-ar750m-nor "nand" target (NAND-aware) NB: This commit increases the kernel size from 2 MB to 4 MB "Force-less" sysupgrade is presently supported from the current versions of following NOR-based firmwre images to the version of glinet,gl-ar750s-nor firmware produced by this commit: * glinet,gl-ar750s -- OpenWrt 19.07 ar71xx * glinet,gl-ar750s -- OpenWrt 19.07 ath79 Users who have sucessfully upgraded to glinet,gl-ar750m-nor may then flash glinet,gl-ar750m-nor-nand with sysupgrade to transtion to the NAND-based variant. Other upgrades to these images, including directly to the NAND-based glinet,gl-ar750s-nor-nand firmware, can be accomplished through U-Boot. NB: See "ath79: restrict GL-AR750S kernel build-size to 2 MB" which enables flashing of NAND factory.img with the current GL-iNet U-Boot, "U-Boot 1.1.4-gcf378d80-dirty (Aug 16 2018 - 07:51:15)" The GL-AR750S OEM U-Boot allows upload and flashing of either NOR firmware (sysupgrade.bin) or NAND firmware (factory.img) through its HTTP-based GUI. Serial connectivity is not required. The glinet,gl-ar750s-nor and glinet,gl-ar750s-nor-nand images generated after this commit flash each other directly. This commit changes the control of the USB VBUS to gpio-hog from regulator-fixed introduced by commit 0f6b944c92. This reduces the compressed kernel size by ~14 kB, with no apparent loss of functionality. No other ath79-nand boards are using regulator-fixed at this time. Note: mtd_get_mac_binary art 0x5006 does not return the proper MAC and the GL.iNet source indicates that only the 0x0 offset is valid The ar71xx targets are unmodified. Cc: Alexander Wördekemper <alexwoerde@web.de> Signed-off-by: Jeff Kletsky <git-commits@allycomm.com>
* ath79: add GL.iNet GL-AR300M16 as NOR-only boardJeff Kletsky2019-11-141-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The GL.iNet GL-AR300M series of devices includes variants without NAND and only the 16 MB NOR flash. These include the GL-AR300M16 and the GL-AR300M-Lite (already with its own board name). This board-name addition provides disambiguation from the NAND-bearing GL-AR300M devices, both for OpenWrt code and for end users. Kernel and firmware support for NAND and UBI will add ~320 kB to the overall firmware size at this time. This NOR-only option continues to provide more compact firmware for both the GL-AR300M16 as well as those who wish to use it as an alternate or primary, NOR-resident firmware on the GL-AR300M. The ar71xx targets are unmodified. Installation ------------ Install through OEM U-Boot (HTTP-based) or `sysupgrade --force` when booted from NOR and running OEM or OpenWrt, NOR-based firmware. As one of the intentions is disambiguation from NAND-bearing units, users who have flashed this firmware onto a device with NAND would need to use U-Boot or `sysupgrade --force` to flash firmware that again supports NAND. There are no additional SUPPORTED_DEVICES as it is not possible to determine if a device does or does not have NAND based on either the OEM's or OpenWrt's board names prior to this patch. Signed-off-by: Jeff Kletsky <git-commits@allycomm.com>
* ath79: GL-AR300M: provide NAND support; increase to 4 MB kernelJeff Kletsky2019-11-141-6/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The GL.iNet GL-AR300M has been supported by the ar71xx and ath79 platforms with access to its 16 MB NOR flash, but not its 128 MB SPI NAND flash. This commit provides support for the NAND through the upstream SPI-NAND framework. Devices with both NOR and NAND flash can support independent firmware on each, with U-Boot able to boot from either. The OEM U-Boot will fall back to the NOR firmware after three "unsuccessful" boots. The family of GL-AR300M devices on the ath79 platform now includes: * glinet,gl-ar300m-lite "generic" target, NOR-only board * glinet,gl-ar300m-nand "nand" target * glinet,gl-ar300m-nor "nand" target (NAND-aware) NB: This commit increases the kernel size from 2 MB to 4 MB "Force-less" sysupgrade is presently supported from the current versions of following NOR-based firmwre images to the version of glinet,gl-ar300m-nor firmware produced by this commit: * gl-ar300m -- OEM v3 NOR ar71xx (openwrt-ar300m16-*.bin) * gl-ar300m -- OpenWrt 18.06 ar71xx * gl-ar300m -- OpenWrt 19.07 ar71xx Other upgrades to these images should be performed through U-Boot. The GL-AR300M OEM U-Boot allows upload and flashing of either NOR firmware (sysupgrade.bin) or NAND firmware (factory.img) through its HTTP-based GUI. Serial connectivity is not required. The glinet,gl-ar300m-nand and glinet,gl-ar300m-nor images generated after this commit should safely flash each other using sysupgrade. The boot counter is implemented by the OEM using u-boot-env. At this time, it does not appear that the switch on the side of the unit can be used to select NOR vs. NAND boot and the fail-over is only from NAND to NOR. To save flash wear, it is only reset when running the glinet,gl-ar300m-nand firmware. NAND-specific base-files are used to remove impact on existing generic and tiny targets. As there is now no "generic" build appropriate for the GL-AR300M16, (or for users of the GL-AR300M that do not need access to NAND) it will be introduced in a subsequent commit. Note: `mtd_get_mac_binary art 0x6` does not return the proper MAC and the GL.iNet source indicates that only the 0x0 offset is valid The ar71xx targets are unmodified. Signed-off-by: Jeff Kletsky <git-commits@allycomm.com>
* ath79: add support for Netgear WNR2200Michal Cieslakiewicz2019-11-011-0/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds ath79 support for Netgear WNR2200. Router was previously supported by ar71xx target only (8 MiB variant). Netgear WNR2200 has two flash versions - 8MiB sold in EU, US etc. and 16 MiB for Russia and China markets. Apart from flash size both variants share the same hardware specification. Specification ============= * Description: Netgear WNR2200 * Loader: U-boot * SOC: Atheros AR7241 (360 MHz) * RAM: 64 MiB * Flash: 8 MiB or 16 MiB (SPI NOR) - U-boot binary: 256 KiB - U-boot environment: 64 KiB - Firmware: 7808 KiB or 16000 KiB - ART: 64 KiB * Ethernet: 4 x 10/100 LAN + 1 x 10/100 WAN * Wireless: 2.4 GHz b/g/n (Atheros AR9287) * USB: yes, 1 x USB 2.0 * Buttons: - Reset - WiFi (rfkill) - WPS * LEDs: - Power (amber/green) - WAN (amber/green) - WLAN (blue) - 4 x LAN (amber/green) - WPS (green) * UART: 4-pin connector JP1, 3.3V (Vcc, TX, RX, GND), 115200 8N1 * Power supply: DC 12V 1.5A * MAC addresses: LAN on case label, WAN +1, WLAN +2 Installation ============ * TFTP recovery * TFTP via U-boot prompt * sysupgrade * Web interface Test build configuration ======================== CONFIG_TARGET_ath79=y CONFIG_TARGET_ath79_generic=y CONFIG_TARGET_ath79_generic_DEVICE_netgear_wnr2200-8m=y CONFIG_ALL_KMODS=y CONFIG_DEVEL=y CONFIG_CCACHE=y CONFIG_COLLECT_KERNEL_DEBUG=y CONFIG_IMAGEOPT=y CONFIG_KERNEL_DEBUG_INFO=y CONFIG_KERNEL_DEBUG_KERNEL=y Signed-off-by: Michal Cieslakiewicz <michal.cieslakiewicz@wp.pl>
* ath79: fix remaining IMAGE_SIZE issuesAdrian Schmutzler2019-10-271-1/+1
| | | | | | | | This fixes the remaining IMAGE_SIZE issues in ath79 target. All devices in target have been checked, so together with previous patches this target should be "clean" afterwards. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ath79: Refactor GL.iNet GL-AR300M-series generic.mkJeff Kletsky2019-10-241-3/+3
| | | | | | | | | | Rework DEVICE_VENDOR, DEVICE_MODEL, and DEVICE_VARIANT for the GL-AR300M series on the ath79-generic target. Changes GL-AR300M-Lite to the current form with DEVICE_VARIANT := Lite (board name is unchanged) Signed-off-by: Jeff Kletsky <git-commits@allycomm.com>
* ath79: add support for Sitecom WLR-7100Tomasz Maciej Nowak2019-10-211-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sitecom WLR-7100 v1 002 (marketed as X7 AC1200) is a dual band wireless router. Specification SoC: Atheros AR1022 RAM: 64 MB DDR2 Flash: 8 MB SPI NOR WIFI: 2.4 GHz 2T2R integrated 5 GHz 2T2R QCA9882 integrated (connected to PCIe lane) Ethernet: 5x 10/100/1000 Mbps QCA8337N USB: 1x 2.0 LEDS: 4x GPIO controlled, 5x switch Buttons: 2x GPIO controlled UART: row of 4 unpopulated holes near USB port, starting count from white triangle on PCB 1. VCC 3.3V, 2. GND, 3. TX, 4. RX baud: 115200, parity: none, flow control: none Installation 1. Connect to one of LAN (yellow) ethernet ports, 2. Open router configuration interface, 3. Go to Toolbox > Firmware, 4. Browse for OpenWrt factory image with dlf extension and hit Apply, 5. Wait few minutes, after the Power LED will stop blinking, the router is ready for configuration. Known issues 5GHz LED doesn't work Additional information When TX line on UART is connected, and board is switched on from power off state, the DDR memory training may fail. If connected to UART, when prompted for number on boot, one can enter number 4 to open bootloader (U-Boot) command line. OEM firmware shell password is: SitecomSenao useful for creating backup of original firmware. There is also another revision of this device (v1 001), which may or may not work with introduced images. Signed-off-by: Tomasz Maciej Nowak <tomek_n@o2.pl>
* ath79: add support for COMFAST CF-E313ACRoger Pueyo Centelles2019-10-131-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds support for the COMFAST CF-E313AC, an outdoor wireless CPE with two Ethernet ports and a 802.11ac radio. Specifications: - QCA9531 SoC - 650/400/216 MHz (CPU/DDR/AHB) - 1x 10/100 Mbps WAN Ethernet, 48V PoE-in - 1x 10/100 Mbps LAN Ethernet, pass-through 48V PoE-out - 1x manual pass-through PoE switch - 64 MB RAM (DDR2) - 16 MB FLASH - QCA9886 2T2R 5 GHz 802.11ac, 23 dBm - 12 dBi built-in antenna - POWER/LAN/WAN/WLAN green LEDs - 4x RSSI LEDs (2x red, 2x green) - UART (115200 8N1) Flashing instructions: The original firmware is based on OpenWrt so a sysupgrade image can be installed via the stock web GUI. Settings from the original firmware will be saved and restored on the new one, so a factory reset will be needed. To do so, once the new firmware is flashed, enter into failsafe mode by pressing the reset button several times during the boot process, while the WAN LED flashes, until it starts flashing faster. Once in failsafe mode, perform a factory reset as usual. Alternatively, the U-boot bootloader contains a recovery HTTP server to upload the firmware. Push the reset button while powering the device on and keep it pressed for >10 seconds. The device's LEDs will blink several times and the recovery page will be at http://192.168.1.1; use it to upload the sysupgrade image. Note: Four MAC addresses are stored in the "art" partition (read-only): - 0x0000: 40:A5:EF:AA:AA:A0 - 0x0006: 40:A5:EF:AA:AA:A2 - 0x1002: 40:A5:EF:AA:AA:A1 - 0x5006: 40:A5:EF:AA.AA:A3 (inside the 5 GHz calibration data) The stock firmware assigns MAC addresses to physical and virtual interfaces in a very particular way: - eth0 corresponds to the physical Ethernet port labeled as WAN - eth1 corresponds to the physical Ethernet port labeled as LAN - eth0 belongs to the bridge interface br-wan - eth1 belongs to the bridge interface br-lan - eth0 is assigned the MAC from 0x0 (*:A0) - eth1 is assigned the MAC from 0x1002 (*:A1) - br-wan is forced to use the MAC from 0x1002 (*:A1) - br-lan is forced to use the MAC from 0x0 (*:A0) - radio0 uses the calibration data from 0x5000 (which contains a valid MAC address, *:A3). However, it is overwritten by the one at 0x6 (*:A2) This commit preserves the LAN/WAN roles of the physical Ethernet ports (as labeled on the router) and the MAC addresses they expose by default (i.e., *:A0 on LAN, *:A1 on WAN), but swaps the position of the eth0/eth1 compared to the stock firmware: - eth0 corresponds to the physical Ethernet port labeled as LAN - eth1 corresponds to the physical Ethernet port labeled as WAN - eth0 belongs to the bridge interface br-lan - eth1 is the interface at @wan - eth0 is assigned the MAC from 0x0 (*:A0) - eth1 is assigned the MAC from 0x1002 (*:A1) - br-lan inherits the MAC from eth0 (*:A0) - @wan inherits the MAC from eth1 (*:A1) - radio0's MAC is overwritten to the one at 0x6 This way, eth0/eth1's positions differ from the stock firmware, but the weird MAC ressignations in br-lan/br-wan are avoided while the external behaviour of the router is maintained. Additionally, WAN port is connected to the PHY gmac, allowing to monitor the link status (e.g., to restart DHCP negotiation when plugging a cable). Signed-off-by: Roger Pueyo Centelles <roger.pueyo@guifi.net>
* treewide: remove kmod-usb-core from DEVICE_PACKAGESAdrian Schmutzler2019-10-061-23/+23
| | | | | | | | | | | | | | | | | | | This removes _all_ occurrences of kmod-usb-core from DEVICE_PACKAGES and similar variables. This package is pulled as dependency by one of the following packages in any case: - kmod-usb-chipidea - kmod-usb-dwc2 - kmod-usb-ledtrig-usbport - kmod-usb-ohci - kmod-usb2 - kmod-usb2-pci - kmod-usb3 Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de> [remove kmod-usb-core from EnGenius ESR600] Signed-off-by: David Bauer <mail@david-bauer.net>
* ath79: add support of Netgear WNDR3800CHDmitry Tunin2019-09-211-0/+11
| | | | | | | | Add support for the ar71xx supported Netgear WNDR3800CH to ath79. The device is identical to WNDR3800 except NETGEAR_BOARD_ID. Signed-off-by: Dmitry Tunin <hanipouspilot@gmail.com> Reviewed-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ath79: image: pad kernel for Adtran/Bluesocket devicesTomasz Maciej Nowak2019-09-211-2/+2
| | | | | | | | | | | | | | | | It has been reported that using the sysupgrade-tar image will trigger "lzma_decode failed error". The RedBoot bootloader always loads data from flash till block size boundary, so if there's no padding it'll also load the beginning of rootfs, and it seems that lzma_decoder can't handle that garbage data. Previously the script creating combined-image silently padded the kernel and rootfs, but since sysupgrade-tar doesn't, pad the default kernel image. Fixes: 900330f ("ath79: image: retire combined-image for Adtran/Bluesocket devices") Cc: Brian Gonyer <bgonyer@gmail.com> Cc: Daniel Gimpelevich <daniel@gimpelevich.san-francisco.ca.us> Signed-off-by: Tomasz Maciej Nowak <tomek_n@o2.pl>
* ath79: sort device definitions in image/*Adrian Schmutzler2019-09-211-102/+103
| | | | | | | | | | | This applies alphabetic sorting to devices in image/* files. For certain cases, this patch deviates from strict sorting, e.g. to ensure that v10 comes after v9. While at it, fix an indent and remove some useless empty lines. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ath79: image: disable sysupgrade images for routerstations and ja76pf2Tomasz Maciej Nowak2019-09-011-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Because a bug in handling partial erase blocks in 4.19 kernel, using sysupgrade images will hard brick devices that use RedBoot bootloader and have "FIS directory" with "RedBoot config" on the same erase block. Since flashing the devices from bootloader is safe, and to not cause a situation where external chip programmer or JTAG is needed, disable sysupgrade images for affected boards while creating kernel.bin and rootfs.bin for jjPlus JA76PF2 board, which doesn't have factory image. To set up the JA76PF2 board follow "Installation" instructions in b3a0c97 ("ath79: add support for jjPlus JA76PF2") except the part of loading initramfs image and using sysupgrade image for flashing (point 6 and 7). Enter following commands to flash the board from bootloader: fis init load -r -b 0x80060000 <openwrt_kernel_image_name> fis create linux load -r -b %{FREEMEMLO} <openwrt_rootfs_image_name> fis create rootfs fis load -l linux exec -c "" For RouterStations use TFTP recovery procedure. Ref: FS#2428 Cc: Matt Merhar <mattmerhar@protonmail.com> Signed-off-by: Tomasz Maciej Nowak <tomek_n@o2.pl>
* ath79: image: add supported string for routerstations and ja76pf2Tomasz Maciej Nowak2019-09-011-0/+1
| | | | | | | | | Now that the md5 check is fixed and metadata present, sysupgrade on ar71xx will complain about device not being supported by the image. Since the cause is not matching strings for supported devices add them accordingly. Signed-off-by: Tomasz Maciej Nowak <tomek_n@o2.pl>
* ath79: image: append metadata to routerstations and ja76pf2 imagesTomasz Maciej Nowak2019-09-011-1/+1
| | | | | | | | This target enforces metadata check so add the necessary information. It was previously removed because md5 sum check. When using these sysupgrade images on ar71xx target the check would complain about them not matching. Signed-off-by: Tomasz Maciej Nowak <tomek_n@o2.pl>
* ath79: image: retire combined-image for Adtran/Bluesocket devicesTomasz Maciej Nowak2019-09-011-1/+1
| | | | | | | | | | | | During review it slipped by that these devices use combined-image which should never be used for newly added ones. Therefore switch to sysupgrade-tar generated images introduced in 8f6f260 ("ath79: routerstation: prepare to use sysupgrade-tar format image"). The sysupgrade accepts both images for now so no reression should occur. Cc: Brian Gonyer <bgonyer@gmail.com> Cc: Daniel Gimpelevich <daniel@gimpelevich.san-francisco.ca.us> Signed-off-by: Tomasz Maciej Nowak <tomek_n@o2.pl>
* ath79: add support for gl-ar750Luochongjun2019-08-241-0/+10
| | | | | | | | | | | | | | | | | | | | This patch supports gl-ar750, which was previously supported by ar71xx. Specification: - SOC: QCA9531 (650MHz) - Flash: 16 MiB (W25Q128FVSG) - RAM: 128 MiB DDR2 - Ethernet: 10/100: 2xLAN + 10/100: 1xWAN - Wireless: 2.4GHz (bgn) and 5GHz (ac) - USB: 1x USB 2.0 port - Switch: 1x switch - Button: 1x reset button - LED: 3x LEDS (white) Flash instruction: Support for sysupgrade directive upgrades, as well as luci upgrades. Signed-off-by: Luochongjun <luochongjun@gl-inet.com>
* ath79: add support for PISEN TS-D084xixiao zheng2019-08-171-0/+11
| | | | | | | | | | | | | | | | | | | | | 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: Upload generated factory image through web interface. Signed-off-by: xixiao zheng <xixiaozheng64@gmail.com> [wrap commit message, add flash instruction] Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
* ath79: add missing IMAGE_SIZE for Comfast WR650AC v1/v2Adrian Schmutzler2019-08-091-0/+2
| | | | | | | | When adding support in 9ed272fe9500 ("ath79: add support for Comfast WR650AC v1/v2"), IMAGE_SIZE has not been added to device definition. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ath79: add missing IMAGE_SIZE for Comfast E314N-v2Adrian Schmutzler2019-08-091-0/+1
| | | | | | | | When adding support in abbbecaa73dc ("ath79: add support for Comfast E314N-v2"), IMAGE_SIZE has not been added to device definition. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ath79: fix whitespace errors from adding D-Link DIR-842 C3Adrian Schmutzler2019-08-091-9/+9
| | | | | | | | | We completely overlooked whitespace errors when reviewing 796ad2f7ef6f ("ath79: add support for D-Link DIR-842 C3"). Fix them and and also fix Makefile indent for C1/C2. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ath79: add support for Comfast WR650AC v1/v2Joan Moreau2019-08-091-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a dual band 11a/11n router with 1x wan and 4x gig lan ports. There are two versions of this router which can be identified through the factory web interface, v1 has 128mb ram and a uboot size of 128k, v2 has 256mb ram and a uboot size of 256k, the remaining hardware and PCB markings are the same. Short specification: SoC: Qualcomm Atheros QCA9558 - 720 MHz Switch: Atheros AR8327 Second radio : Qualcomm Atheros QCA9880 802.11ac 4 LAN/1 WAN 1000Mps Ethernet 256 MB of RAM (DDR2) 16 MB of FLASH 3x2.4 GHz, 3x5GHz antennas Steps to install : Option A : Use vendor UI Option B (if A is not working) : (a) Download 'backup' from vendor UI and rename it backup.tar.gz (b) Open the archive, and update the root password in /etc/shadow by '$1$9wX3HGfB$X5Sb3kqzzBLdKRUR2kfFd0' (c) 'Restore' from the archive using the vendor UI. Root password is now 'aaa' (d) Scp the firwmware to the device: $ scp <openwrt-sysupgrade>.bin root@192.168.1.1:/ (d) ssh to the device and flash the firmware: $ cd / $ mtd -e firmware -r write <openwrt-sysupgrade>.bin firmware Signed-off-by: Gareth Parker <gareth41@orcon.net.nz> Signed-off-by: Ding Tengfei <dtf@comfast.cn> Signed-off-by: Joan Moreau <jom@grosjo.net> [reformatted commit message] Signed-off-by: David Bauer <mail@david-bauer.net>
* ath79: add support for Comfast E314N-v2Joan Moreau2019-08-091-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Taken code from https://patchwork.ozlabs.org/patch/884850/ that was never pushed by the author, and adapted to ath79. The Comfast E314N-V2 is a 2.4 GHz 2x2 radio with a built-in directional antenna and a second Ethernet port - very similar to the Ubiquiti NanoStation M2. The Ethernet port features a pass-through PoE capability, enabled or disabled with a slide switch. Specifications : - System-On-Chip: Qualcomm/Atheros QCA9531 - CPU/Speed: 650 MHz - Flash size: 8 MiB - RAM: 64 MiB - 2 Ethernet 1Gbp - 1 reset button - 1 switch to choose PoE from LAN or Wan. 48Vdc - Wifi 2.4 Ghz (b/g/n) - UART inside the box (3.3V, pins marked on the PCB) Firmware can be flashed on these units by the following method: 1.) Apply power to the unit 2.) Immediately AFTER applying power, hold down the reset button 3.) The WAN, LAN, and wireless lights will flash - wait three seconds (three flashes) and then release the button. 4.) After a second, the lights will flutter quickly and the unit will be visible at 192.168.1.1. A web page will be available to enable quick and simple uploading and flashing of firmware. During the boot process, these units also look for a tftp server at 192.168.1.10. If one is present, the firmware can be uploaded as a file called firmware-auto.bin Signed-off-by: Joan Moreau <jom@grosjo.net> [wrapped commit message - fix commit title capitalization] Signed-off-by: David Bauer <mail@david-bauer.net>
* ath79: add support for PISEN WMB001NChuanhong Guo2019-08-081-0/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Specifications: - SoC: AR9341 - RAM: 64M - Flash: 16M - Ethernet: 1 * FE port - WiFi: ar934x-wmac - Sound: WM8918 DAC 1 * 3.5mm headphone jack 2 * RCA connectors for speakers 1 * SPDIF out - USB: 1 * USB2.0 port Flash instruction: Upload generated factory image via vendor's web interface. Notes: A. Audio stuff: 1. Since AR934x, all pins for peripheral blocks can be mapped to any available GPIOs. We currently don't have a PCM/I2S driver for AR934x so pinmux for i2s and SPDIF are bound to i2c gpio node. This should be moved into I2S node when a PCM/I2S driver is available. 2. The i2c-gpio node is for WM8918. DT binding for it can't be added currently due to a missing clock from I2S PLL. B. Factory image: Image contains a image header and a tar.gz archive. 1. Header: A 288 byte header that has nothing to do with appended tarball. Format: 0x0-0x7 and 0x18-0x1F: magic values 0x20: Model number string 0xFC: Action string. It's either "update" or "backup" 0x11C: A 1 byte checksum. It's XOR result of 0x8-0x11B Firmware doesn't care about the rest of the header as long as checksum result is correct. The same header is used for backup and update routines so the magic values and model number can be obtained by generating a backup bin and grab values from it. 2. Tarball: It contains two files named uImage and rootfs, which will be flashed into corresponding mtd partition. Writing a special utility that can only output a fixed binary blob is overkill so factory image header is placed under image/bin instead. C. LED The wifi led has "Wi-Fi" marked on the case but vendor's firmware used it as system status indicator. I did the same in this device support patch. D. Firmware Factory u-boot is built without 'savenv' support so it's impossible to change kernel offset. A 2MB kernel partition won't be enough in the future. OKLI loader is used here to migrate this problem: 1. add OKLI image magic support into uImage parser. 2. build an OKLI loader, compress it with lzma and add a normal uImage header. 3. flash the loader to where the original kernel supposed to be. 4. create a uImage firmware using OKLI loader. 5. flash the created firmware to where rootfs supposed to be. By doing so, u-boot will start OKLI loader, which will then load the actual kernel at 0x20000. The kernel partition is 2MB, which is too much for our loader. To save this space, "mtd-concat" is used here: 1. create a 64K (1 erase block) partition for OKLI loader and create another partition with the left space. 2. concatenate rootfs and this partition into a virtual flash. 3. use the virtual flash for firmware partition. Currently OKLI loader is flashed with factory image only. sysupgrade won't replace it. Since it only has one function and it works for several years, its unlikely to have some bugs that requires a replacement. Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
* ath79: add support for D-Link DIR-842 C3Perry Melange2019-08-071-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Hardware spec of DIR-842 C3: SoC: QCA9563 DRAM: 128MB DDR2 Flash: 16MB SPI-NOR Switch: QCA8337N WiFi 5.8GHz: QCA9888 WiFi 2.4Ghz: QCA9563 USB: circuit onboard, but components are not soldered Flash instructions: 1. Upgrade the factory.bin through the factory web interface or the u-boot failsafe interface. The firmware will boot up correctly for the first time. Do not power off the device after OpenWrt has booted. Otherwise the u-boot will enter failsafe mode as the checksum of the firmware has been changed. 2. Upgrade the sysupgrade.bin in OpenWrt. After upgrading completes the u-boot won't complain about the firmware checksum and it's OK to use now. 3. If you powered off the device before upgrading the sysupgrade.bin, just upgrade the factory.bin through the u-boot failsafe interface and then goto step 2. Signed-off-by: Perry Melange <isprotejesvalkata@gmail.com>
* ath79: add support for D-Link DIR-842 C1Jackson Lim2019-08-051-3/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Hardware spec of DIR-842 C1: SoC: QCA9563 DRAM: 128MB DDR2 Flash: 16MB SPI-NOR Switch: QCA8337N WiFi 5.8GHz: QCA9888 WiFi 2.4Ghz: QCA9563 USB: circuit onboard, but components are not soldered Flash instructions: 1. Upgrade the factory.bin through the factory web interface or the u-boot failsafe interface. The firmware will boot up correctly for the first time. Do not power off the device after OpenWrt has booted. Otherwise the u-boot will enter failsafe mode as the checksum of the firmware has been changed. 2. Upgrade the sysupgrade.bin in OpenWrt. After upgrading completes the u-boot won't complain about the firmware checksum and it's OK to use now. 3. If you powered off the device before upgrading the sysupgrade.bin, just upgrade the factory.bin through the u-boot failsafe interface and then goto step 2. Signed-off-by: Jackson Lim <jackcolentern@gmail.com> [fix whitespace issues] Signed-off-by: David Bauer <mail@david-bauer.net>
* ath79: add support for ALFA Network AP121FRoger Pueyo Centelles2019-07-311-0/+10
| | | | | | | | | | | | | This commit ports support for the ALFA Network AP121F, a pocket-size router with 1 Ethernet and 2.4 GHz WiFi based on the AR9331 SoC, to the ath79 target (it was already supported in ar71xx; see commit 0c6165d2 for more details). Signed-off-by: Roger Pueyo Centelles <roger.pueyo@guifi.net> [pepe2k@gmail.com: fixed GPIO polarity, included USB support, changed DTS nodes order, moved WLAN LED trigger define to DTS, made U-Boot env partition writable] Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
* ath79: add support for D-Link DIR-842 C2Jackson Lim2019-07-241-0/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Hardware spec of DIR-842 C2: SoC: QCA9563 DRAM: 128MB DDR2 Flash: 16MB SPI-NOR Switch: QCA8337N WiFi 5.8GHz: QCA9888 WiFi 2.4Ghz: QCA9563 USB: 2.0 Flash instructions: 1. Upgrade the factory.bin through the factory web interface or the u-boot failsafe interface. The firmware will boot up correctly for the first time. Do not power off the device after OpenWrt has booted. Otherwise the u-boot will enter failsafe mode as the checksum of the firmware has been changed. 2. Upgrade the sysupgrade.bin in OpenWrt. After upgrading completes the u-boot won't complain about the firmware checksum and it's OK to use now. 3. If you powered off the device before upgrading the sysupgrade.bin, just upgrade the factory.bin through the u-boot failsafe interface and then goto step 2. Signed-off-by: Jackson Lim <jackcolentern@gmail.com> [Reword reset-hog comment, fix formatting] Signed-off-by: David Bauer <mail@david-bauer.net>
* ath79: modify device name of I-O DATA WN-AC1600DGR2INAGAKI Hiroshi2019-07-181-3/+4
| | | | | | | | | | | | | | | | | | | | | | | The hardware of I-O DATA WN-AC1600DGR3 has completely compatibility with WN-AC1600DGR2, so modify the device name of WN-AC1600DGR2 to show the images for DGR2 also support DGR3. Specification of WN-AC1600DGR3: - SoC : Qualcomm Atheros QCA9557 - RAM : DDR2 128 MiB - Flash : SPI-NOR 16 MiB - WLAN : 2.4/5 GHz - 2.4 GHz : QCA9557 (SoC), 2T2R - 5 Ghz : QCA9880, 3T3R - Ethernet : 5x 10/100/1000 Mbps - Switch : QCA8337N - LEDs/Input : 6x/6x (4x buttons, 1x slide-switch) - UART : through-hole on PCB - J1: Vcc, GND, TX, RX from ethernet port side - 115200n8 Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
* ath79: add support for Trendnet TEW-823DRUPramod Pancha2019-07-181-0/+16
| | | | | | | | | | | | | | | | | | | | | Trendnet TEW-823DRU is a dual-band AC1750 router. The router is based on Qualcomm/Atheros QCA9558 + QCA9880. Specification: 720 MHz CPU 256 MB of RAM 16 MB of FLASH 3T3R 2.4 GHz 3T3R 5 GHz 5x 10/100/1000 Mbps Ethernet Firmware can be flashed from the web interface. Tested on 3 routers with no issues. Signed-off-by: Pramod Pancha <pancha@vill.com> [whitespace fixes] Signed-off-by: Petr Štetiar <ynezz@true.cz>
* ath79: add support for Bluesocket BSAP1880 boardDaniel Gimpelevich2019-07-171-0/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This board was used in dual-band 802.11n enterprise access points, models BSAP-1800v2 and BSAP-1840, introduced in 2010 by Bluesocket, which was acquired by Adtran in 2011, who has now EOL'ed them. They differed only in that the BSAP-1840's antennae were detachable, while the BSAP-1800v2's were inside the case. They have an external RJ-45 console port, which works with standard Cisco 72-3383-01 console cables. Specification: - System-On-Chip: AR7161 - CPU/Speed: 600 MHz - Flash-Chip: Macronix MX25L12845E - Flash size: 16 MiB - RAM: 64 MiB - Wireless No1: Lite-On WN2601A card: AR9160/AR9103 2.4GHz 802.11bgn - Wireless No2: Lite-On WN2502A card: AR9160/AR9106 5GHz 802.11an - PHY: Vitesse VSC8601, Rev. B Installation: 1. Connect to the serial console using a terminal that supports YMODEM at 115200 bps, 8 data bits, no parity, 1 stop bit 2. Interrupt the bootloader using its password, which is: r00t 3. Issue the "fis init" command, confirming if prompted 4. Look at the length of the openwrt-ath79-generic-*-squashfs-kernel.bin file, and substitute it below, instead of where I have "LeNgTh" 5. Issue the following command, and upload this file using YMODEM protocol load -r -v -b 0x80060000 -m ymodem 6. Issue the following commands, substituting as mentioned above: fis create -b 0x80060000 -l LeNgTh vmlinux_2 load -r -v -b 0x80100000 -m ymodem 7. Using YMODEM, upload openwrt-ath79-generic-*-squashfs-rootfs.bin 8. Issue the "fis free" command, and for the first range in its response, use a hexadecimal calculator to subtract the start from the end in order to substitute it below, with the leading "0x" to specify it in hexadecimal, instead of where I have "LeNgTh" 9. Issue the following commands, substituting as mentioned above: fis create -b 0x80100000 -l LeNgTh -e 0 -r 0 rootfs reset 10.Wait for the status LED to go solid green Tested-by: Brian Gonyer <bgonyer@gmail.com> Signed-off-by: Daniel Gimpelevich <daniel@gimpelevich.san-francisco.ca.us> [fixed obsolete $ARGV in platform_do_upgrade] Signed-off-by: Petr Štetiar <ynezz@true.cz>