You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

537 lines
13 KiB
Plaintext

#!/bin/sh
. /lib/functions/system.sh
. /lib/functions/uci-defaults.sh
. /lib/functions/k2t.sh
ath79_setup_interfaces()
{
local board="$1"
case "$board" in
ath79: add support for Bluesocket BSAP1880 board 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>
6 years ago
adtran,bsap1800-v2|\
adtran,bsap1840|\
alfa-network,ap121f|\
aruba,ap-105|\
avm,fritz1750e|\
avm,fritz300e|\
ath79: add support for AVM FRITZ!WLAN Repeater DVB-C This commit adds support for the AVM FRITZ!WLAN Repeater DVB-C SOC: Qualcomm Atheros QCA9556 RAM: 64 MiB FLASH: 16 MB SPI-NOR WLAN: QCA9556 3T3R 2.4 GHZ b/g/n and QCA9880 3T3R 5 GHz n/ac ETH: Atheros AR8033 1000 Base-T DVB-C: EM28174 with MaxLinear MXL251 tuner BTN: WPS Button LED: Power, WLAN, TV, RSSI0-4 Tested and working: - Ethernet (correct MAC, gigabit, iperf3 about 200 Mbit/s) - 2.4 GHz Wi-Fi (correct MAC) - 5 GHz Wi-Fi (correct MAC) - WPS Button (tested using wifitoggle) - LEDs - Installation via EVA bootloader (FTP recovery) - OpenWrt sysupgrade (both CLI and LuCI) - Download of "urlader" (mtd0) Not working: - Internal USB - DVB-C em28174+MxL251 (depends on internal USB) Installation via EVA bootloader (FTP recovery): Set NIC to 192.168.178.3/24 gateway 192.168.178.1 and power on the device, connect to 192.168.178.1 through FTP and sign in with adam2/adam2: ftp> quote USER adam2 ftp> quote PASS adam2 ftp> binary ftp> debug ftp> passive ftp> quote MEDIA FLSH ftp> put openwrt-sysupgrade.bin mtd1 Wait for "Transfer complete" together with the transfer details. Wait two minutes to make sure flash is complete (just to be safe). Then restart the device (power off and on) to boot into OpenWrt. Revert your NIC settings to reach OpenWrt at 192.168.1.1 Signed-off-by: Natalie Kagelmacher <nataliek@pm.me> [fixed sorting - removed change to other board - prettified commit message] Signed-off-by: David Bauer <mail@david-bauer.net>
4 years ago
avm,fritzdvbc|\
ath79: add support for Comfast CF-WR752AC v1 Specifications: - Qualcomm QCA9531 + QCA9886 - dual band, antenna 2*3dBi - Output power 50mW (17dBm) - 1x 10/100 Mbps LAN RJ45 - 128 MB RAM / 16 MB FLASH (w25q128) - 3 LEDs (red/green/blue) incorporated in "color wheel reset switch" - UART 115200 8N1 Flashing instructions: 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. Alternatively, 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, until it starts flashing. Once in failsafe mode, perform a factory reset as usual. LED-Info: The LEDs on the Comfast stock fw have a very proprietary behaviour, corresponding to the user selected working mode (AP, ROUTER or REPEATER). In the first two cases, only blue is used for status and LAN signaling. When using the latter, blue is always off (except for sysupgrade), either red signals bad rssi on master-link, or green good. Since the default working mode of OpenWrt resembles that of a router/AP, the default behavior is implemented accordingly. MAC addresses (art partition): location address (example) use in vendor firmware 0x0 xx:xx:xx:xx:xc:f8 -> eth0 0x6 xx:xx:xx:xx:xc:fa -> wlan5g (+2) 0x1002 xx:xx:xx:xx:xc:f9 -> not used 0x5006 xx:xx:xx:xx:xc:fb -> not used --- xx:xx:xx:xx:xd:02 -> wlan2g (+10) The same strange situation has already been observed and documented for COMFAST CF-E560AC. Signed-off-by: Roman Hampel <rhamp@arcor.de> Co-developed-by: Joao Albuquerque <joaohccalbu@gmail.com> Signed-off-by: Joao Albuquerque <joaohccalbu@gmail.com> [adjust and extend commit message, rebase, minor DTS adjustments, add correct MAC address for wmac, change RSSI LED names and behavior] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
comfast,cf-wr752ac-v1|\
comfast,cf-e130n-v2|\
devolo,dvl1200i|\
devolo,dvl1750c|\
devolo,dvl1750i|\
devolo,dvl1750x|\
dlink,dir-505|\
engenius,ecb1750|\
enterasys,ws-ap3705i|\
glinet,gl-ar300m-lite|\
netgear,ex6400|\
netgear,ex7300|\
ocedo,koala|\
ocedo,raccoon|\
pcs,cap324|\
pisen,ts-d084|\
ath79: add support for PISEN WMB001N 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>
5 years ago
pisen,wmb001n|\
pisen,wmm003n|\
siemens,ws-ap3610|\
tplink,cpe210-v2|\
tplink,cpe210-v3|\
tplink,cpe510-v2|\
tplink,cpe510-v3|\
tplink,cpe610-v1|\
tplink,cpe610-v2|\
tplink,re350k-v1|\
tplink,re355-v1|\
tplink,re450-v1|\
tplink,re450-v2|\
tplink,re450-v3|\
ath79: add support for TP-Link TL-WR902AC v1 TP-Link TL-WR902AC v1 is a pocket-size, dual-band (AC750), successor of TL-MR3020 (both devices use very similar enclosure, in same size). New device is based on Qualcomm QCA9531 v2 + QCA9887. FCC ID: TE7WR902AC. Specification: - 650/391/216 MHz (CPU/DDR/AHB) - 1x 10/100 Mbps Ethernet - 1x USB 2.0 (GPIO-controlled power) - 64 MB of RAM (DDR2) - 8 MB of FLASH - 2T2R 2.4 GHz (QCA9531) - 1T1R 5 GHz (QCA9887) - 5x LED (GPIO-controlled), 2x button, 1x 3-pos switch - UART pads on PCB (TP1 -> TX, TP2 -> RX, TP3 -> GND, TP4 -> 3V3, jumper resitors are missing on TX/RX lines) - 1x micro USB (for power only) Flash instructions: Use "factory" image under vendor GUI. Recovery instructions: This device contains tftp recovery mode inside U-Boot. You can use it to flash OpenWrt (use "factory" image) or vendor firmware. 1. Configure PC with static IP 192.168.0.66/24 and tftp server. 2. Rename "openwrt-ath79-generic-tplink_tl-wr902ac-v1-squashfs-factory.bin" to "wr902acv1_un_tp_recovery.bin" and place it in tftp server dir. 3. Connect PC with LAN port, press the reset button, power up the router and keep button pressed until WPS LED lights up. 4. Router will download file from server, write it to flash and reboot. MAC Address summary: - wlan1 (2.4GHz Wi-Fi): Label MAC - wlan0 (5GHz Wi-Fi): Offset -1 from label - eth0 (Wired): Offset +1 from label Root access over serial line in vendor firmware: root/sohoadmin. Based on support in ar71xx target by: Piotr Dymacz <pepe2k@gmail.com> Signed-off-by: Lech Perczak <lech.perczak@gmail.com> [remove size-cells from gpio-export] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
5 years ago
tplink,tl-wr902ac-v1|\
ath79: add support for ubnt_bullet-m-ar7240 variant This adds support for the Ubiquiti Bullet M (AR7240). Specifications: - AR7240 SoC @ 400 MHz - 32 MB RAM - 8 MB SPI flash - 1x 10/100 Mbps Ethernet, 24 Vdc PoE-in - External antenna - POWER/LAN green LEDs - 4x RSSI LEDs (red, orange, green, green) - UART (115200 8N1) on PCB Flashing via WebUI: Upload the factory image via the stock firmware web UI. Attention: airOS firmware versions >= 5.6 have a new bootloader with an incompatible partition table! Please downgrade to <= 5.5 _before_ flashing OpenWrt! Refer to the device's Wiki page for further information. Flashing via TFTP: Same procedure as other Ubiquiti M boards. - Use a pointy tool (e.g., pen cap, paper clip) and keep the reset button on the device or on the PoE supply pressed - Power on the device via PoE (keep reset button pressed) - Keep pressing until LEDs flash alternatively LED1+LED3 => LED2+LED4 => LED1+LED3, etc. - Release reset button - The device starts a TFTP server at 192.168.1.20 - Set a static IP on the computer (e.g., 192.168.1.21/24) - Upload via tftp the factory image: $ tftp 192.168.1.20 tftp> bin tftp> trace tftp> put openwrt-ath79-generic-xxxxx-ubnt_bullet-m-ar7240-squashfs-factory.bin The "fixed-link" section of the device tree is needed to avoid errors like this: Generic PHY mdio.0:1f:04: Master/Slave resolution failed, maybe conflicting manual settings? With "fixed-link", the errors go away and eth0 comes up reliably. Signed-off-by: Russell Senior <russell@personaltelco.net> [fix SUPPORTED_DEVICES] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
ubnt,bullet-m-ar7240|\
ubnt,bullet-m-ar7241|\
ubnt,bullet-m-xw|\
ubnt,lap-120|\
ubnt,litebeam-ac-gen2|\
ath79: Add support for Ubiquiti NanoBeam AC The NanoBeam is a small AR9342 based directional 5 GHz AC CPE with hardware almost identical to the Ubiquiti NanoStation AC loco. Over the NanoStation AC loco it has 5 additional LEDs. Four of those LEDs are used as rssi indicators, the fifth LED is used as an ethernet link/activity indicator. CPU: Atheros AR9342 SoC RAM: 64 MB DDR2 Flash: 16 MB NOR SPI WLAN: QCA988X Ports: 1x GbE Flashing procedure is identical to the NanoStation AC loco and can be performed either via serial or the factory firmware upgrade. Serial flashing: 1. Connect to serial header on device (8N1 115200) 2. Power on device and enter uboot console 3. Set up tftp server serving an openwrt initramfs build 4. Load initramfs build using the command tftpboot in the uboot cli 5. Boot the loaded image using the command bootm 6. Copy squashfs openwrt sysupgrade build to the booted device 7. Use mtd to write sysupgrade to partition "firmware" 8. Reboot and enjoy Flashing through factory firmware: 1. Ensure firmware version v8.5.0.36727 is installed. Up/downgrade to this exact version. 2. Patch fwupdate.real binary using `hexdump -Cv /bin/ubntbox | sed 's/14 40 fe fe/00 00 00 00/g' | hexdump -R > /tmp/fwupdate.real` 3. Make the patched fwupdate.real binary executable using `chmod +x /tmp/fwupdate.real` 4. Copy the squashfs factory image to /tmp on the device 5. Flash OpenWRT using `/tmp/fwupdate.real -m <squashfs-factory image>` 6. Wait for the device to reboot Thanks to @cybermaus for testing! Tested-by: Maurits van Dueren den Hollander <cybermaus@gmail.com> Signed-off-by: Tobias Schramm <tobleminer@gmail.com>
5 years ago
ubnt,nanobeam-ac|\
ath79: add support for Ubiquiti NanoBridge M (XM) This patch adds support for the Ubiquiti NanoBridge M (XM), a 802.11n wireless with a feed+dish form factor, with the same board definition as the Bullet M (XM). Specifications: - Atheros AR7241 SoC - 32 MB RAM - 8 MB SPI flash - 1x 10/100 Mbps Ethernet port, 24 Vdc PoE-in - Power and LAN green LEDs - 4x RSSI LEDs (red, orange, green, green) - UART (115200 8N1) Flashing via stock GUI: - WARNING: flashing OpenWrt from AirOS v5.6 or newer will brick your device! Read the wiki for more info. - Downgrade to AirOS v5.5.x (latest available is 5.5.11) first. - Upload the factory image via AirOS web GUI. Flashing via TFTP: - WARNING: flashing OpenWrt from AirOS v5.6 or newer will brick your device! Read the wiki for more info. - Downgrade to AirOS v5.5.x (latest available is 5.5.11) first. - Use a pointy tool (e.g., pen cap, slotted screwdriver) to keep the reset button pressed. - Power on the device (keep reset button pressed). - Keep pressing until LEDs flash alternatively LED1+LED3 => LED2+LED4 => LED1+LED3, etc. - Release reset button. - The device starts a TFTP server at 192.168.1.20. - Set a static IP on the computer (e.g., 192.168.1.21/24). - Upload via tftp the factory image: $ tftp 192.168.1.20 tftp> bin tftp> trace tftp> put openwrt-ath79-generic-xxxxx-ubnt_nanobridge-m-squashfs-factory.bin Signed-off-by: Roger Pueyo Centelles <roger.pueyo@guifi.net> [rebase, fix includes in DTS, add label MAC address, add SOC and fix sorting in generic-ubnt.mk] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
ubnt,nanobridge-m|\
ubnt,nanostation-ac-loco|\
ath79: add support for Ubiquiti Nanostation Loco M (XM) This adds support for the Ubiquiti Nanostation Loco M (XM), which has the same board/LEDs as the Bullet M XM, but different case and antennas. Specifications: - AR7241 SoC @ 400 MHz - 32 MB RAM - 8 MB SPI flash - 1x 10/100 Mbps Ethernet, 24 Vdc PoE-in - NS Loco M2: built-in antenna: 8 dBi; AR9287 - NS Loco M5: built-in antenna: 13 dBi; 2T2R 5 GHz radio - POWER/LAN green LEDs - 4x RSSI LEDs (red, orange, green, green) - UART (115200 8N1) on PCB Flashing via WebUI: Upload the factory image via the stock firmware web UI. Note that only certain firmware versions accept unsigned images. Refer to the device's Wiki page for further information. Flashing via TFTP: Same procedure as other NanoStation M boards. - Use a pointy tool (e.g., pen cap, paper clip) and keep the reset button on the device or on the PoE supply pressed - Power on the device via PoE (keep reset button pressed) - Keep pressing until LEDs flash alternatively LED1+LED3 => LED2+LED4 => LED1+LED3, etc. - Release reset button - The device starts a TFTP server at 192.168.1.20 - Set a static IP on the computer (e.g., 192.168.1.21/24) - Upload via tftp the factory image: $ tftp 192.168.1.20 tftp> bin tftp> trace tftp> put openwrt-ath79-generic-xxxxx-ubnt_nanostation-loco-m-squashfs-factory.bin Tested on NanoStation Loco M2. Signed-off-by: Sven Roederer <freifunk@it-solutions.geroedel.de> Co-developed-by: Adrian Schmutzler <freifunk@adrianschmutzler.de> Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
ubnt,nanostation-loco-m|\
ubnt,nanostation-loco-m-xw|\
ubnt,picostation-m|\
ubnt,powerbeam-5ac-500|\
ubnt,powerbeam-5ac-gen2|\
ubnt,rocket-m|\
ubnt,unifiac-lite|\
ubnt,unifiac-lr|\
ubnt,unifiac-mesh|\
ubnt,unifi|\
wd,mynet-wifi-rangeextender|\
winchannel,wb2000)
ucidef_set_interface_lan "eth0"
;;
avm,fritz4020|\
pcs,cr3000|\
tplink,archer-c58-v1|\
tplink,archer-c59-v1|\
tplink,archer-c59-v2)
ucidef_set_interface_wan "eth1"
ucidef_add_switch "switch0" \
"0@eth0" "1:lan:1" "2:lan:4" "3:lan:3" "4:lan:2"
;;
buffalo,bhr-4grv|\
buffalo,wzr-hp-g450h)
ucidef_add_switch "switch0" \
"0@eth0" "2:lan" "3:lan" "4:lan" "5:lan" "1:wan"
;;
buffalo,bhr-4grv2|\
trendnet,tew-823dru)
ucidef_add_switch "switch0" \
"0@eth1" "1:lan" "2:lan" "3:lan" "4:lan" "5:wan" "6@eth0"
;;
buffalo,wzr-hp-ag300h|\
tplink,archer-c25-v1|\
tplink,archer-c60-v1|\
tplink,archer-c60-v2|\
ath79: add support for TP-Link Archer C60 v3 TP-Link Archer C60 v3 is a dual-band AC1350 router, based on Qualcomm/Atheros QCA9561 + QCA9886. It seems to be identical to the v2 revision, except that it lacks a WPS LED and has different GPIO for amber WAN LED. Specification: - 775/650/258 MHz (CPU/DDR/AHB) - 64 MB of RAM (DDR2) - 8 MB of FLASH (SPI NOR) - 3T3R 2.4 GHz - 2T2R 5 GHz - 5x 10/100 Mbps Ethernet - 6x LED, 2x button - UART header on PCB Flash instruction (WebUI): Download *-factory.bin image and upload it via the firmwary upgrade function of the stock firmware WebUI. Flash instruction (TFTP): 1. Set PC to fixed IP address 192.168.0.66 2. Download *-factory.bin image 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 While TFTP works for OpenWrt images, my device didn't accept the only available official firmware "Archer C60(EU)_V3.0_190115.bin". In contrast to earlier revisions (v2), the v3 contains the (same) MAC address twice, once in 0x1fa08 and again in 0x1fb08. While the partition-table on the device refers to the latter, the firmware image contains a different partition-table for that region: name device firmware factory-boot 0x00000-0x1fb00 0x00000-0x1fa00 default-mac 0x1fb00-0x1fd00 0x1fa00-0x1fc00 pin 0x1fd00-0x1fe00 0x1fc00-0x1fd00 product-info 0x1fe00-0x1ff00 0x1fd00-0x1ff00 device-id 0x1ff00-0x20000 0x1ff00-0x20000 While the MAC address is present twice, other data like the PIN isn't, so with the partitioning from the firmware image the PIN on the device would actually be outside of its partition. Consequently, the patch uses the MAC location from the device (which is the same as for the v2). Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
tplink,archer-c60-v3|\
tplink,tl-wdr3500-v1|\
tplink,tl-wr842n-v1|\
tplink,tl-wr842n-v3|\
ubnt,airrouter)
ucidef_set_interface_wan "eth1"
ucidef_add_switch "switch0" \
"0@eth0" "1:lan:4" "2:lan:3" "3:lan:2" "4:lan:1"
;;
buffalo,wzr-hp-g302h-a1a0)
ucidef_add_switch "switch0" \
"0@eth0" "1:lan:1" "3:lan:4" "4:lan:3" "5:lan:2" "2:wan"
;;
comfast,cf-e110n-v2|\
comfast,cf-e120a-v3|\
comfast,cf-e314n-v2|\
compex,wpj531-16m|\
tplink,cpe210-v1|\
tplink,cpe220-v2|\
tplink,cpe220-v3|\
tplink,cpe510-v1|\
tplink,wbs210-v1|\
tplink,wbs210-v2|\
tplink,wbs510-v1|\
tplink,wbs510-v2|\
ubnt,nanostation-m|\
ubnt,routerstation)
ucidef_set_interfaces_lan_wan "eth1" "eth0"
;;
comfast,cf-e560ac)
ath79: add support for COMFAST CF-E560AC 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>
4 years ago
ucidef_set_interface_wan "eth1"
ucidef_add_switch "switch0" \
"0@eth0" "1:lan" "2:lan" "3:lan" "4:lan"
;;
comfast,cf-wr650ac-v1|\
comfast,cf-wr650ac-v2)
ucidef_add_switch "switch0" \
"0@eth0" "1:lan" "2:lan" "3:lan" "4:lan" "5:wan" "6@eth1"
;;
ath79: add support for Compex WPJ344 Specifications: SoC: AR9344 DRAM: 128MB DDR2 Flash: 16MB SPI-NOR 2 Gigabit ethernet ports 2×2 2.4GHz on-board radio miniPCIe slot that supports 5GHz radio PoE 48V IEEE 802.3af/at - 24V passive optional USB 2.0 header Installation: To install, either start tftp in bin/targets/ath79/generic/ and use the u-boot prompt over UART: tftpboot 0x80500000 openwrt-ath79-generic-compex_wpj344-16m-squashfs-sysupgrade.bin erase 0x9f030000 +$filesize erase 0x9f680000 +1 cp.b $fileaddr 0x9f030000 $filesize boot The cpximg file can be used with sysupgrade in the stock firmware (add SSH key in luci for root access) or with the built-in cpximg loader. The cpximg loader can be started either by holding the reset button during power up or by entering the u-boot prompt and entering 'cpximg'. Once it's running, a TFTP-server under 192.168.1.1 will accept the image appropriate for the board revision that is etched on the board. For example, if the board is labelled '6A08': tftp -v -m binary 192.168.1.1 -c put openwrt-ath79-generic-compex_wpj344-16m-squashfs-cpximg-6a08.bin MAC addresses: <&uboot 0x2e010> *:99 (label) <&uboot 0x2e018> *:9a <&uboot 0x2e020> *:9b <&uboot 0x2e028> *:9c Only the first two are used (for ethernet), the WiFi modules have separate (valid) addresses. The latter two addresses are not used. Signed-off-by: Leon M. George <leon@georgemail.eu> [minor commit message adjustments, drop gpio in DTS, DTS style fixes, sorting, drop unused cpximg recipe] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
5 years ago
compex,wpj344-16m)
ucidef_add_switch "switch0" \
"0@eth0" "3:lan" "2:wan"
;;
devolo,dvl1200e|\
devolo,dvl1750e|\
ocedo,ursus)
ucidef_set_interface_lan "eth0 eth1"
;;
ath79: add support for Devolo Magic 2 WIFI 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>
5 years ago
devolo,magic-2-wifi)
ucidef_add_switch "switch0" \
"0@eth0" "2:wan" "3:lan" "4:lan"
;;
ath79: add support for D-Link DAP-2695-A1 Hardware: * SoC: Qualcomm Atheros QCA9558 * RAM: 256MB * Flash: 16MB SPI NOR * Ethernet: 2x 10/100/1000 (1x 802.3at PoE-PD) * WiFi 2.4GHz: Qualcomm Atheros QCA9558 * WiFi 5GHz: Qualcomm Ahteros QCA9880-2R4E * LEDS: 1x 5GHz, 1x 2.4GHz, 1x LAN1(POE), 1x LAN2, 1x POWER * Buttons: 1x RESET * UART: 1x RJ45 RS-232 Console port Installation via stock firmware: * Install the factory image via the stock firmware web interface Installation via bootloader Emergency Web Server: * Connect your PC to the LAN1(PoE) port * Configure your PC with IP address 192.168.0.90 * Open a serial console to the Console port (115200,8n1) * Press "q" within 2s when "press 'q' to stop autoboot" appears * Open http://192.168.0.50 in a browser * Upload either the factory or the sysupgrade image * Once you see "write image into flash...OK,dest addr=0x9f070000" you can power-cycle the device. Ignore "checksum bad" messages. Setting the MAC addresses for the ethernet interfaces via /etc/board.d/02_network adds the following snippets to /etc/config/network: config device 'lan_eth0_1_dev' option name 'eth0.1' option macaddr 'xx:xx:xx:xx:xx:xx' config device 'wan_eth1_2_dev' option name 'eth1.2' option macaddr 'xx:xx:xx:xx:xx:xx' This would result in the proper MAC addresses being set for the VLAN subinterfaces, but the parent interfaces would still have a random MAC address. Using untagged VLANs could solve this, but would still leave those extra snippets in /etc/config/network, and then the device VLAN setup would differ from the one used in ar71xx. Therefore, the MAC addresses of the ethernet interfaces are being set via preinit instead. The bdcfg partition contains 4 MAC address labels: - lanmac - wanmac - wlanmac - wlanmac_a The first 3 all contain the same MAC address, which is also the one on the label. Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be> Reviewed-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
dlink,dap-2695-a1)
ucidef_add_switch "switch0" "0@eth0" "2:lan" "3:wan" "6@eth1"
;;
dlink,dch-g020-a1)
ucidef_add_switch "switch0" \
"0@eth0" "1:lan:2" "2:lan:1"
;;
dlink,dir-825-b1)
ucidef_set_interface_wan "eth1"
ucidef_add_switch "switch0" \
"0:lan" "1:lan" "2:lan" "3:lan" "5@eth0"
;;
dlink,dir-825-c1|\
dlink,dir-835-a1|\
dlink,dir-842-c1|\
dlink,dir-842-c2|\
dlink,dir-842-c3|\
dlink,dir-859-a1|\
ath79: add suport for EnGenius EPG5000 EnGenius EPG5000 (v1.0.0, marketed as IoT Gateway) is a dual band wireless router. Specification SoC: Qualcomm Atheros QCA9558 RAM: 256 MB DDR2 Flash: 16 MB SPI NOR WIFI: 2.4 GHz 3T3R integrated 5 GHz 3T3R QCA9880 Mini PCIe card Ethernet: 5x 10/100/1000 Mbps QCA8337N USB: 1x 2.0 LEDS: 4x GPIO controlled Buttons: 2x GPIO controlled UART: 4 pin header, 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 Tools > Firmware, 4. Select 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. Alternative installation 1. Prepare TFTP server with OpenWrt sysupgrade image, 2. Connect to one of LAN (yellow) ethernet ports, 3. Connect to UART port (leaving out VCC pin!), 4. Power on router, 5. When asked to enter a number 1 or 3 hit 2, this will select flashing image from TFTP server option, 6. You'll be prompted to enter TFTP server ip (default is 192.168.99.8), then router ip (default is 192.168.99.9) and for last, image name downloaded from TFTP server (default is uImageESR1200_1750), 7. After providing all information U-Boot will start flashing the image, You can observe progress on console, it'll take few minutes and when the Power LED will stop blinking, router is ready for configuration. Additional information 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: aigo3d0a0tdagr useful for creating backup of original firmware. When doing upgrade from OpenWrt ar71xx image, it is recomended to not keep the old configuration. Signed-off-by: Tomasz Maciej Nowak <tomek_n@o2.pl>
5 years ago
engenius,epg5000|\
tplink,archer-c2-v3|\
tplink,tl-wr1043nd-v4|\
tplink,tl-wr1043n-v5)
ucidef_add_switch "switch0" \
"0@eth0" "1:lan:4" "2:lan:3" "3:lan:2" "4:lan:1" "5:wan"
;;
elecom,wrc-1750ghbk2-i|\
ath79: add support for Sitecom WLR-8100 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>
5 years ago
elecom,wrc-300ghbk2-i|\
sitecom,wlr-8100)
ucidef_add_switch "switch0" \
"0@eth0" "2:lan:4" "3:lan:3" "4:lan:2" "5:lan:1" "1:wan"
;;
embeddedwireless,dorin)
ucidef_add_switch "switch0" \
"0@eth0" "1:wan" "2:lan:3" "3:lan:2"
;;
engenius,ews511ap)
ucidef_set_interface_lan "eth0 eth1" "dhcp"
;;
etactica,eg200)
ucidef_set_interface_lan "eth0" "dhcp"
;;
glinet,gl-ar750)
ucidef_set_interface_wan "eth1"
ucidef_add_switch "switch0" \
"0@eth0" "1:lan" "2:lan"
;;
iodata,etg3-r|\
iodata,wn-ac1167dgr|\
ath79: add support for I-O DATA WN-AC1600DGR I-O DATA WN-AC1600DGR is a 2.4/5 GHz band 11ac router, based on Qualcomm Atheros QCA9557. Specification: - SoC: Qualcomm Atheros QCA9557 - RAM: 128 MB - Flash: 16 MB - WLAN: 2.4/5 GHz - 2.4 GHz: 2T2R (SoC internal) - 5 GHz: 3T3R (QCA9880) - Ethernet: 5x 10/100/1000 Mbps - Switch: QCA8337N - LED/key: 6x/6x(4x buttons, 1x slide switch) - UART: through-hole on PCB - Vcc, GND, TX, RX from ethernet port side - 115200n8 Flash instruction using factory image: 1. Connect the computer to the LAN port of WN-AC1600DGR 2. Connect power cable to WN-AC1600DGR and turn on it 3. Access to "http://192.168.0.1/" and open firmware update page ("ファームウェア") 4. Select the OpenWrt factory image and click update ("更新") button 5. Wait ~150 seconds to complete flashing Alternative flash instruction using initramfs image: 1. Prepare a computer and TFTP server software with the IP address "192.168.99.8" and renamed OpenWrt initramfs image "uImageWN-AC1600DGR" 2. Connect between WN-AC1600DGR and the computer with UART 3. Connect power cable to WN-AC1600DGR, press "4" on the serial console and enter the U-Boot console 4. execute "tftpboot" command on the console and download initramfs image from the TFTP server 5. execute "bootm" command and boot OpenWrt 6. On initramfs image, download the sysupgrade image to the device and perform sysupgrade with it 7. Wait ~150 seconds to complete flashing This commit also removes unnecessary "qca,no-eeprom" property from the ath10k wifi node. Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
5 years ago
iodata,wn-ac1600dgr|\
iodata,wn-ac1600dgr2|\
iodata,wn-ag300dgr|\
pcs,cr5000|\
sitecom,wlr-7100|\
wd,mynet-n750)
ucidef_add_switch "switch0" \
"0@eth0" "1:lan" "2:lan" "3:lan" "4:lan" "5:wan"
;;
librerouter,librerouter-v1)
ucidef_add_switch "switch0" \
"0@eth0" "5:wan" "6@eth1" "4:lan"
;;
nec,wg1200cr|\
ubnt,nanostation-ac|\
ath79: add support for YunCore XD4200 and A782 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>
5 years ago
yuncore,a782|\
yuncore,xd4200)
ucidef_add_switch "switch0" \
"0@eth0" "2:lan" "3:wan"
;;
nec,wg800hp)
ucidef_add_switch "switch0" \
"0@eth0" "2:lan" "3:lan" "4:lan" "1:wan"
;;
netgear,wndr3700|\
netgear,wndr3700-v2|\
netgear,wndr3800|\
netgear,wndr3800ch|\
netgear,wndrmac-v1|\
netgear,wndrmac-v2)
ucidef_set_interface_wan "eth1"
ucidef_add_switch "switch0" \
"0:lan:4" "1:lan:3" "2:lan:2" "3:lan:1" "5u@eth0"
ucidef_add_switch_attr "switch0" "blinkrate" 2
ucidef_add_switch_port_attr "switch0" 1 led 6
ucidef_add_switch_port_attr "switch0" 2 led 9
ucidef_add_switch_port_attr "switch0" 5 led 2
;;
netgear,wnr2200-8m|\
netgear,wnr2200-16m)
ucidef_set_interface_wan "eth0"
ucidef_add_switch "switch0" \
"0@eth1" "1:lan" "2:lan" "3:lan" "4:lan"
;;
phicomm,k2t)
ucidef_add_switch "switch0" \
"0@eth0" "3:lan:1" "5:lan:2" "4:wan"
;;
qihoo,c301)
ucidef_set_interface_wan "eth1"
ucidef_add_switch "switch0" \
"0@eth0" "2:lan" "3:lan"
;;
rosinson,wr818)
ucidef_add_switch "switch0" \
"0@eth0" "1:lan" "2:lan" "3:wan"
;;
ath79: add support for Teltonika RUT955 H7V3C0 This board was previously supported in ar71xx as 'RUT9XX'. The difference between that and the other RUT955 board already supported in ath79 is that instead of the SPI shift registers driving the LEDs and digital outputs that model got an I2C GPIO expander instead. To support LEDs during early boot and interrupt-driven digital inputs, I2C support as well as support for PCA953x has to be built-in and cannot be kernel modules, hence select those symbols for ath79/generic. 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 PCA9539) - 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.1". Signed-off-by: Daniel Golle <daniel@makrotopia.org>
4 years ago
teltonika,rut955|\
teltonika,rut955-h7v3c0)
ucidef_set_interface_wan "eth1"
ucidef_add_switch "switch0" \
"0@eth0" "2:lan:3" "3:lan:2" "4:lan:1"
;;
ath79: add support for TP-Link Archer A7 This patch adds support for TP-Link Archer A7 Specification: - SOC: QCA9563 - Flash: 16 MiB (SPI) - RAM: 128 MiB (DDR2) - Ethernet: 4x 1Gbps LAN + 1x 1Gbps WAN - Wireless: - 2.4GHz (bgn) SoC internal - 5GHz (ac) QCA988x - USB: 1x USB 2.0 port - Button: 1x power, 1x reset, 1x wps - LED: 10x LEDs - UART: holes in PCB - Vcc, GND, RX, TX from ethernet port side - 115200n8 Flash instructions: Upload openwrt-ath79-generic-tplink_archer-a7-v5-squashfs-factory.bin via the Webinterface. Flash instruction using tftp recovery: 1. Connect the computer to one of the LAN ports of the Archer A7 2. Set the computer IP to 192.168.0.66 3. Start a tftp server with the OpenWrt factory image in the tftp root directory renamed to ArcherC7v5_tp_recovery.bin 2. Connect power cable to Archer A7, press and hold the reset button and turn the router on 3. Keep the reset button pressed for ~5 seconds 4. Wait ~150 seconds to complete flashing Changes since first revision: - Flash instructions using stock image webinterface - Changed "Version 5" in model string to "v5" - Split DTS file in qca9563_tplink_archer-x7-v5.dtsi and qca9563_tplink_archer-a7-v5.dts - Firmware image is now build with dynamic partitioning - Default to ath10k-ct Changes since second revision: - Changed uboot@0 to uboot@20000 in DTS file - Fixed ordering issue in board led script - Specify firmware partition format in DTS file - Rebased Makefile device definition on common Device/tplink-safeloader-uimage definition - Merged switch section in network script (same configuration as tplink,tl-wdr3600 and tplink,tl-wdr4300) Signed-off-by: Karl-Felix Glatzer <karl.glatzer@gmx.de>
6 years ago
tplink,archer-a7-v5|\
tplink,archer-c6-v2|\
ath79: add support for TP-Link Archer C6 v2 (US) and A6 (US/TW) This patch is based on #1689 and adds support for TP-Link Archer C6 v2 (US) and A6 (US/TW). The hardware is the same as EU and RU variant, except for GPIOs (LEDS/Buttons), flash(chip/partitions) and UART being available on the board. - SOC: Qualcomm QCA9563 @ 775MHz - Flash: GigaDevice GD25Q127CS1G (16MiB) - RAM: Zentel A3R1GE40JBF (128 MiB DDR2) - Ethernet: Qualcomm QCA8337N: 4x 1Gbps LAN + 1x 1Gbps WAN - Wireless: - 2.4GHz (bgn) QCA9563 integrated (3x3) - 5GHz (ac) Qualcomm QCA9886 (2x2) - Button: 1x power, 1x reset, 1x wps - LED: 6x LEDs: power, wlan2g, wlan5g, lan, wan, wps - UART: 115200, 8n1 (header available on board) Known issues: - Wireless: 5GHz is known to have lower RSSI signal, it affects speed and range. Flash instructions: Upload openwrt-ath79-generic-tplink_archer-c6-v2-us-squashfs-factory.bin via the router Web interface. Flash instruction using tftp recovery: 1. Connect the computer to one of the LAN ports of the router 2. Set the computer IP to 192.168.0.66 3. Start a tftp server with the OpenWrt factory image in the tftp root directory renamed to ArcherA6v2_tp_recovery.bin. 4. Connect power cable to router, press and hold the reset button and turn the router on 5. Keep the reset button pressed until the WPS LED lights up 6. Wait ~150 seconds to complete flashing Flash partitioning: I've followed #1689 for defining the partition layout for this patch. The partition named as "tplink" @ 0xfd0000 is marked as read only as it is where some config for stock firmware are stored. On stock firmware those stock partitions starts at 0xfd9400 however I had not been able to make it functional starting on the same address as on stock fw, so it has been partitioned following #1689 and not the stock partition layout for this specific partition. Due to that firmware/rootfs partition lenght is 0xf80000 and not 0xf89400 as stock. According to the GPL code, the EU/RU/JP variant does have different GPIO pins assignment to LEDs and buttons, also the flash memory layout is different. GPL Source Code: https://static.tp-link.com/resources/gpl/gpl-A6v2_us.tar.gz Signed-off-by: Anderson Vulczak <andi@andi.com.br> [wrap commit message, remove soft_ver change for C6 v2 EU, move LED aliases to DTS files, remove dts-v1 in DTSI, node/property reorder in DTSI] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
5 years ago
tplink,archer-c6-v2-us|\
tplink,archer-c7-v4|\
tplink,archer-c7-v5|\
tplink,tl-wdr3600-v1|\
tplink,tl-wdr4300-v1|\
tplink,tl-wdr4300-v1-il|\
tplink,tl-wdr4310-v1)
ucidef_add_switch "switch0" \
"0@eth0" "2:lan:1" "3:lan:2" "4:lan:3" "5:lan:4" "1:wan"
;;
tplink,archer-c5-v1|\
tplink,archer-c7-v1|\
tplink,archer-c7-v2|\
tplink,tl-wdr4900-v2)
ucidef_add_switch "switch0" \
"0@eth1" "2:lan" "3:lan" "4:lan" "5:lan" "6@eth0" "1:wan"
;;
tplink,archer-d50-v1)
ucidef_add_switch "switch0" \
"0@eth0" "2:lan:3" "3:lan:2" "4:lan:1" "1:wan"
;;
ath79: add support for TP-Link Archer D7/D7b v1 TP-Link Archer D7 v1 is a dual-band AC1750 router + modem. The router section is based on Qualcomm/Atheros QCA9558 + QCA9880. The "DSL" section is based on BCM6318 but it's currently not supported. The Archer D7b seems to differ from the Archer D7 only in the partition table. Router section - Specification: 775/650/258 MHz (CPU/DDR/AHB) 128 MB of RAM (DDR2) 16 MB of FLASH (SPI NOR) 3T3R 2.4 GHz 3T3R 5 GHz 4x 10/100/1000 Mbps Ethernet 7x LED, 2x button UART header on PCB Known issues: - Broadband LED (missing GPIO - probably driven by the BCM6318) - Internet LED (missing GPIO - probably driven by the BCM6318) - WIFI LED (working only for one interface at a time, while in the OEM firmware works for both wifi interfaces; thus, this patch does not set a trigger by default) - DSL not working (eth0) UART connection --------------- J1 HEADER (Qualcomm CPU) . VCC . GND . RX O TX J41 HEADER (Broadcom CPU) . VCC . GND . RX O TX The following instructions require a connection to the J1 UART header and are tested for the Archer D7 v1. For the Archer D7b v1, names should be changed accordingly. Flash instructions under U-Boot, using UART ------------------------------------------ 1. Press "tpl" to stop autobooting and obtain U-Boot CLI access. 2. Setup ip addresses for U-Boot and your tftp server. 3. Issue below commands: tftpboot 0x81000000 openwrt-ath79-generic-tplink_archer-d7-v1-squashfs-sysupgrade.bin erase 0x9f020000 +f90000 cp.b 0x81000000 0x9f020000 0xf90000 reset Initramfs instructions under U-Boot for testing, using UART ---------------------------------------------------------- 1. Press "tpl" to stop autobooting and obtain U-Boot CLI access. 2. Setup ip addresses for U-Boot and your tftp server. 3. Issue below commands: tftpboot 0x81000000 openwrt-ath79-generic-tplink_archer-d7-v1-initramfs-kernel.bin bootm 0x81000000 4. Here you can backup the original firmware and/or flash the sysupgrade openwrt if you want Restore the original firmware ----------------------------- 0. Backup every partition using the OpenWrt web interface 1. Download the OEM firmware from the TP-Link website 2. Extract the bin file in a folder (eg. Archer_D7v1_1.6.0_0.9.1_up_boot(160216)_2016-02-16_15.55.48.bin) 3. Remove the U-Boot and the Broadcom image part from the file. Issue the following command: dd if="Archer_D7v1_1.6.0_0.9.1_up_boot(160216)_2016-02-16_15.55.48.bin" of="Archer_D7v1_1.6.0_0.9.1_up_boot(160216)_2016-02-16_15.55.48.bin.mod" skip=257 bs=512 count=31872 4. Double check the .mod file size. It must be 16318464 bytes. 5. Flash it using the OpenWrt web interface. Force the update if needed. WARNING: Remember to NOT keep settings. 5b. (Alternative to 5.) Flash it using the U-Boot and UART connection. Issue below commands in the U-Boot: tftpboot 0x81000000 Archer_D7v1_1.6.0_0.9.1_up_boot(160216)_2016-02-16_15.55.48.bin.mod erase 0x9f020000 +f90000 cp.b 0x81000000 0x9f020000 0xf90000 reset Signed-off-by: Davide Fioravanti <pantanastyle@gmail.com> [cosmetic DTS changes, remove TPLINK_HWREVADD := 0, do not use two phyXtpt at once, add missing buttons, minor commit message adjustments] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
tplink,archer-d7-v1|\
tplink,archer-d7b-v1)
ucidef_add_switch "switch0" \
"0@eth1" "3:lan:3" "4:lan:2" "5:lan:1" "6@eth0" "2:wan:4" "1:wan:5"
;;
tplink,tl-mr6400-v1)
ucidef_set_interfaces_lan_wan "eth0.1 eth1" "usb0"
ucidef_add_switch "switch0" \
"0@eth0" "1:lan:1" "2:lan:3" "3:lan:2"
;;
tplink,tl-wr842n-v2)
ucidef_set_interface_wan "eth1"
ucidef_add_switch "switch0" \
"0@eth0" "1:lan:4" "2:lan:1" "3:lan:2" "4:lan:3"
;;
tplink,tl-wr1043nd-v1)
ucidef_add_switch "switch0" \
"1:lan" "2:lan" "3:lan" "4:lan" "0:wan" "5@eth0"
;;
tplink,tl-wr1043nd-v2|\
tplink,tl-wr1043nd-v3|\
tplink,tl-wr1045nd-v2)
ucidef_add_switch "switch0" \
"0@eth1" "1:lan:4" "2:lan:3" "3:lan:2" "4:lan:1" "5:wan" "6@eth0"
;;
tplink,tl-wr2543-v1)
ucidef_add_switch "switch0" \
"1:lan" "2:lan" "3:lan" "4:lan" "0:wan" "9@eth0"
;;
ath79: add support for Ubiquiti airCube ISP The Ubiquiti Network airCube ISP is a cube shaped 2.4 GHz with internal 2x2 MIMO antennas. It can be supplied via a USB connector or via PoE. There are for 10/100 Mbps ports (1 * WAN + 3 * LAN). There is an optional PoE passthrough from the first LAN port to the WAN port. SoC: Qualcomm / Atheros QCA9533-BL3A RAM: 64 MB DDR2 Flash: 16 MB SPI NOR Ethernet: 4x 10/100 Mbps (1 WAN + 3 LAN) LEDS: 1x via a SPI controller (not yet supported) Buttons: 1x Reset Serial: 1x (only RX and TX); 115200 baud, 8N1 Missing points: - LED not yet supported - Factory upgrade via web IF or TFTP recovery not yet supported (Needs RSA signed images, for details see PR#1958) The serial port is on a four pin connextor labeled J1 and located between Ethernet and USB connector. The pinout is: 1. 3V3 (out) 2. Rx (in) 3. Tx (out) 4. GND Upgrading via serial port / U-Boot: - Connect the serial port via a level converter - Power the system and stop U-Boot with pressing any key when `Hit any key to stop autoboot` is displayed. Note: Pressing space multiple times untill U-Boot reaches that location works well. - Connect a PC with the IP 192.168.1.100 (or some other in that net) running a TFTP-Server to one of the LAN ports. Copy the sysupgrade image to the server. - Set the U-Boot server IP with setenv serverip 192.168.1.100 - Load the flash image to RAM with tftpboot 0x81000000 sysupgrade.bin - Erase the flash with erase 0x9f050000 0x9ffaffff - Write the new flash content with cp 0x81000000 0x9f050000 ${filesize} - Reset the device with reset Signed-off-by: Christian Mauderer <oss@c-mauderer.de> [removed full stop in subject and added lockdown note to commit message] Signed-off-by: Petr Štetiar <ynezz@true.cz>
5 years ago
ubnt,acb-isp)
ucidef_set_interface_wan "eth1"
ath79: add support for Ubiquiti airCube ISP The Ubiquiti Network airCube ISP is a cube shaped 2.4 GHz with internal 2x2 MIMO antennas. It can be supplied via a USB connector or via PoE. There are for 10/100 Mbps ports (1 * WAN + 3 * LAN). There is an optional PoE passthrough from the first LAN port to the WAN port. SoC: Qualcomm / Atheros QCA9533-BL3A RAM: 64 MB DDR2 Flash: 16 MB SPI NOR Ethernet: 4x 10/100 Mbps (1 WAN + 3 LAN) LEDS: 1x via a SPI controller (not yet supported) Buttons: 1x Reset Serial: 1x (only RX and TX); 115200 baud, 8N1 Missing points: - LED not yet supported - Factory upgrade via web IF or TFTP recovery not yet supported (Needs RSA signed images, for details see PR#1958) The serial port is on a four pin connextor labeled J1 and located between Ethernet and USB connector. The pinout is: 1. 3V3 (out) 2. Rx (in) 3. Tx (out) 4. GND Upgrading via serial port / U-Boot: - Connect the serial port via a level converter - Power the system and stop U-Boot with pressing any key when `Hit any key to stop autoboot` is displayed. Note: Pressing space multiple times untill U-Boot reaches that location works well. - Connect a PC with the IP 192.168.1.100 (or some other in that net) running a TFTP-Server to one of the LAN ports. Copy the sysupgrade image to the server. - Set the U-Boot server IP with setenv serverip 192.168.1.100 - Load the flash image to RAM with tftpboot 0x81000000 sysupgrade.bin - Erase the flash with erase 0x9f050000 0x9ffaffff - Write the new flash content with cp 0x81000000 0x9f050000 ${filesize} - Reset the device with reset Signed-off-by: Christian Mauderer <oss@c-mauderer.de> [removed full stop in subject and added lockdown note to commit message] Signed-off-by: Petr Štetiar <ynezz@true.cz>
5 years ago
ucidef_add_switch "switch0" \
"0@eth0" "2:lan:1" "3:lan:3" "4:lan:2"
ath79: add support for Ubiquiti airCube ISP The Ubiquiti Network airCube ISP is a cube shaped 2.4 GHz with internal 2x2 MIMO antennas. It can be supplied via a USB connector or via PoE. There are for 10/100 Mbps ports (1 * WAN + 3 * LAN). There is an optional PoE passthrough from the first LAN port to the WAN port. SoC: Qualcomm / Atheros QCA9533-BL3A RAM: 64 MB DDR2 Flash: 16 MB SPI NOR Ethernet: 4x 10/100 Mbps (1 WAN + 3 LAN) LEDS: 1x via a SPI controller (not yet supported) Buttons: 1x Reset Serial: 1x (only RX and TX); 115200 baud, 8N1 Missing points: - LED not yet supported - Factory upgrade via web IF or TFTP recovery not yet supported (Needs RSA signed images, for details see PR#1958) The serial port is on a four pin connextor labeled J1 and located between Ethernet and USB connector. The pinout is: 1. 3V3 (out) 2. Rx (in) 3. Tx (out) 4. GND Upgrading via serial port / U-Boot: - Connect the serial port via a level converter - Power the system and stop U-Boot with pressing any key when `Hit any key to stop autoboot` is displayed. Note: Pressing space multiple times untill U-Boot reaches that location works well. - Connect a PC with the IP 192.168.1.100 (or some other in that net) running a TFTP-Server to one of the LAN ports. Copy the sysupgrade image to the server. - Set the U-Boot server IP with setenv serverip 192.168.1.100 - Load the flash image to RAM with tftpboot 0x81000000 sysupgrade.bin - Erase the flash with erase 0x9f050000 0x9ffaffff - Write the new flash content with cp 0x81000000 0x9f050000 ${filesize} - Reset the device with reset Signed-off-by: Christian Mauderer <oss@c-mauderer.de> [removed full stop in subject and added lockdown note to commit message] Signed-off-by: Petr Štetiar <ynezz@true.cz>
5 years ago
;;
ubnt,edgeswitch-5xp)
ucidef_set_interface_wan "eth1"
ucidef_add_switch "switch0" \
"0@eth0" "1:lan" "2:lan" "3:lan" "4:lan" "5:lan"
;;
ubnt,edgeswitch-8xp)
ucidef_set_interface_wan "eth1"
ucidef_add_switch "switch0" \
"0:lan:1" "1:lan:2" "2:lan:3" "3:lan:4" "4:lan:5" "5:lan:6" "6:lan:7" "7:lan:8" "8@eth0"
;;
ath79: initial support for Ubiquiti RouterStation and RouterStation Pro This adds a shared ar7161_ubnt_routerstation.dtsi as well as two other .dts files that utilize it, ar7161_ubnt_routerstation.dts and ar7161_ubnt_routerstation-pro.dts. The modifications to generic-ubnt.mk, config-default, and base-files necessary for image generation, parsing RedBoot FIS partitions, network configuration, and sysupgrade are also included. This reintroduces vital bits from platform_do_upgrade_combined() and its supporting functions to /lib/upgrade/platform.sh, which were previously removed from ath79 in 3e9d9f62258f80298710441e0db557e59e152dcf "ath79: sysupgrade: drop unused platform checks". The new function is called "routerstation_do_upgrade" and will *only* work for the RouterStation series of boards. It does however retain the ability to downgrade (e.g. from master -> 17.01.x using sysupgrade -F). All hardware is functional including the AR8216 switch (for the Pro), wireless via ath5k/ath9k using the miniPCI slots, flash, USB, button, and LED. Switch and LAN/WAN configuration is the same as it is with the equivalent ar71xx targets. MAC addresses are assigned based upon the content stored in the RedBoot config partition. Flashing via both sysupgrade and TFTP has been confirmed to work. Also, the initramfs images are now raw .bin files instead of being wrapped in a uImage (as they currently are in ar71xx), which makes them bootable with RedBoot. One notable difference to ar71xx is the inclusion of the RedBoot "fconfig" utility (analogous to U-Boot’s fw_printenv/fw_setenv) in DEVICE_PACKAGES. The FIS partitions are probed using the RedBoot MTD parser’s DT binding, whose proper usage is mutually exclusive to defining a separate fixed-partitions node for "RedBoot config". This config partition contains the board's base MAC address. The lack of a hard-coded flash location means that the mtd-mac-address property cannot be used in the .dts, so instead fconfig is used to read the MAC addresses from flash in userspace during first boot. Signed-off-by: Tomasz Maciej Nowak <tomek_n@o2.pl> Signed-off-by: Matt Merhar <mattmerhar@protonmail.com>
6 years ago
ubnt,routerstation-pro)
ucidef_set_interface_wan "eth0"
ucidef_add_switch "switch0" \
"0@eth1" "2:lan:3" "3:lan:2" "4:lan:1"
;;
ubnt,nanostation-m-xw)
ucidef_add_switch "switch0" \
"0@eth0" "5:lan" "1:wan"
;;
ubnt,unifiac-mesh-pro|\
ubnt,unifiac-pro)
ucidef_add_switch "switch0" \
"0@eth0" "2:lan:1" "3:lan:2"
;;
ath79: Add support for ZBT-WD323 ZBT-WD323 is a dual-LTE router based on AR9344. The detailed specifications are: * AR9344 560MHz/450MHz/225MHz (CPU/DDR/AHN). * 128 MB RAM * 16MB of flash(SPI-NOR, 22MHz) * 1x 2.4GHz wifi (Atheros AR9340) * 3x 10/100Mbos Ethernet (AR8229) * 1x USB2.0 port * 2x miniPCIe-slots (USB2.0 only) * 2x SIM slots (standard size) * 4x LEDs (1 gpio controlled) * 1x reset button * 1x 10 pin terminal block (RS232, RS485, 4x GPIO) * 2x CP210x UART bridge controllers (used for RS232 and RS485) * 1x 2 pin 5mm industrial interface (input voltage 12V~36V) * 1x DC jack * 1x RTC (PCF8563) Tested: - Ethernet switch - Wifi - USB port - MiniPCIe-slots (+ SIM slots) - Sysupgrade - Reset button - RS232 Intallation and recovery: The board ships with OpenWRT, but sysupgrade does not work as a different firmware format than what is expected is generated. The easiest way to install (and recover) the router, is to use the web-interface provided by the bootloader (Breed). While the interface is in Chinese, it is easy to use. First, in order to access the interface, you need to hold down the reset button for around five seconds. Then, go to 192.168.1.1 in your browser. Click on the second item in the list on the left to access the recovery page. The second item on the next page is where you select the firmware. Select the menu item containing "Atheros SDK" and "16MB" in the dropdown close to the buttom, and click on the button at the bottom to start installation/recovery. Notes: * RS232 is available on /dev/ttyUSB0 and RS485 on /dev/ttyUSB1 Signed-off-by: Kristian Evensen <kristian.evensen@gmail.com> [removed unused poll-interval from gpio-keys, i2c-gpio 4.19 compat] Signed-off-by: Petr Štetiar <ynezz@true.cz>
5 years ago
zbtlink,zbt-wd323|\
xiaomi,mi-router-4q)
ucidef_set_interface_wan "eth1"
ucidef_add_switch "switch0" \
"0@eth0" "3:lan:1" "4:lan:2"
;;
*)
ucidef_set_interfaces_lan_wan "eth0" "eth1"
;;
esac
}
ath79_setup_macs()
{
local board="$1"
case "$board" in
ath79: add support for Bluesocket BSAP1880 board 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>
6 years ago
adtran,bsap1800-v2|\
adtran,bsap1840)
lan_mac=$(mtd_get_mac_binary "Board data" 2)
label_mac=$lan_mac
;;
ath79: fix source of label MAC address for Ubiquiti XM devices In d421a8b94489 ("ath79: read label MAC address from flash instead of using phy0/phy1") the source of the label MAC address was changed for devices just reading it from phy0. To get rid of the dependency from phy startup, addresses were read directly from the flash locations that are used to initialize the phy MAC addresses. Unfortunately, it turned out that Ubiquiti XM devices seem to have different flash locations than expected, and also seem to have specific locations for different devices (all in art/EEPROM): 0xe012 AR9280 Nanostation M2 - 0x120c 0xe035 AR9280 Nanostation M3 - 0x120c 0xe1b2 AR9280 Rocket M2 - 0x120c 0xe1c3 AR9280 Rocket M3 - 0x120c 0xe1b5 AR9280 Rocket M5 - 0x120c 0xe2d5 AR9280 Bullet M2 Titanium - 0x120c 0xe2b5 AR9280 Nanobridge M5 - 0x120c 0xe202 AR9280 Bullet M2 - 0x120c 0xe232 AR9287 Nanobridge M2 - 0x110c 0xe4a2 AR9285 AirRouter - 0xa0bf Picostation M2 - 0x120c and 0xa0bf Nanostation Loco M2 - not in 0x120c, other locations not checked An additional problem of the Ubiquiti device support in OpenWrt is that we provide images that match several subvariants of the devices, which might have different MAC address locations. Given that reading the address from phy0 in 02_network _is_ working for the ath79 target in general, it does not seem reasonable to rebuild a complex MAC address retrieval mechanism which is already present in the ath9k driver. So, this patch reverts the label MAC address source for Ubiquiti XM devices (and the Unifi AP) to /sys/class/ieee80211/phy0/macaddress. This doesn't affect XW and Unifi AC devices, where the label MAC address source is defined via device tree. For alfa-network,ap121f the location 0x1002 is kept, as this has been verified during device support preparation in PR #2199. Fixes: d421a8b94489 ("ath79: read label MAC address from flash instead of using phy0/phy1") Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
5 years ago
alfa-network,ap121f)
label_mac=$(mtd_get_mac_binary art 0x1002)
ath79: add support for Bluesocket BSAP1880 board 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>
6 years ago
;;
avm,fritz1750e|\
ath79: add support for AVM FRITZ!WLAN Repeater DVB-C This commit adds support for the AVM FRITZ!WLAN Repeater DVB-C SOC: Qualcomm Atheros QCA9556 RAM: 64 MiB FLASH: 16 MB SPI-NOR WLAN: QCA9556 3T3R 2.4 GHZ b/g/n and QCA9880 3T3R 5 GHz n/ac ETH: Atheros AR8033 1000 Base-T DVB-C: EM28174 with MaxLinear MXL251 tuner BTN: WPS Button LED: Power, WLAN, TV, RSSI0-4 Tested and working: - Ethernet (correct MAC, gigabit, iperf3 about 200 Mbit/s) - 2.4 GHz Wi-Fi (correct MAC) - 5 GHz Wi-Fi (correct MAC) - WPS Button (tested using wifitoggle) - LEDs - Installation via EVA bootloader (FTP recovery) - OpenWrt sysupgrade (both CLI and LuCI) - Download of "urlader" (mtd0) Not working: - Internal USB - DVB-C em28174+MxL251 (depends on internal USB) Installation via EVA bootloader (FTP recovery): Set NIC to 192.168.178.3/24 gateway 192.168.178.1 and power on the device, connect to 192.168.178.1 through FTP and sign in with adam2/adam2: ftp> quote USER adam2 ftp> quote PASS adam2 ftp> binary ftp> debug ftp> passive ftp> quote MEDIA FLSH ftp> put openwrt-sysupgrade.bin mtd1 Wait for "Transfer complete" together with the transfer details. Wait two minutes to make sure flash is complete (just to be safe). Then restart the device (power off and on) to boot into OpenWrt. Revert your NIC settings to reach OpenWrt at 192.168.1.1 Signed-off-by: Natalie Kagelmacher <nataliek@pm.me> [fixed sorting - removed change to other board - prettified commit message] Signed-off-by: David Bauer <mail@david-bauer.net>
4 years ago
avm,fritz450e|\
avm,fritzdvbc)
label_mac=$(fritz_tffs -n macwlan -i $(find_mtd_part "tffs (1)"))
;;
avm,fritz300e)
lan_mac=$(fritz_tffs -n maca -i $(find_mtd_part "tffs (1)"))
label_mac=$(fritz_tffs -n macwlan -i $(find_mtd_part "tffs (1)"))
;;
ath79: add support for Fritz!Box 4020 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 The USB port doesn't work. Both Root Hubs are detected as having 0 Ports: [ 3.670807] kmodloader: loading kernel modules from /etc/modules-boot.d/* [ 3.723267] usbcore: registered new interface driver usbfs [ 3.729058] usbcore: registered new interface driver hub [ 3.734616] usbcore: registered new device driver usb [ 3.744181] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver [ 3.758357] SCSI subsystem initialized [ 3.766026] ehci-platform: EHCI generic platform driver [ 3.771548] ehci-platform ehci-platform.0: EHCI Host Controller [ 3.777708] ehci-platform ehci-platform.0: new USB bus registered, assigned bus number 1 [ 3.788169] ehci-platform ehci-platform.0: irq 48, io mem 0x1b000000 [ 3.816647] ehci-platform ehci-platform.0: USB 2.0 started, EHCI 0.00 [ 3.824001] hub 1-0:1.0: USB hub found [ 3.828219] hub 1-0:1.0: config failed, hub doesn't have any ports! (err -19) [ 3.835825] ehci-platform ehci-platform.1: EHCI Host Controller [ 3.842009] ehci-platform ehci-platform.1: new USB bus registered, assigned bus number 2 [ 3.852481] ehci-platform ehci-platform.1: irq 49, io mem 0x1b400000 [ 3.886631] ehci-platform ehci-platform.1: USB 2.0 started, EHCI 0.00 [ 3.894011] hub 2-0:1.0: USB hub found [ 3.898190] hub 2-0:1.0: config failed, hub doesn't have any ports! (err -19) [ 3.908928] usbcore: registered new interface driver usb-storage [ 3.915634] kmodloader: done loading kernel modules from /etc/modules-boot.d/* A few words about the shift-register: AVM used a trick to control the shift-register for the LEDs with only 2 pins, SERCLK and MOSI. Q7S, normally used for daisy-chaining multiple shift-registers, pulls the latch, moving the shift register-state to the storage register. It also pulls down MR (normally pulled up) to clear the storage register, so the latch gets released and will not be pulled by the remaining bits in the shift-register. Shift register is all-zero after this. For that we need to make sure output 7 is set to high on driver probe. We accomplish this by using gpio-hogging. 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>
6 years ago
avm,fritz4020)
lan_mac=$(fritz_tffs -n maca -i $(find_mtd_part "tffs (1)"))
wan_mac=$(fritz_tffs -n macb -i $(find_mtd_part "tffs (1)"))
;;
ath79: add support for Compex WPJ344 Specifications: SoC: AR9344 DRAM: 128MB DDR2 Flash: 16MB SPI-NOR 2 Gigabit ethernet ports 2×2 2.4GHz on-board radio miniPCIe slot that supports 5GHz radio PoE 48V IEEE 802.3af/at - 24V passive optional USB 2.0 header Installation: To install, either start tftp in bin/targets/ath79/generic/ and use the u-boot prompt over UART: tftpboot 0x80500000 openwrt-ath79-generic-compex_wpj344-16m-squashfs-sysupgrade.bin erase 0x9f030000 +$filesize erase 0x9f680000 +1 cp.b $fileaddr 0x9f030000 $filesize boot The cpximg file can be used with sysupgrade in the stock firmware (add SSH key in luci for root access) or with the built-in cpximg loader. The cpximg loader can be started either by holding the reset button during power up or by entering the u-boot prompt and entering 'cpximg'. Once it's running, a TFTP-server under 192.168.1.1 will accept the image appropriate for the board revision that is etched on the board. For example, if the board is labelled '6A08': tftp -v -m binary 192.168.1.1 -c put openwrt-ath79-generic-compex_wpj344-16m-squashfs-cpximg-6a08.bin MAC addresses: <&uboot 0x2e010> *:99 (label) <&uboot 0x2e018> *:9a <&uboot 0x2e020> *:9b <&uboot 0x2e028> *:9c Only the first two are used (for ethernet), the WiFi modules have separate (valid) addresses. The latter two addresses are not used. Signed-off-by: Leon M. George <leon@georgemail.eu> [minor commit message adjustments, drop gpio in DTS, DTS style fixes, sorting, drop unused cpximg recipe] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
5 years ago
compex,wpj344-16m)
wan_mac=$(mtd_get_mac_binary u-boot 0x2e018)
;;
ath79: add support for Devolo Magic 2 WIFI 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>
5 years ago
devolo,magic-2-wifi)
label_mac=$(macaddr_add "$(mtd_get_mac_binary art 0x1002)" 3)
;;
ath79: add support for D-Link DAP-2695-A1 Hardware: * SoC: Qualcomm Atheros QCA9558 * RAM: 256MB * Flash: 16MB SPI NOR * Ethernet: 2x 10/100/1000 (1x 802.3at PoE-PD) * WiFi 2.4GHz: Qualcomm Atheros QCA9558 * WiFi 5GHz: Qualcomm Ahteros QCA9880-2R4E * LEDS: 1x 5GHz, 1x 2.4GHz, 1x LAN1(POE), 1x LAN2, 1x POWER * Buttons: 1x RESET * UART: 1x RJ45 RS-232 Console port Installation via stock firmware: * Install the factory image via the stock firmware web interface Installation via bootloader Emergency Web Server: * Connect your PC to the LAN1(PoE) port * Configure your PC with IP address 192.168.0.90 * Open a serial console to the Console port (115200,8n1) * Press "q" within 2s when "press 'q' to stop autoboot" appears * Open http://192.168.0.50 in a browser * Upload either the factory or the sysupgrade image * Once you see "write image into flash...OK,dest addr=0x9f070000" you can power-cycle the device. Ignore "checksum bad" messages. Setting the MAC addresses for the ethernet interfaces via /etc/board.d/02_network adds the following snippets to /etc/config/network: config device 'lan_eth0_1_dev' option name 'eth0.1' option macaddr 'xx:xx:xx:xx:xx:xx' config device 'wan_eth1_2_dev' option name 'eth1.2' option macaddr 'xx:xx:xx:xx:xx:xx' This would result in the proper MAC addresses being set for the VLAN subinterfaces, but the parent interfaces would still have a random MAC address. Using untagged VLANs could solve this, but would still leave those extra snippets in /etc/config/network, and then the device VLAN setup would differ from the one used in ar71xx. Therefore, the MAC addresses of the ethernet interfaces are being set via preinit instead. The bdcfg partition contains 4 MAC address labels: - lanmac - wanmac - wlanmac - wlanmac_a The first 3 all contain the same MAC address, which is also the one on the label. Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be> Reviewed-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
dlink,dap-2695-a1)
label_mac=$(mtd_get_mac_ascii bdcfg "wlanmac")
;;
dlink,dch-g020-a1)
lan_mac=$(mtd_get_mac_text "mp" 0x1)
label_mac=$lan_mac
;;
dlink,dir-825-b1)
lan_mac=$(mtd_get_mac_text "caldata" 0xffa0)
wan_mac=$(mtd_get_mac_text "caldata" 0xffb4)
;;
dlink,dir-505)
lan_mac=$(mtd_get_mac_text "mac" 0x4)
;;
dlink,dir-825-c1|\
dlink,dir-835-a1)
lan_mac=$(mtd_get_mac_text "mac" 0x4)
wan_mac=$(mtd_get_mac_text "mac" 0x18)
;;
dlink,dir-842-c1|\
dlink,dir-842-c2|\
dlink,dir-842-c3|\
nec,wg1200cr)
lan_mac=$(mtd_get_mac_ascii devdata "lanmac")
wan_mac=$(mtd_get_mac_ascii devdata "wanmac")
label_mac=$lan_mac
;;
dlink,dir-859-a1|\
qihoo,c301|\
wd,mynet-n750)
lan_mac=$(mtd_get_mac_ascii devdata "lanmac")
wan_mac=$(mtd_get_mac_ascii devdata "wanmac")
;;
elecom,wrc-1750ghbk2-i|\
elecom,wrc-300ghbk2-i)
wan_mac=$(macaddr_add "$(mtd_get_mac_binary art 0x1002)" -2)
;;
engenius,ecb1750)
lan_mac=$(mtd_get_mac_ascii u-boot-env ethaddr)
label_mac=$(mtd_get_mac_ascii u-boot-env athaddr)
;;
engenius,epg5000)
ath79: add suport for EnGenius EPG5000 EnGenius EPG5000 (v1.0.0, marketed as IoT Gateway) is a dual band wireless router. Specification SoC: Qualcomm Atheros QCA9558 RAM: 256 MB DDR2 Flash: 16 MB SPI NOR WIFI: 2.4 GHz 3T3R integrated 5 GHz 3T3R QCA9880 Mini PCIe card Ethernet: 5x 10/100/1000 Mbps QCA8337N USB: 1x 2.0 LEDS: 4x GPIO controlled Buttons: 2x GPIO controlled UART: 4 pin header, 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 Tools > Firmware, 4. Select 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. Alternative installation 1. Prepare TFTP server with OpenWrt sysupgrade image, 2. Connect to one of LAN (yellow) ethernet ports, 3. Connect to UART port (leaving out VCC pin!), 4. Power on router, 5. When asked to enter a number 1 or 3 hit 2, this will select flashing image from TFTP server option, 6. You'll be prompted to enter TFTP server ip (default is 192.168.99.8), then router ip (default is 192.168.99.9) and for last, image name downloaded from TFTP server (default is uImageESR1200_1750), 7. After providing all information U-Boot will start flashing the image, You can observe progress on console, it'll take few minutes and when the Power LED will stop blinking, router is ready for configuration. Additional information 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: aigo3d0a0tdagr useful for creating backup of original firmware. When doing upgrade from OpenWrt ar71xx image, it is recomended to not keep the old configuration. Signed-off-by: Tomasz Maciej Nowak <tomek_n@o2.pl>
5 years ago
lan_mac=$(mtd_get_mac_ascii u-boot-env ethaddr)
wan_mac=$(mtd_get_mac_ascii u-boot-env wanaddr)
;;
engenius,ews511ap)
lan_mac=$(mtd_get_mac_text "u-boot-env" 0xe9)
eth1_mac=$(macaddr_add "$lan_mac" 1)
ucidef_set_interface "eth0" ifname "eth0" protocol "none" macaddr "$lan_mac"
ucidef_set_interface "eth1" ifname "eth1" protocol "none" macaddr "$eth1_mac"
;;
enterasys,ws-ap3705i)
label_mac=$(mtd_get_mac_ascii u-boot-env0 ethaddr)
;;
iodata,etg3-r)
lan_mac=$(mtd_get_mac_ascii u-boot-env ethaddr)
wan_mac=$(macaddr_add "$lan_mac" -1)
label_mac=$wan_mac
;;
iodata,wn-ac1167dgr|\
iodata,wn-ac1600dgr|\
iodata,wn-ac1600dgr2|\
iodata,wn-ag300dgr)
lan_mac=$(mtd_get_mac_ascii u-boot-env ethaddr)
wan_mac=$(mtd_get_mac_ascii u-boot-env wanaddr)
label_mac=$wan_mac
;;
ath79: add support for jjPlus JA76PF2 jjPlus JA76PF2 (marketed as IntellusPro2) is a network embedded board. Specification SoC: Atheros AR7161 RAM: 64 MB DDR Flash: 16 MB SPI NOR Ethernet: 2x 10/100/1000 Mbps AR8316 LAN (CN11), WAN/PoE (CN6 - close to power barrel connector, 48 V) MiniPCI: 2x LEDS: 4x, which 3 are GPIO controlled Buttons: 2x GPIO controlled Reset (SW1, closer to ethernet ports), WPS (SW2) Serial: 1x (only RX and TX are wired) baud: 115200, parity: none, flow control: none Currently there is one caveat compared to ar71xx target images as the MAC addresses are random on every reboot. To remedy this one needs to store the WAN MAC address in RedBoot configuration. OpenWrt on first boot, after flashing, will read out the address and assign proper ones to both WAN and LAN ports. It is iportant to NOT keep the old configuration when doing sysupgrade from ar71xx. Upgrading from OpenWrt ar71xx image 1. Connect to serial port, 2. Download OpenWrt sysupgrade image to /tmp directory and flash it with: sysupgrade -n <openwrt_sysupgrade_image_name> 3. After writing new image OpenWrt will reboot, now interrupt boot process and enter RedBoot (bootloader) command line by pressing Ctrl+C, 4. Enter following commands (replace variable accordingly), set_mac (to view MAC addresses) alias ethaddr <wan_port_mac_adress> (confirm storing the value by inputting y and pressing Enter) reset 5. Now board should restart and boot OpenWrt with proper MAC addresses. Installation 1. Prepare TFTP server with OpenWrt initramfs image, 2. Connect to WAN ethernet port, 3. Connect to serial port, 4. Power on the board and enter RedBoot (bootloader) command line by pressing Ctrl+C, 5. Enter following commands (replace variables accordingly): set_mac (to view MAC addresses) alias ethaddr <wan_port_mac_address> (confirm storing the value by inputting y and pressing Enter) ip_adress -l <board_ip_adress>/24 -h <tftp_server_ip_adress> load -r -b 0x80060000 <openwrt_initramfs_image_name> exec -c "" 6. Now board should boot OpenWrt initramfs image, 7. Download OpenWrt sysupgrade image to /tmp directory and flash it with: sysupgrade <openwrt_sysupgrade_image_name> 8. Wait few minutes, after the D2 LED will stop blinking, the board is ready for configuration. Signed-off-by: Tomasz Maciej Nowak <tomek_n@o2.pl>
5 years ago
jjplus,ja76pf2)
wan_mac=$(fconfig -s -r -d $(find_mtd_part "RedBoot config") -n alias/ethaddr)
lan_mac=$(macaddr_add "$wan_mac" 1)
;;
nec,wg800hp)
lan_mac=$(mtd_get_mac_text board_data 0x280)
wan_mac=$(mtd_get_mac_text board_data 0x480)
label_mac=$wan_mac
;;
netgear,wndr3700|\
netgear,wndr3700-v2|\
netgear,wndr3800|\
netgear,wndrmac-v1|\
netgear,wndrmac-v2)
lan_mac=$(macaddr_setbit_la "$(mtd_get_mac_binary art 0x0)")
;;
phicomm,k2t)
lan_mac=$(k2t_get_mac "lan_mac")
wan_mac=$(k2t_get_mac "wan_mac")
;;
rosinson,wr818)
wan_mac=$(mtd_get_mac_binary factory 0x0)
lan_mac=$(macaddr_setbit_la "$wan_mac")
;;
ath79: add support for Sitecom WLR-8100 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>
5 years ago
sitecom,wlr-7100|\
sitecom,wlr-8100)
lan_mac=$(mtd_get_mac_ascii u-boot-env ethaddr)
wan_mac=$(mtd_get_mac_ascii u-boot-env wanaddr)
label_mac=$lan_mac
;;
tplink,archer-a7-v5|\
tplink,archer-c7-v4|\
tplink,archer-c7-v5|\
tplink,tl-wr1043nd-v4|\
tplink,tl-wr1043n-v5)
base_mac=$(mtd_get_mac_binary info 0x8)
wan_mac=$(macaddr_add "$base_mac" 1)
;;
tplink,tl-wdr3600-v1|\
tplink,tl-wdr4300-v1|\
tplink,tl-wdr4300-v1-il)
base_mac=$(mtd_get_mac_binary u-boot 0x1fc00)
wan_mac=$(macaddr_add "$base_mac" 1)
;;
trendnet,tew-823dru)
lan_mac=$(mtd_get_mac_text mac 0x4)
wan_mac=$(mtd_get_mac_text mac 0x18)
label_mac=$wan_mac
;;
ath79: fix source of label MAC address for Ubiquiti XM devices In d421a8b94489 ("ath79: read label MAC address from flash instead of using phy0/phy1") the source of the label MAC address was changed for devices just reading it from phy0. To get rid of the dependency from phy startup, addresses were read directly from the flash locations that are used to initialize the phy MAC addresses. Unfortunately, it turned out that Ubiquiti XM devices seem to have different flash locations than expected, and also seem to have specific locations for different devices (all in art/EEPROM): 0xe012 AR9280 Nanostation M2 - 0x120c 0xe035 AR9280 Nanostation M3 - 0x120c 0xe1b2 AR9280 Rocket M2 - 0x120c 0xe1c3 AR9280 Rocket M3 - 0x120c 0xe1b5 AR9280 Rocket M5 - 0x120c 0xe2d5 AR9280 Bullet M2 Titanium - 0x120c 0xe2b5 AR9280 Nanobridge M5 - 0x120c 0xe202 AR9280 Bullet M2 - 0x120c 0xe232 AR9287 Nanobridge M2 - 0x110c 0xe4a2 AR9285 AirRouter - 0xa0bf Picostation M2 - 0x120c and 0xa0bf Nanostation Loco M2 - not in 0x120c, other locations not checked An additional problem of the Ubiquiti device support in OpenWrt is that we provide images that match several subvariants of the devices, which might have different MAC address locations. Given that reading the address from phy0 in 02_network _is_ working for the ath79 target in general, it does not seem reasonable to rebuild a complex MAC address retrieval mechanism which is already present in the ath9k driver. So, this patch reverts the label MAC address source for Ubiquiti XM devices (and the Unifi AP) to /sys/class/ieee80211/phy0/macaddress. This doesn't affect XW and Unifi AC devices, where the label MAC address source is defined via device tree. For alfa-network,ap121f the location 0x1002 is kept, as this has been verified during device support preparation in PR #2199. Fixes: d421a8b94489 ("ath79: read label MAC address from flash instead of using phy0/phy1") Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
5 years ago
ubnt,airrouter|\
ath79: add support for ubnt_bullet-m-ar7240 variant This adds support for the Ubiquiti Bullet M (AR7240). Specifications: - AR7240 SoC @ 400 MHz - 32 MB RAM - 8 MB SPI flash - 1x 10/100 Mbps Ethernet, 24 Vdc PoE-in - External antenna - POWER/LAN green LEDs - 4x RSSI LEDs (red, orange, green, green) - UART (115200 8N1) on PCB Flashing via WebUI: Upload the factory image via the stock firmware web UI. Attention: airOS firmware versions >= 5.6 have a new bootloader with an incompatible partition table! Please downgrade to <= 5.5 _before_ flashing OpenWrt! Refer to the device's Wiki page for further information. Flashing via TFTP: Same procedure as other Ubiquiti M boards. - Use a pointy tool (e.g., pen cap, paper clip) and keep the reset button on the device or on the PoE supply pressed - Power on the device via PoE (keep reset button pressed) - Keep pressing until LEDs flash alternatively LED1+LED3 => LED2+LED4 => LED1+LED3, etc. - Release reset button - The device starts a TFTP server at 192.168.1.20 - Set a static IP on the computer (e.g., 192.168.1.21/24) - Upload via tftp the factory image: $ tftp 192.168.1.20 tftp> bin tftp> trace tftp> put openwrt-ath79-generic-xxxxx-ubnt_bullet-m-ar7240-squashfs-factory.bin The "fixed-link" section of the device tree is needed to avoid errors like this: Generic PHY mdio.0:1f:04: Master/Slave resolution failed, maybe conflicting manual settings? With "fixed-link", the errors go away and eth0 comes up reliably. Signed-off-by: Russell Senior <russell@personaltelco.net> [fix SUPPORTED_DEVICES] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
ubnt,bullet-m-ar7240|\
ubnt,bullet-m-ar7241|\
ath79: add support for Ubiquiti NanoBridge M (XM) This patch adds support for the Ubiquiti NanoBridge M (XM), a 802.11n wireless with a feed+dish form factor, with the same board definition as the Bullet M (XM). Specifications: - Atheros AR7241 SoC - 32 MB RAM - 8 MB SPI flash - 1x 10/100 Mbps Ethernet port, 24 Vdc PoE-in - Power and LAN green LEDs - 4x RSSI LEDs (red, orange, green, green) - UART (115200 8N1) Flashing via stock GUI: - WARNING: flashing OpenWrt from AirOS v5.6 or newer will brick your device! Read the wiki for more info. - Downgrade to AirOS v5.5.x (latest available is 5.5.11) first. - Upload the factory image via AirOS web GUI. Flashing via TFTP: - WARNING: flashing OpenWrt from AirOS v5.6 or newer will brick your device! Read the wiki for more info. - Downgrade to AirOS v5.5.x (latest available is 5.5.11) first. - Use a pointy tool (e.g., pen cap, slotted screwdriver) to keep the reset button pressed. - Power on the device (keep reset button pressed). - Keep pressing until LEDs flash alternatively LED1+LED3 => LED2+LED4 => LED1+LED3, etc. - Release reset button. - The device starts a TFTP server at 192.168.1.20. - Set a static IP on the computer (e.g., 192.168.1.21/24). - Upload via tftp the factory image: $ tftp 192.168.1.20 tftp> bin tftp> trace tftp> put openwrt-ath79-generic-xxxxx-ubnt_nanobridge-m-squashfs-factory.bin Signed-off-by: Roger Pueyo Centelles <roger.pueyo@guifi.net> [rebase, fix includes in DTS, add label MAC address, add SOC and fix sorting in generic-ubnt.mk] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
ubnt,nanobridge-m|\
ath79: add support for Ubiquiti Nanostation Loco M (XM) This adds support for the Ubiquiti Nanostation Loco M (XM), which has the same board/LEDs as the Bullet M XM, but different case and antennas. Specifications: - AR7241 SoC @ 400 MHz - 32 MB RAM - 8 MB SPI flash - 1x 10/100 Mbps Ethernet, 24 Vdc PoE-in - NS Loco M2: built-in antenna: 8 dBi; AR9287 - NS Loco M5: built-in antenna: 13 dBi; 2T2R 5 GHz radio - POWER/LAN green LEDs - 4x RSSI LEDs (red, orange, green, green) - UART (115200 8N1) on PCB Flashing via WebUI: Upload the factory image via the stock firmware web UI. Note that only certain firmware versions accept unsigned images. Refer to the device's Wiki page for further information. Flashing via TFTP: Same procedure as other NanoStation M boards. - Use a pointy tool (e.g., pen cap, paper clip) and keep the reset button on the device or on the PoE supply pressed - Power on the device via PoE (keep reset button pressed) - Keep pressing until LEDs flash alternatively LED1+LED3 => LED2+LED4 => LED1+LED3, etc. - Release reset button - The device starts a TFTP server at 192.168.1.20 - Set a static IP on the computer (e.g., 192.168.1.21/24) - Upload via tftp the factory image: $ tftp 192.168.1.20 tftp> bin tftp> trace tftp> put openwrt-ath79-generic-xxxxx-ubnt_nanostation-loco-m-squashfs-factory.bin Tested on NanoStation Loco M2. Signed-off-by: Sven Roederer <freifunk@it-solutions.geroedel.de> Co-developed-by: Adrian Schmutzler <freifunk@adrianschmutzler.de> Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
ubnt,nanostation-loco-m|\
ath79: fix source of label MAC address for Ubiquiti XM devices In d421a8b94489 ("ath79: read label MAC address from flash instead of using phy0/phy1") the source of the label MAC address was changed for devices just reading it from phy0. To get rid of the dependency from phy startup, addresses were read directly from the flash locations that are used to initialize the phy MAC addresses. Unfortunately, it turned out that Ubiquiti XM devices seem to have different flash locations than expected, and also seem to have specific locations for different devices (all in art/EEPROM): 0xe012 AR9280 Nanostation M2 - 0x120c 0xe035 AR9280 Nanostation M3 - 0x120c 0xe1b2 AR9280 Rocket M2 - 0x120c 0xe1c3 AR9280 Rocket M3 - 0x120c 0xe1b5 AR9280 Rocket M5 - 0x120c 0xe2d5 AR9280 Bullet M2 Titanium - 0x120c 0xe2b5 AR9280 Nanobridge M5 - 0x120c 0xe202 AR9280 Bullet M2 - 0x120c 0xe232 AR9287 Nanobridge M2 - 0x110c 0xe4a2 AR9285 AirRouter - 0xa0bf Picostation M2 - 0x120c and 0xa0bf Nanostation Loco M2 - not in 0x120c, other locations not checked An additional problem of the Ubiquiti device support in OpenWrt is that we provide images that match several subvariants of the devices, which might have different MAC address locations. Given that reading the address from phy0 in 02_network _is_ working for the ath79 target in general, it does not seem reasonable to rebuild a complex MAC address retrieval mechanism which is already present in the ath9k driver. So, this patch reverts the label MAC address source for Ubiquiti XM devices (and the Unifi AP) to /sys/class/ieee80211/phy0/macaddress. This doesn't affect XW and Unifi AC devices, where the label MAC address source is defined via device tree. For alfa-network,ap121f the location 0x1002 is kept, as this has been verified during device support preparation in PR #2199. Fixes: d421a8b94489 ("ath79: read label MAC address from flash instead of using phy0/phy1") Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
5 years ago
ubnt,nanostation-m|\
ubnt,picostation-m|\
ath79: fix source of label MAC address for Ubiquiti XM devices In d421a8b94489 ("ath79: read label MAC address from flash instead of using phy0/phy1") the source of the label MAC address was changed for devices just reading it from phy0. To get rid of the dependency from phy startup, addresses were read directly from the flash locations that are used to initialize the phy MAC addresses. Unfortunately, it turned out that Ubiquiti XM devices seem to have different flash locations than expected, and also seem to have specific locations for different devices (all in art/EEPROM): 0xe012 AR9280 Nanostation M2 - 0x120c 0xe035 AR9280 Nanostation M3 - 0x120c 0xe1b2 AR9280 Rocket M2 - 0x120c 0xe1c3 AR9280 Rocket M3 - 0x120c 0xe1b5 AR9280 Rocket M5 - 0x120c 0xe2d5 AR9280 Bullet M2 Titanium - 0x120c 0xe2b5 AR9280 Nanobridge M5 - 0x120c 0xe202 AR9280 Bullet M2 - 0x120c 0xe232 AR9287 Nanobridge M2 - 0x110c 0xe4a2 AR9285 AirRouter - 0xa0bf Picostation M2 - 0x120c and 0xa0bf Nanostation Loco M2 - not in 0x120c, other locations not checked An additional problem of the Ubiquiti device support in OpenWrt is that we provide images that match several subvariants of the devices, which might have different MAC address locations. Given that reading the address from phy0 in 02_network _is_ working for the ath79 target in general, it does not seem reasonable to rebuild a complex MAC address retrieval mechanism which is already present in the ath9k driver. So, this patch reverts the label MAC address source for Ubiquiti XM devices (and the Unifi AP) to /sys/class/ieee80211/phy0/macaddress. This doesn't affect XW and Unifi AC devices, where the label MAC address source is defined via device tree. For alfa-network,ap121f the location 0x1002 is kept, as this has been verified during device support preparation in PR #2199. Fixes: d421a8b94489 ("ath79: read label MAC address from flash instead of using phy0/phy1") Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
5 years ago
ubnt,rocket-m|\
ubnt,unifi)
label_mac=$(cat /sys/class/ieee80211/phy0/macaddress)
;;
ubnt,litebeam-ac-gen2|\
ubnt,powerbeam-5ac-500|\
ubnt,powerbeam-5ac-gen2)
label_mac=$(mtd_get_mac_binary art 0x5006)
;;
ath79: initial support for Ubiquiti RouterStation and RouterStation Pro This adds a shared ar7161_ubnt_routerstation.dtsi as well as two other .dts files that utilize it, ar7161_ubnt_routerstation.dts and ar7161_ubnt_routerstation-pro.dts. The modifications to generic-ubnt.mk, config-default, and base-files necessary for image generation, parsing RedBoot FIS partitions, network configuration, and sysupgrade are also included. This reintroduces vital bits from platform_do_upgrade_combined() and its supporting functions to /lib/upgrade/platform.sh, which were previously removed from ath79 in 3e9d9f62258f80298710441e0db557e59e152dcf "ath79: sysupgrade: drop unused platform checks". The new function is called "routerstation_do_upgrade" and will *only* work for the RouterStation series of boards. It does however retain the ability to downgrade (e.g. from master -> 17.01.x using sysupgrade -F). All hardware is functional including the AR8216 switch (for the Pro), wireless via ath5k/ath9k using the miniPCI slots, flash, USB, button, and LED. Switch and LAN/WAN configuration is the same as it is with the equivalent ar71xx targets. MAC addresses are assigned based upon the content stored in the RedBoot config partition. Flashing via both sysupgrade and TFTP has been confirmed to work. Also, the initramfs images are now raw .bin files instead of being wrapped in a uImage (as they currently are in ar71xx), which makes them bootable with RedBoot. One notable difference to ar71xx is the inclusion of the RedBoot "fconfig" utility (analogous to U-Boot’s fw_printenv/fw_setenv) in DEVICE_PACKAGES. The FIS partitions are probed using the RedBoot MTD parser’s DT binding, whose proper usage is mutually exclusive to defining a separate fixed-partitions node for "RedBoot config". This config partition contains the board's base MAC address. The lack of a hard-coded flash location means that the mtd-mac-address property cannot be used in the .dts, so instead fconfig is used to read the MAC addresses from flash in userspace during first boot. Signed-off-by: Tomasz Maciej Nowak <tomek_n@o2.pl> Signed-off-by: Matt Merhar <mattmerhar@protonmail.com>
6 years ago
ubnt,routerstation|\
ubnt,routerstation-pro)
wan_mac=$(fconfig -s -r -d $(find_mtd_part "RedBoot config") -n ar7100_esa)
lan_mac=$(macaddr_add "$wan_mac" 1)
;;
wd,mynet-wifi-rangeextender)
lan_mac=$(nvram get et0macaddr)
;;
esac
[ -n "$lan_mac" ] && ucidef_set_interface_macaddr "lan" $lan_mac
[ -n "$wan_mac" ] && ucidef_set_interface_macaddr "wan" $wan_mac
[ -n "$label_mac" ] && ucidef_set_label_macaddr $label_mac
}
board_config_update
board=$(board_name)
ath79_setup_interfaces $board
ath79_setup_macs $board
board_config_flush
exit 0