openwrt/target/linux/ath79/generic/base-files/etc/board.d/02_network

739 lines
18 KiB
Plaintext
Raw Normal View History

. /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>
2018-09-01 04:28:35 +02:00
adtran,bsap1800-v2|\
adtran,bsap1840|\
ath79: add support for ALLNET ALL-WAP02860AC ALLNET ALL-WAP02860AC is a dual-band wireless access point. Specification SoC: Qualcomm Atheros QCA9558 RAM: 128 MB DDR2 Flash: 16 MB SPI NOR WIFI: 2.4 GHz 3T3R integrated 5 GHz 3T3R QCA9880 Mini PCIe card Ethernet: 1x 10/100/1000 Mbps AR8035-A, PoE capable (802.3at) LEDS: 5x, which four are GPIO controlled Buttons: 1x GPIO controlled UART: 4 pin header near Mini PCIe card, starting count from white triangle on PCB 1. VCC 3.3V, 2. GND, 3. TX, 4. RX baud: 115200, parity: none, flow control: none MAC addresses Calibration data does not contain valid MAC addresses. The calculated MAC addresses are chosen in accordance with OEM firmware. Because of: a) constrained environment (SNMP) when connecting through Telnet or SSH, b) hard-coded kernel and rootfs sizes, c) checksum verification of kerenel and rootfs images in bootloder, creating factory image accepted by OEM web interface is difficult, therefore, to install OpenWrt on this device UART connection is needed. The teardown is simple, unscrew four screws to disassemble the casing, plus two screws to separate mainboard from the casing. Before flashing, be sure to have a copy of factory firmware, in case You wish to revert to original firmware. Installation 1. Prepare TFTP server with OpenWrt initramfs-kernel image. 2. Connect to LAN port. 3. Connect to UART port. 4. Power on the device and when prompted to stop autoboot, hit any key. 5. Alter U-Boot environment with following commands: setenv failsafe_boot bootm 0x9f0a0000 saveenv 6. Adjust "ipaddr" and "serverip" addresses in U-Boot environment, use 'setenv' to do that, then run following commands: tftpboot 0x81000000 <openwrt_initramfs-kernel_image_name> bootm 0x81000000 7. Wait about 1 minute for OpenWrt to boot. 8. Transfer OpenWrt sysupgrade image to /tmp directory and flash it with: sysupgrade -n /tmp/<openwrt_sysupgrade_image_name> 9. After flashing, the access point will reboot to OpenWrt. Wait few minutes, until the Power LED stops blinking, then it's ready for configuration. Signed-off-by: Tomasz Maciej Nowak <tomek_n@o2.pl> [add MAC address comment to commit message] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-08-14 18:03:40 +02:00
allnet,all-wap02860ac|\
alfa-network,ap121f|\
alfa-network,pi-wifi4|\
arduino,yun|\
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>
2020-05-14 10:44:21 +02:00
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>
2020-03-20 17:32:30 +01:00
comfast,cf-wr752ac-v1|\
comfast,cf-e130n-v2|\
devolo,dvl1200i|\
devolo,dvl1750c|\
devolo,dvl1750i|\
devolo,dvl1750x|\
dlink,dap-1330-a1|\
dlink,dap-1365-a1|\
dlink,dap-2230-a1|\
dlink,dap-2660-a1|\
dlink,dap-2680-a1|\
dlink,dap-3320-a1|\
dlink,dir-505|\
ath79: add support for Senao Engenius EAP1200H FCC ID: A8J-EAP1200H Engenius EAP1200H is an indoor wireless access point with 1 Gb ethernet port, dual-band wireless, internal antenna plates, and 802.3at PoE+ **Specification:** - QCA9557 SOC - QCA9882 WLAN PCI card, 5 GHz, 2x2, 26dBm - AR8035-A PHY RGMII GbE with PoE+ IN - 40 MHz clock - 16 MB FLASH MX25L12845EMI-10G - 2x 64 MB RAM NT5TU32M16FG - UART at J10 populated - 4 internal antenna plates (5 dbi, omni-directional) - 5 LEDs, 1 button (power, eth0, 2G, 5G, WPS) (reset) **MAC addresses:** MAC addresses are labeled as ETH, 2.4G, and 5GHz Only one Vendor MAC address in flash eth0 ETH *:a2 art 0x0 phy1 2.4G *:a3 --- phy0 5GHz *:a4 --- **Serial Access:** the RX line on the board for UART is shorted to ground by resistor R176 therefore it must be removed to use the console but it is not necessary to remove to view boot log optionally, R175 can be replaced with a solder bridge short the resistors R175 and R176 are next to the UART RX pin at J10 **Installation:** 2 ways to flash factory.bin from OEM: Method 1: Firmware upgrade page: OEM webpage at 192.168.1.1 username and password "admin" Navigate to "Firmware Upgrade" page from left pane Click Browse and select the factory.bin image Upload and verify checksum Click Continue to confirm and wait 3 minutes Method 2: Serial to load Failsafe webpage: After connecting to serial console and rebooting... Interrupt uboot with any key pressed rapidly execute `run failsafe_boot` OR `bootm 0x9fd70000` wait a minute connect to ethernet and navigate to "192.168.1.1/index.htm" Select the factory.bin image and upload wait about 3 minutes **Return to OEM:** If you have a serial cable, see Serial Failsafe instructions otherwise, uboot-env can be used to make uboot load the failsafe image *DISCLAIMER* The Failsafe image is unique to Engenius boards. If the failsafe image is missing or damaged this will brick the device DO NOT downgrade to ar71xx this way, it can cause kernel loop or halt ssh into openwrt and run `fw_setenv rootfs_checksum 0` reboot, wait 3 minutes connect to ethernet and navigate to 192.168.1.1/index.htm select OEM firmware image from Engenius and click upgrade **TFTP recovery:** Requires serial console, reset button does nothing rename initramfs to 'vmlinux-art-ramdisk' make available on TFTP server at 192.168.1.101 power board, interrupt boot execute tftpboot and bootm 0x81000000 NOTE: TFTP is not reliable due to bugged bootloader set MTU to 600 and try many times **Format of OEM firmware image:** The OEM software of EAP1200H is a heavily modified version of Openwrt Kamikaze. One of the many modifications is to the sysupgrade program. Image verification is performed simply by the successful ungzip and untar of the supplied file and name check and header verification of the resulting contents. To form a factory.bin that is accepted by OEM Openwrt build, the kernel and rootfs must have specific names... openwrt-ar71xx-generic-eap1200h-uImage-lzma.bin openwrt-ar71xx-generic-eap1200h-root.squashfs and begin with the respective headers (uImage, squashfs). Then the files must be tarballed and gzipped. The resulting binary is actually a tar.gz file in disguise. This can be verified by using binwalk on the OEM firmware images, ungzipping then untaring. Newer EnGenius software requires more checks but their script includes a way to skip them, otherwise the tar must include a text file with the version and md5sums in a deprecated format. The OEM upgrade script is at /etc/fwupgrade.sh. OKLI kernel loader is required because the OEM software expects the kernel to be no greater than 1536k and the factory.bin upgrade procedure would otherwise overwrite part of the kernel when writing rootfs. Note on PLL-data cells: The default PLL register values will not work because of the external AR8035 switch between the SOC and the ethernet port. For QCA955x series, the PLL registers for eth0 and eth1 can be see in the DTSI as 0x28 and 0x48 respectively. Therefore the PLL registers can be read from uboot for each link speed after attempting tftpboot or another network action using that link speed with `md 0x18050028 1` and `md 0x18050048 1`. The clock delay required for RGMII can be applied at the PHY side, using the at803x driver `phy-mode`. Therefore the PLL registers for GMAC0 do not need the bits for delay on the MAC side. This is possible due to fixes in at803x driver since Linux 5.1 and 5.3 Signed-off-by: Michael Pratt <mcpratt@pm.me>
2021-01-10 08:40:00 +01:00
engenius,eap1200h|\
ath79: add support for Senao Engenius EAP600 FCC ID: A8J-EAP600 Engenius EAP600 is a wireless access point with 1 gigabit ethernet port, dual-band wireless, external ethernet switch, 4 internal antennas and 802.3af PoE. Specification: - AR9344 SOC (5 GHz, 2x2, WMAC) - AR9382 WLAN (2.4 GHz, 2x2, PCIe on-board) - AR8035-A switch (GbE with 802.3af PoE) - 40 MHz reference clock - 16 MB FLASH MX25L12845EMI-10G - 2x 64 MB RAM NT5TU32M16DG - UART at H1 (populated) - 5 LEDs, 1 button (power, eth, 2.4 GHz, 5 GHz, wps) (reset) - 4 internal antennas MAC addresses: MAC addresses are labeled MAC1 and MAC2 The MAC address in flash is not on the label The OEM software reports these MACs for the ifconfig eth0 MAC 1 *:5e --- phy1 MAC 2 *:5f --- (2.4 GHz) phy0 ----- *:60 art 0x0 (5 GHz) Installation: 2 ways to flash factory.bin from OEM: - if you get Failsafe Mode from failed flash: only use it to flash Original firmware from Engenius or risk kernel loop or halt which requires serial cable Method 1: Firmware upgrade page: OEM webpage at 192.168.1.1 username and password "admin" Navigate to "Upgrade Firmware" page from left pane Click Browse and select the factory.bin image Upload and verify checksum Click Continue to confirm and wait 3 minutes Method 2: Serial to load Failsafe webpage: After connecting to serial console and rebooting... Interrupt uboot with any key pressed rapidly execute `run failsafe_boot` OR `bootm 0x9fdf0000` wait a minute connect to ethernet and navigate to "192.168.1.1/index.htm" Select the factory.bin image and upload wait about 3 minutes Return to OEM: If you have a serial cable, see Serial Failsafe instructions otherwise, uboot-env can be used to make uboot load the failsafe image *DISCLAIMER* The Failsafe image is unique to Engenius boards. If the failsafe image is missing or damaged this will not work DO NOT downgrade to ar71xx this way, it can cause kernel loop or halt ssh into openwrt and run `fw_setenv rootfs_checksum 0` reboot, wait 3 minutes connect to ethernet and navigate to 192.168.1.1/index.htm select OEM firmware image from Engenius and click upgrade Format of OEM firmware image: The OEM software of EAP600 is a heavily modified version of Openwrt Kamikaze. One of the many modifications is to the sysupgrade program. Image verification is performed simply by the successful ungzip and untar of the supplied file and name check and header verification of the resulting contents. To form a factory.bin that is accepted by OEM Openwrt build, the kernel and rootfs must have specific names... openwrt-senao-eap600-uImage-lzma.bin openwrt-senao-eap600-root.squashfs and begin with the respective headers (uImage, squashfs). Then the files must be tarballed and gzipped. The resulting binary is actually a tar.gz file in disguise. This can be verified by using binwalk on the OEM firmware images, ungzipping then untaring. The OEM upgrade script is at /etc/fwupgrade.sh Later models in the EAP series likely have a different platform and the upgrade and image verification process differs. OKLI kernel loader is required because the OEM software expects the kernel to be no greater than 1536k and the factory.bin upgrade procedure would overwrite part of the kernel when writing rootfs. Note on PLL-data cells: The default PLL register values will not work because of the external AR8035-A switch between the SOC and the ethernet PHY chips. For AR934x series, the PLL register for GMAC0 can be seen in the DTSI as 0x2c. Therefore the PLL register can be read from uboot for each link speed after attempting tftpboot or another network action using that link speed with `md 0x1805002c 1`. Unfortunately uboot did not have the best values so they were taken from other similar DTS files. Tested from master, all link speeds functional Signed-off-by: Michael Pratt <mcpratt@pm.me>
2020-10-09 18:28:11 +02:00
engenius,eap600|\
ath79: add support for Senao Engenius ECB1200 FCC ID: A8J-ECB1200 Engenius ECB1200 is an indoor wireless access point with a GbE port, 2.4 GHz and 5 GHz wireless, external antennas, and 802.3af PoE. **Specification:** - QCA9557 SOC MIPS, 2.4 GHz (2x2) - QCA9882 WLAN PCIe card, 5 GHz (2x2) - AR8035-A switch RGMII, GbE with 802.3af PoE, 25 MHz clock - 40 MHz reference clock - 16 MB FLASH 25L12845EMI-10G - 2x 64 MB RAM 1538ZFZ V59C1512164QEJ25 - UART at JP1 (unpopulated, RX shorted to ground) - 4 external antennas - 4 LEDs, 1 button (power, eth, wifi2g, wifi5g) (reset) **MAC addresses:** MAC Addresses are labeled as ETH and 5GHZ U-boot environment has the vendor MAC addresses MAC addresses in ART do not match vendor eth0 ETH *:5c u-boot-env ethaddr phy0 5GHZ *:5d u-boot-env athaddr ---- ---- ???? art 0x0/0x6 **Installation:** Method 1: Firmware upgrade page: OEM webpage at 192.168.1.1 username and password "admin" Navigate to "Firmware" page from left pane Click Browse and select the factory.bin image Upload and verify checksum Click Continue to confirm and wait 3 minutes Method 2: Serial to load Failsafe webpage: After connecting to serial console and rebooting... Interrupt uboot with any key pressed rapidly (see TFTP recovery) perform a sysupgrade **Serial Access:** the RX line on the board for UART is shorted to ground by resistor R176 therefore it must be removed to use the console but it is not necessary to remove to view boot log optionally, R175 can be replaced with a solder bridge short the resistors R175 and R176 are next to the UART pinout at JP1 **Return to OEM:** If you have a serial cable, see Serial Failsafe instructions Unlike most Engenius boards, this does not have a 'failsafe' image the only way to return to OEM is TFTP or serial access to u-boot **TFTP recovery:** Unlike most Engenius boards, TFTP is reliable here rename initramfs-kernel.bin to 'ap.bin' make the file available on a TFTP server at 192.168.1.10 power board while holding or pressing reset button repeatedly or with serial access: run `tftpboot` or `run factory_boot` with initramfs-kernel.bin then `bootm` with the load address **Format of OEM firmware image:** The OEM software of ECB1200 is a heavily modified version of Openwrt Altitude Adjustment 12.09. This Engenius board, like ECB1750, uses a proprietary header with a unique Product ID. The header for factory.bin is generated by the mksenaofw program included in openwrt. **Note on PLL-data cells:** The default PLL register values will not work because of the AR8035 switch between the SOC and the ethernet port. For QCA955x series, the PLL registers for eth0 and eth1 can be see in the DTSI as 0x28 and 0x48 respectively. Therefore the PLL registers can be read from uboot for each link speed after attempting tftpboot or another network action using that link speed with `md 0x18050028 1` and `md 0x18050048 1`. However the registers that u-boot sets are not ideal and sometimes wrong... the at803x driver supports setting the RGMII clock/data delay on the PHY side. This way the pll-data register only needs to handle invert and phase. for this board clock invert is needed on the MAC side all link speeds functional Signed-off-by: Michael Pratt <mcpratt@pm.me>
2020-11-01 02:23:33 +01:00
engenius,ecb1200|\
engenius,ecb1750|\
ath79: add support for Senao Engenius ECB600 FCC ID: A8J-ECB600 Engenius ECB600 is a wireless access point with 1 gigabit PoE ethernet port, dual-band wireless, external ethernet switch, and 4 external antennas. Specification: - AR9344 SOC (5 GHz, 2x2, WMAC) - AR9382 WLAN (2.4 GHz, 2x2, PCIe on-board) - AR8035-A switch (GbE with 802.3af PoE) - 40 MHz reference clock - 16 MB FLASH MX25L12845EMI-10G - 2x 64 MB RAM NT5TU32M16DG - UART at H1 (populated) - 4 LEDs, 1 button (power, eth, 2.4 GHz, 5 GHz) (reset) - 4 external antennas MAC addresses: MAC addresses are labeled MAC1 and MAC2 The MAC address in flash is not on the label The OEM software reports these MACs for the ifconfig phy1 MAC 1 *:52 --- (2.4 GHz) phy0 MAC 2 *:53 --- (5 GHz) eth0 ----- *:54 art 0x0 Installation: 2 ways to flash factory.bin from OEM: - if you get Failsafe Mode from failed flash: only use it to flash Original firmware from Engenius or risk kernel loop or halt which requires serial cable Method 1: Firmware upgrade page: OEM webpage at 192.168.1.1 username and password "admin" Navigate to "Upgrade Firmware" page from left pane Click Browse and select the factory.bin image Upload and verify checksum Click Continue to confirm and wait 3 minutes Method 2: Serial to load Failsafe webpage: After connecting to serial console and rebooting... Interrupt uboot with any key pressed rapidly execute `run failsafe_boot` OR `bootm 0x9fdf0000` wait a minute connect to ethernet and navigate to "192.168.1.1/index.htm" Select the factory.bin image and upload wait about 3 minutes Return to OEM: If you have a serial cable, see Serial Failsafe instructions otherwise, uboot-env can be used to make uboot load the failsafe image *DISCLAIMER* The Failsafe image is unique to Engenius boards. If the failsafe image is missing or damaged this will not work DO NOT downgrade to ar71xx this way, it can cause kernel loop or halt ssh into openwrt and run `fw_setenv rootfs_checksum 0` reboot, wait 3 minutes connect to ethernet and navigate to 192.168.1.1/index.htm select OEM firmware image from Engenius and click upgrade Format of OEM firmware image: The OEM software of ECB600 is a heavily modified version of Openwrt Kamikaze. One of the many modifications is to the sysupgrade program. Image verification is performed simply by the successful ungzip and untar of the supplied file and name check and header verification of the resulting contents. To form a factory.bin that is accepted by OEM Openwrt build, the kernel and rootfs must have specific names... openwrt-senao-ecb600-uImage-lzma.bin openwrt-senao-ecb600-root.squashfs and begin with the respective headers (uImage, squashfs). Then the files must be tarballed and gzipped. The resulting binary is actually a tar.gz file in disguise. This can be verified by using binwalk on the OEM firmware images, ungzipping then untaring. The OEM upgrade script is at /etc/fwupgrade.sh Later models in the ECB series likely have a different platform and the upgrade and image verification process differs. OKLI kernel loader is required because the OEM software expects the kernel to be no greater than 1536k and the factory.bin upgrade procedure would overwrite part of the kernel when writing rootfs. Note on PLL-data cells: The default PLL register values will not work because of the external AR8035-A switch between the SOC and the ethernet PHY chips. For AR934x series, the PLL register for GMAC0 can be seen in the DTSI as 0x2c. Therefore the PLL register can be read from uboot for each link speed after attempting tftpboot or another network action using that link speed with `md 0x1805002c 1`. Unfortunately uboot did not have the best values so they were taken from other similar DTS files. Tested from master, all link speeds functional Signed-off-by: Michael Pratt <mcpratt@pm.me>
2020-09-15 19:44:39 +02:00
engenius,ecb600|\
enterasys,ws-ap3705i|\
glinet,gl-ar300m-lite|\
glinet,gl-usb150|\
hak5,wifi-pineapple-nano|\
ath79: add support for Meraki MR16 Port device support for Meraki MR16 from the ar71xx target to ath79. Specifications: * AR7161 CPU, 16 MiB Flash, 64 MiB RAM * One PoE-capable Gigabit Ethernet Port * AR9220 / AR9223 (2x2 11an / 11n) WLAN Installation: * Requires TFTP server at 192.168.1.101, w/ initramfs & sysupgrade .bins * Open shell case and connect a USB to TTL cable to upper serial headers * Power on the router; connect to U-boot over 115200-baud connection * Interrupt U-boot process to boot Openwrt by running: setenv bootcmd bootm 0xbf0a0000; saveenv; tftpboot 0c00000 <filename-of-initramfs-kernel>.bin; bootm 0c00000; * Copy sysupgrade image to /tmp on MR16 * sysupgrade /tmp/<filename-of-sysupgrade>.bin Notes: - There are two separate ARTs in the partition (offset 0x1000/0x5000 and 0x11000/0x15000) in the OEM device. I suspect this is an OEM artifact; possibly used to configure the radios for different regions, circumstances or RF frontends. Since the ar71xx target uses the second offsets, use that second set (0x11000 and 0x15000) for the ART. - kmod-owl-loader is still required to load the ART partition into the driver. - The manner of storing MAC addresses is updated from ar71xx; it is at 0x66 of the 'config' partition, where it was discovered that the OEM firmware stores it. This is set as read-only. If you are migrating from ar71xx and used the method mentioned above to upgrade, use kmod-mtd-rw or UCI to add the MAC back in. One more method for doing this is described below. - Migrating directly from ar71xx has not been thoroughly tested, but one method has been used a couple of times with good success, migrating 18.06.2 to a full image produced as of this commit. Please note that these instructions are only for experienced users, and/or those still able to open their device up to flash it via the serial headers should anything go wrong. 1) Install kmod-mtd-rw and uboot-envtools 2) Run `insmod mtd-rw.ko i_want_a_brick=1` 3) Modify /etc/fw_env.config to point to the u-boot-env partition. The file /etc/fw_env.config should contain: # MTD device env offset env size sector size /dev/mtd1 0x00000 0x10000 0x10000 See https://openwrt.org/docs/techref/bootloader/uboot.config for more details. 4) Run `fw_printenv` to verify everything is correct, as per the link above. 5) Run `fw_setenv bootcmd bootm 0xbf0a0000` to set a new boot address. 6) Manually modify /lib/upgrade/common.sh's get_image function: Change ... cat "$from" 2>/dev/null | $cmd ... into ... ( dd if=/dev/zero bs=1 count=$((0x66)) ; # Pad the first 102 bytes echo -ne '\x00\x18\x0a\x12\x34\x56' ; # Add in MAC address dd if=/dev/zero bs=1 count=$((0x20000-0x66-0x6)) ; # Pad the rest cat "$from" 2>/dev/null | $cmd ) ... which, during the upgrade process, will pad the image by 128K of zeroes-plus-MAC-address, in order for the ar71xx's firmware partition -- which starts at 0xbf080000 -- to be instead aligned with the ath79 firmware partition, which starts 128K later at 0xbf0a0000. 7) Copy the sysupgrade image into /tmp, as above 8) Run `sysupgrade -F /tmp/<sysupgrade>.bin`, then wait Again, this may BRICK YOUR DEVICE, so make *sure* to have your serial cable handy. Addenda: - The MR12 should be able to be migrated in a nearly identical manner as it shares much of its hardware with the MR16. - Thank-you Chris B for copious help with this port. Signed-off-by: Martin Kennedy <hurricos@gmail.com> [fix typo in compat message, drop art DT label, move 05_fix-compat-version to subtarget] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-08-29 06:22:53 +02:00
meraki,mr16|\
netgear,ex6400|\
netgear,ex7300|\
ocedo,koala|\
ocedo,raccoon|\
onion,omega|\
ath79: Add support for OpenMesh MR600 v1 Device specifications: ====================== * Qualcomm/Atheros AR9344 rev 2 * 560/450/225 MHz (CPU/DDR/AHB) * 128 MB of RAM * 16 MB of SPI NOR flash - 2x 7 MB available; but one of the 7 MB regions is the recovery image * 2T2R 2.4 GHz Wi-Fi * 2T2R 5 GHz Wi-Fi * 4x GPIO-LEDs (2x wifi, 1x wps, 1x power) * 1x GPIO-button (reset) * TTL pins are on board (arrow points to VCC, then follows: GND, TX, RX) * 1x ethernet - AR8035 ethernet PHY (RGMII) - 10/100/1000 Mbps Ethernet - 802.3af POE - used as LAN interface * 12-24V 1A DC * internal antennas Flashing instructions: ====================== Various methods can be used to install the actual image on the flash. Two easy ones are: ap51-flash ---------- The tool ap51-flash (https://github.com/ap51-flash/ap51-flash) should be used to transfer the image to the u-boot when the device boots up. initramfs from TFTP ------------------- The serial console must be used to access the u-boot shell during bootup. It can then be used to first boot up the initramfs image from a TFTP server (here with the IP 192.168.1.21): setenv serverip 192.168.1.21 setenv ipaddr 192.168.1.1 tftpboot 0c00000 <filename-of-initramfs-kernel>.bin && bootm $fileaddr The actual sysupgrade image can then be transferred (on the LAN port) to the device via scp <filename-of-squashfs-sysupgrade>.bin root@192.168.1.1:/tmp/ On the device, the sysupgrade must then be started using sysupgrade -n /tmp/<filename-of-squashfs-sysupgrade>.bin Signed-off-by: Sven Eckelmann <sven@narfation.org> [rebase, make WLAN LEDs consistent, add LED migration] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-11-23 13:41:34 +01:00
openmesh,mr600-v1|\
ath79: Add support for OpenMesh MR600 v2 Device specifications: ====================== * Qualcomm/Atheros AR9344 rev 2 * 560/450/225 MHz (CPU/DDR/AHB) * 128 MB of RAM * 16 MB of SPI NOR flash - 2x 7 MB available; but one of the 7 MB regions is the recovery image * 2T2R 2.4 GHz Wi-Fi * 2T2R 5 GHz Wi-Fi * 8x GPIO-LEDs (6x wifi, 1x wps, 1x power) * 1x GPIO-button (reset) * external h/w watchdog (enabled by default)) * TTL pins are on board (arrow points to VCC, then follows: GND, TX, RX) * 1x ethernet - AR8035 ethernet PHY (RGMII) - 10/100/1000 Mbps Ethernet - 802.3af POE - used as LAN interface * 12-24V 1A DC * internal antennas Flashing instructions: ====================== Various methods can be used to install the actual image on the flash. Two easy ones are: ap51-flash ---------- The tool ap51-flash (https://github.com/ap51-flash/ap51-flash) should be used to transfer the image to the u-boot when the device boots up. initramfs from TFTP ------------------- The serial console must be used to access the u-boot shell during bootup. It can then be used to first boot up the initramfs image from a TFTP server (here with the IP 192.168.1.21): setenv serverip 192.168.1.21 setenv ipaddr 192.168.1.1 tftpboot 0c00000 <filename-of-initramfs-kernel>.bin && bootm $fileaddr The actual sysupgrade image can then be transferred (on the LAN port) to the device via scp <filename-of-squashfs-sysupgrade>.bin root@192.168.1.1:/tmp/ On the device, the sysupgrade must then be started using sysupgrade -n /tmp/<filename-of-squashfs-sysupgrade>.bin Signed-off-by: Sven Eckelmann <sven@narfation.org> [rebase, add LED migration] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-11-23 13:41:34 +01:00
openmesh,mr600-v2|\
ath79: Add support for OpenMesh MR900 v1 Device specifications: ====================== * Qualcomm/Atheros QCA9558 ver 1 rev 0 * 720/600/240 MHz (CPU/DDR/AHB) * 128 MB of RAM * 16 MB of SPI NOR flash - 2x 7 MB available; but one of the 7 MB regions is the recovery image * 3T3R 2.4 GHz Wi-Fi * 3T3R 5 GHz Wi-Fi * 6x GPIO-LEDs (2x wifi, 2x status, 1x lan, 1x power) * 1x GPIO-button (reset) * external h/w watchdog (enabled by default)) * TTL pins are on board (arrow points to VCC, then follows: GND, TX, RX) * 1x ethernet - AR8035 ethernet PHY (RGMII) - 10/100/1000 Mbps Ethernet - 802.3af POE - used as LAN interface * 12-24V 1A DC * internal antennas Flashing instructions: ====================== Various methods can be used to install the actual image on the flash. Two easy ones are: ap51-flash ---------- The tool ap51-flash (https://github.com/ap51-flash/ap51-flash) should be used to transfer the image to the u-boot when the device boots up. initramfs from TFTP ------------------- The serial console must be used to access the u-boot shell during bootup. It can then be used to first boot up the initramfs image from a TFTP server (here with the IP 192.168.1.21): setenv serverip 192.168.1.21 setenv ipaddr 192.168.1.1 tftpboot 0c00000 <filename-of-initramfs-kernel>.bin && bootm $fileaddr The actual sysupgrade image can then be transferred (on the LAN port) to the device via scp <filename-of-squashfs-sysupgrade>.bin root@192.168.1.1:/tmp/ On the device, the sysupgrade must then be started using sysupgrade -n /tmp/<filename-of-squashfs-sysupgrade>.bin Signed-off-by: Sven Eckelmann <sven@narfation.org> [rebase, add LED migration] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-11-23 13:41:34 +01:00
openmesh,mr900-v1|\
ath79: Add support for OpenMesh MR900 v2 Device specifications: ====================== * Qualcomm/Atheros QCA9558 ver 1 rev 0 * 720/600/240 MHz (CPU/DDR/AHB) * 128 MB of RAM * 16 MB of SPI NOR flash - 2x 7 MB available; but one of the 7 MB regions is the recovery image * 3T3R 2.4 GHz Wi-Fi * 3T3R 5 GHz Wi-Fi * 6x GPIO-LEDs (2x wifi, 2x status, 1x lan, 1x power) * 1x GPIO-button (reset) * external h/w watchdog (enabled by default)) * TTL pins are on board (arrow points to VCC, then follows: GND, TX, RX) * 1x ethernet - AR8035 ethernet PHY (RGMII) - 10/100/1000 Mbps Ethernet - 802.3af POE - used as LAN interface * 12-24V 1A DC * internal antennas Flashing instructions: ====================== Various methods can be used to install the actual image on the flash. Two easy ones are: ap51-flash ---------- The tool ap51-flash (https://github.com/ap51-flash/ap51-flash) should be used to transfer the image to the u-boot when the device boots up. initramfs from TFTP ------------------- The serial console must be used to access the u-boot shell during bootup. It can then be used to first boot up the initramfs image from a TFTP server (here with the IP 192.168.1.21): setenv serverip 192.168.1.21 setenv ipaddr 192.168.1.1 tftpboot 0c00000 <filename-of-initramfs-kernel>.bin && bootm $fileaddr The actual sysupgrade image can then be transferred (on the LAN port) to the device via scp <filename-of-squashfs-sysupgrade>.bin root@192.168.1.1:/tmp/ On the device, the sysupgrade must then be started using sysupgrade -n /tmp/<filename-of-squashfs-sysupgrade>.bin Signed-off-by: Sven Eckelmann <sven@narfation.org> [rebase, add LED migration] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-11-23 13:41:34 +01:00
openmesh,mr900-v2|\
ath79: Add support for OpenMesh MR1750 v1 Device specifications: ====================== * Qualcomm/Atheros QCA9558 ver 1 rev 0 * 720/600/240 MHz (CPU/DDR/AHB) * 128 MB of RAM * 16 MB of SPI NOR flash - 2x 7 MB available; but one of the 7 MB regions is the recovery image * 3T3R 2.4 GHz Wi-Fi (11n) * 3T3R 5 GHz Wi-Fi (11ac) * 6x GPIO-LEDs (2x wifi, 2x status, 1x lan, 1x power) * 1x GPIO-button (reset) * external h/w watchdog (enabled by default)) * TTL pins are on board (arrow points to VCC, then follows: GND, TX, RX) * 1x ethernet - AR8035 ethernet PHY (RGMII) - 10/100/1000 Mbps Ethernet - 802.3af POE - used as LAN interface * 12-24V 1A DC * internal antennas Flashing instructions: ====================== Various methods can be used to install the actual image on the flash. Two easy ones are: ap51-flash ---------- The tool ap51-flash (https://github.com/ap51-flash/ap51-flash) should be used to transfer the image to the u-boot when the device boots up. initramfs from TFTP ------------------- The serial console must be used to access the u-boot shell during bootup. It can then be used to first boot up the initramfs image from a TFTP server (here with the IP 192.168.1.21): setenv serverip 192.168.1.21 setenv ipaddr 192.168.1.1 tftpboot 0c00000 <filename-of-initramfs-kernel>.bin && bootm $fileaddr The actual sysupgrade image can then be transferred (on the LAN port) to the device via scp <filename-of-squashfs-sysupgrade>.bin root@192.168.1.1:/tmp/ On the device, the sysupgrade must then be started using sysupgrade -n /tmp/<filename-of-squashfs-sysupgrade>.bin Signed-off-by: Sven Eckelmann <sven@narfation.org> [rebase, apply shared DTSI/device node, add LED migration] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-11-23 13:41:34 +01:00
openmesh,mr1750-v1|\
ath79: Add support for OpenMesh MR1750 v2 Device specifications: ====================== * Qualcomm/Atheros QCA9558 ver 1 rev 0 * 720/600/240 MHz (CPU/DDR/AHB) * 128 MB of RAM * 16 MB of SPI NOR flash - 2x 7 MB available; but one of the 7 MB regions is the recovery image * 3T3R 2.4 GHz Wi-Fi (11n) * 3T3R 5 GHz Wi-Fi (11ac) * 6x GPIO-LEDs (2x wifi, 2x status, 1x lan, 1x power) * 1x GPIO-button (reset) * external h/w watchdog (enabled by default)) * TTL pins are on board (arrow points to VCC, then follows: GND, TX, RX) * 1x ethernet - AR8035 ethernet PHY (RGMII) - 10/100/1000 Mbps Ethernet - 802.3af POE - used as LAN interface * 12-24V 1A DC * internal antennas Flashing instructions: ====================== Various methods can be used to install the actual image on the flash. Two easy ones are: ap51-flash ---------- The tool ap51-flash (https://github.com/ap51-flash/ap51-flash) should be used to transfer the image to the u-boot when the device boots up. initramfs from TFTP ------------------- The serial console must be used to access the u-boot shell during bootup. It can then be used to first boot up the initramfs image from a TFTP server (here with the IP 192.168.1.21): setenv serverip 192.168.1.21 setenv ipaddr 192.168.1.1 tftpboot 0c00000 <filename-of-initramfs-kernel>.bin && bootm $fileaddr The actual sysupgrade image can then be transferred (on the LAN port) to the device via scp <filename-of-squashfs-sysupgrade>.bin root@192.168.1.1:/tmp/ On the device, the sysupgrade must then be started using sysupgrade -n /tmp/<filename-of-squashfs-sysupgrade>.bin Signed-off-by: Sven Eckelmann <sven@narfation.org> [rebase, add LED migration] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-11-23 13:41:34 +01:00
openmesh,mr1750-v2|\
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>
2019-08-04 16:13:45 +02:00
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,cpe710-v1|\
ath79: support for TP-Link EAP225-Outdoor v1 TP-Link EAP225-Outdoor v1 is an AC1200 (802.11ac Wave-2) pole or wall mount access point. Debricking requires access to the serial port, which is non-trivial. Device specifications: * SoC: QCA9563 @ 775MHz * Memory: 128MiB DDR2 * Flash: 16MiB SPI-NOR * Wireless 2.4GHz (SoC): b/g/n 2x2 * Wireless 5GHz (QCA9886): a/n/ac 2x2 MU-MIMO * Ethernet (AR8033): 1× 1GbE, PoE Flashing instructions: * ssh into target device with recent (>= v1.6.0) firmware * run `cliclientd stopcs` on target device * upload factory image via web interface Debricking: To recover the device, you need access to the serial port. This requires fine soldering to test points, or the use of probe pins. * Open the case and solder wires to the test points: RXD, TXD and TPGND4 * Use a 3.3V UART, 115200 baud, 8n1 * Interrupt bootloader by holding ctrl+B during boot * upload initramfs via built-in tftp client and perform sysupgrade setenv ipaddr 192.168.1.1 # default, change as required setenv serverip 192.168.1.10 # default, change as required tftp 0x80800000 initramfs.bin bootelf $fileaddr MAC addresses: MAC address (as on device label) is stored in device info partition at an offset of 8 bytes. ath9k device has same address as ethernet, ath10k uses address incremented by 1. From stock ifconfig: ath0 Link encap:Ethernet HWaddr D8:...:2E ath10 Link encap:Ethernet HWaddr D8:...:2F br0 Link encap:Ethernet HWaddr D8:...:2E eth0 Link encap:Ethernet HWaddr D8:...:2E Tested by forum user PolynomialDivision on firmware v1.7.0. UART access tested by forum user arinc9. Signed-off-by: Sander Vanheule <sander@svanheule.net>
2020-07-07 18:04:37 +02:00
tplink,eap225-outdoor-v1|\
ath79: add support for TP-Link EAP225 v1 TP-Link EAP225 v1 is an AC1200 (802.11ac Wave-1) ceiling mount access point. Device specifications: * SoC: QCA9563 @ 775MHz * RAM: 128MiB DDR2 * Flash: 16MiB SPI-NOR * Wireless 2.4GHz (SoC): b/g/n, 2x2 * Wireless 5Ghz (QCA9882): a/n/ac, 2x2 * Ethernet (AR8033): 1× 1GbE, 802.3at PoE Flashing instructions: * Ensure the device is upgraded to firmware v1.4.0 * Exploit the user management page in the web interface to start telnetd by changing the username to `;/usr/sbin/telnetd -l/bin/sh&`. * Immediately change the malformed username back to something valid (e.g. 'admin') to make ssh work again. * Use the root shell via telnet to make /tmp world writeable (chmod 777) * Extract /usr/bin/uclited from the device via ssh and apply the binary patch listed below. The patch is required to prevent `uclited -u` in the last step from crashing. * Copy the patched uclited binary back to the device at /tmp/uclited (via ssh) * Upload the factory image to /tmp/upgrade.bin (via ssh) * Run `chmod +x /tmp/uclited && /tmp/uclited -u` to install OpenWrt. uclited patching: --- xxd uclited +++ xxd uclited-patched @@ -53811,7 +53811,7 @@ 000d2330: 8c44 0000 0320 f809 0000 0000 8fbc 0010 .D... .......... 000d2340: 8fa6 0a4c 02c0 2821 8f82 87c4 0000 0000 ...L..(!........ -000d2350: 8c44 0000 0c13 461c 27a7 0018 8fbc 0010 .D....F.'....... +000d2350: 8c44 0000 2402 0000 0000 0000 8fbc 0010 .D..$........... 000d2360: 1040 001d 0000 1821 8f99 8378 3c04 0058 .@.....!...x<..X 000d2370: 3c05 0056 2484 ad68 24a5 9f00 0320 f809 <..V$..h$.... .. To make sure the correct file is patched, the following MD5 checksums should match the unpatched and patched files: 4bd74183c23859c897ed77e8566b84de uclited 4107104024a2e0aeaf6395ed30adccae uclited-patched Debricking: * Serial port can be soldered on unpopulated 4-pin header (1: TXD, 2: RXD, 3: GND, 4: VCC) * Bridge unpopulated resistors running from pins 1 (TXD) and 2 (RXD). Do NOT bridge the pull-down for pin 2, running parallel to the header. * Use 3.3V, 115200 baud, 8n1 * Interrupt bootloader by holding CTRL+B during boot * tftp initramfs to flash via the LuCI web interface setenv ipaddr 192.168.1.1 # default, change as required setenv serverip 192.168.1.10 # default, change as required tftp 0x80800000 initramfs.bin bootelf $fileaddr Tested by forum user KernelMaker. Link: https://forum.openwrt.org/t/eap225-v1-firmware/87116 Signed-off-by: Sander Vanheule <sander@svanheule.net>
2021-11-22 20:59:06 +01:00
tplink,eap225-v1|\
tplink,eap225-v3|\
ath79: support for TP-Link EAP245 v1 TP-Link EAP245 v1 is an AC1750 (802.11ac Wave-1) ceiling mount access point. Device specifications: * SoC: QCA9563 @ 775MHz * RAM: 128MiB DDR2 * Flash: 16MiB SPI-NOR * Wireless 2.4GHz (SoC): b/g/n, 3x3 * Wireless 5Ghz (QCA9880): a/n/ac, 3x3 * Ethernet (AR8033): 1× 1GbE, 802.3at PoE Flashing instructions: * Upgrade the device to firmware v1.4.0 if necessary * Exploit the user management page in the web interface to start telnetd by changing the username to `;/usr/sbin/telnetd -l/bin/sh&`. * Immediately change the malformed username back to something valid (e.g. 'admin') to make ssh work again. * Use the root shell via telnet to make /tmp world writeable (chmod 777) * Extract /usr/bin/uclited from the device via ssh and apply the binary patch listed below. The patch is required to prevent `uclited -u` in the last step from crashing. * Copy the patched uclited programme back to the device at /tmp/uclited (via ssh) * Upload the factory image to /tmp/upgrade.bin (via ssh) * Run `chmod +x /tmp/uclited && /tmp/uclited -u` to install OpenWrt. --- xxd uclited +++ xxd uclited-patched @@ -53796,7 +53796,7 @@ 000d2240: 8c44 0000 0320 f809 0000 0000 8fbc 0010 .D... .......... 000d2250: 8fa6 0a4c 02c0 2821 8f82 87b8 0000 0000 ...L..(!........ -000d2260: 8c44 0000 0c13 45e0 27a7 0018 8fbc 0010 .D....E.'....... +000d2260: 8c44 0000 2402 0000 0000 0000 8fbc 0010 .D..$........... 000d2270: 1040 001d 0000 1821 8f99 8374 3c04 0058 .@.....!...t<..X 000d2280: 3c05 0056 2484 a898 24a5 9a30 0320 f809 <..V$...$..0. .. Debricking: * Serial port can be soldered on PCB J3 (1: TXD, 2: RXD, 3: GND, 4: VCC) * Bridge unpopulated resistors R225 (TXD) and R237 (RXD). Do NOT bridge R230. * Use 3.3V, 115200 baud, 8n1 * Interrupt bootloader by holding CTRL+B during boot * tftp initramfs to flash via the LuCI web interface setenv ipaddr 192.168.1.1 # default, change as required setenv serverip 192.168.1.10 # default, change as required tftp 0x80800000 initramfs.bin bootelf $fileaddr Tested on the EAP245 v1 running the latest firmware (v1.4.0). The binary patch might not apply to uclited from other firmware versions. EAP245 v1 device support was originally developed and maintained by Julien Dusser out-of-tree. This patch and "ath79: prepare for 1-port TP-Link EAP2x5 devices" are based on that work. Signed-off-by: Sander Vanheule <sander@svanheule.net>
2020-07-17 12:06:03 +02:00
tplink,eap245-v1|\
tplink,re350k-v1|\
tplink,re355-v1|\
tplink,re450-v1|\
tplink,re450-v2|\
tplink,re450-v3|\
tplink,re455-v1|\
tplink,tl-wa1201-v2|\
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>
2019-12-01 19:31:32 +01:00
tplink,tl-wr902ac-v1|\
ath79: Add support for Ubiquiti Bullet AC CPU: Atheros AR9342 rev 3 SoC RAM: 64 MB DDR2 Flash: 16 MB NOR SPI WLAN 2.4GHz: Atheros AR9342 v3 (ath9k) WLAN 5.0GHz: QCA988X Ports: 1x GbE Flashing procedure is identical to other ubnt devices. https://openwrt.org/toh/ubiquiti/common Flashing through factory firmware 1. Ensure firmware version v8.7.0 is installed. Up/downgrade to this exact version. 2. Patch fwupdate.real binary using `hexdump -Cv /bin/ubntbox | sed 's/14 40 fe 27/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 (copied from Ubiquiti NanoBeam AC and modified) Flashing from serial console 1. Connect serial console (115200 baud) 2. Connect ethernet to a network with a TFTP server, through a passive PoE injector. 3. Press a key to obtain a u-boot prompt 4. Set your TFTP server's ip address, with: setenv serverip <tftp-server-address> 5. Set the Bullet AC's ip address, with: setenv ipaddr <bullet-ac-address> 6. Set the boot file, with: setenv bootfile <name-of-initramfs-binary-on-tftp-server> 7. Fetch the binary with tftp: tftpboot 8. Boot the initramfs binary: bootm 9. From the initramfs, fetch the sysupgrade binary, and flash it with sysupgrade. The Bullet AC is identified as a 2WA board by Ubiquiti. As such, the UBNT_TYPE must match from the "Flashing through factory firmware" install instructions to work. Phy0 is QCA988X which can tune either band (2.4 or 5GHz). Phy1 is AR9342, on which 5GHz is disabled. It isn't currently known whether phy1 is routed to the N connector at all. Signed-off-by: Russell Senior <russell@personaltelco.net>
2020-12-23 03:32:54 +01:00
ubnt,bullet-ac|\
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>
2020-03-19 12:27:28 +01:00
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>
2019-01-08 15:27:57 +01:00
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>
2020-03-15 18:20:03 +01:00
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>
2020-02-17 12:22:53 +01:00
ubnt,nanostation-loco-m|\
ubnt,nanostation-loco-m-xw|\
ubnt,picostation-m|\
ubnt,powerbeam-5ac-500|\
ubnt,powerbeam-5ac-gen2|\
ubnt,powerbeam-m2-xw|\
ubnt,powerbeam-m5-xw|\
ubnt,powerbridge-m|\
ubnt,rocket-5ac-lite|\
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"
;;
ath79: add support for AirTight C-75 AirTight Networks (later renamed to Mojo Networks) C-75 is a dual-band access point, also sold by WatchGuard under name AP320. Specification SoC: Qualcomm Atheros QCA9550 RAM: 128 MiB DDR2 Flash: 2x 16 MiB SPI NOR WIFI: 2.4 GHz 3T3R integrated 5 GHz 3T3R QCA9890 oversized Mini PCIe card Ethernet: 2x 10/100/1000 Mbps QCA8334 port labeled LAN1 is PoE capable (802.3at) USB: 1x 2.0 LEDs: 7x which two are GPIO controlled, four switch controlled, one controlled by wireless driver Buttons: 1x GPIO controlled Serial: RJ-45 port, Cisco pinout baud: 115200, parity: none, flow control: none JTAG: Yes, pins marked J1 on PCB Installation 1. Prepare TFTP server with OpenWrt initramfs-kernel image. 2. Connect to one of LAN ports. 3. Connect to serial port. 4. Power on the device and when prompted to stop autoboot, hit any key. 5. Adjust "ipaddr" and "serverip" addresses in U-Boot environment, use 'setenv' to do that, then run following commands: tftpboot 0x81000000 <openwrt_initramfs-kernel_image_name> bootm 0x81000000 6. Wait about 1 minute for OpenWrt to boot. 7. Transfer OpenWrt sysupgrade image to /tmp directory and flash it with: sysupgrade -n /tmp/<openwrt_sysupgrade_image_name> 8. After flashing, the access point will reboot to OpenWrt. Wait few minutes, until the Power LED stops blinking, then it's ready for configuration. Known issues Green power LED does not work. Additional information The U-Boot fails to initialise ethernet ports correctly when a UART adapter is attached to UART pins (marked J3 on PCB). Cc: Vladimir Georgievsky <vladimir.georgievsky@yahoo.com> Signed-off-by: Tomasz Maciej Nowak <tmn505@gmail.com>
2020-12-17 17:24:26 +01:00
airtight,c-75)
ucidef_add_switch "switch0" \
"0@eth0" "2:wan" "3:lan" "6@eth1"
;;
alfa-network,ap121fe)
ucidef_set_interface_lan "eth0 usb0"
;;
alfa-network,n2q|\
ath79: add support for ALFA Network N5Q ALFA Network N5Q is a successor of previous model, the N5 (outdoor CPE/AP, based on Atheros AR7240 + AR9280). New version is based on Atheros AR9344. Support for this device was first introduced in 4b0eebe9df (ar71xx target) but users are advised to migrate from ar71xx target without preserving settings as ath79 support includes some changes in network and LED default configuration. They were aligned with vendor firmware and recently added N2Q model (both Ethernet ports as LAN, labelled as LAN1 and LAN2). Specifications: - Atheros AR9344 - 550/400/200 MHz (CPU/DDR/AHB) - 64 MB of RAM (DDR2) - 16 MB of flash (SPI NOR) - 2x 10/100 Mbps Ethernet, with passive PoE support (24 V) - 2T2R 5 GHz Wi-Fi, with ext. PA (RFPA5542) and LNA, up to 27 dBm - 2x IPEX/U.FL or MMCX antenna connectors (for PCBA version) - 8x LED (7 are driven by GPIO) - 1x button (reset) - external h/w watchdog (EM6324QYSP5B, enabled by default) - header for optional 802.3at/af PoE module - DC jack for main power input (optional, not installed by default) - UART (4-pin, 2.54 mm pitch) header on PCB - LEDs (2x 5-pin, 2.54 mm pitch) header on PCB Flash instruction: You can use sysupgrade image directly in vendor firmware which is based on OpenWrt/LEDE. Alternatively, you can use web recovery mode in U-Boot: 1. Configure PC with static IP 192.168.1.2/24. 2. Connect PC with one of RJ45 ports, press the reset button, power up device, wait for first blink of all LEDs (indicates network setup), then keep button for 3 following blinks and release it. 3. Open 192.168.1.1 address in your browser and upload sysupgrade image. Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2020-05-12 23:44:10 +02:00
alfa-network,n5q|\
devolo,dvl1200e|\
devolo,dvl1750e|\
engenius,enstationac-v1|\
engenius,ews511ap|\
ocedo,ursus|\
ubnt,unifi-ap-outdoor-plus)
ucidef_set_interface_lan "eth0 eth1"
;;
2020-09-07 18:52:31 +02:00
atheros,db120)
ucidef_add_switch "switch0" \
"0@eth0" "2:lan" "3:lan" "4:lan" "5:lan" "1:wan"
ucidef_add_switch "switch1" \
"0@eth1" "1:lan" "2:lan" "3:lan" "4:lan" "5:lan"
;;
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"
;;
belkin,f9j1108-v2|\
belkin,f9k1115-v2|\
tplink,archer-c5-v1|\
tplink,archer-c7-v1|\
tplink,archer-c7-v2|\
tplink,tl-wdr4900-v2|\
tplink,tl-wdr7500-v3)
ucidef_add_switch "switch0" \
"0@eth1" "2:lan" "3:lan" "4:lan" "5:lan" "6@eth0" "1:wan"
;;
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-600dhp|\
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>
2020-02-12 14:43:15 +01:00
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"
;;
ath79: Add support for Buffalo WZR-HP-G300NH This device is a wireless router working on 2.4GHz band based on Qualcom/Atheros AR9132 rev 2 SoC and is accompanied by Atheros AR9103 wireless chip and Realtek RTL8366RB/S switches. Due to two different switches being used also two different devices are provided. Specification: - 400 MHz CPU - 64 MB of RAM - 32 MB of FLASH (NOR) - 3x3:2 2.4 GHz 802.11bgn - 5x 10/100/1000 Mbps Ethernet - 4x LED, 3x button, On/Off slider, Auto/On/Off slider - 1x USB 2.0 - bare UART header place on PCB Flash instruction: - NOTE: Pay attention to the switch variant and choose the image to flash accordingly. (dmesg / kernel logs can tell it) - Methods for flashing - Apply factory image in OEM firmware web-gui. - Sysupgrade on top of existing OpenWRT image - U-Boot TFPT recovery for both stock or OpenWRT images: The device U-boot contains a TFTP server that by default has an address 192.168.11.1 (MAC 02:AA:BB:CC:DD:1A). During the boot there is a time window, during which the device allows an image to be uploaded from a client with address 192.168.11.2. The image will be written on flash automatically. 1) Have a computer with static IP address 192.168.11.2 and the router device switched off. 2) Connect the LAN port next to the WAN port in the device and the computer using a network switch. 3) Assign IP 192.168.11.1 the MAC address 02:AA:BB:CC:DD:1A arp -s 192.168.11.1 02:AA:BB:CC:DD:1A 4) Initiate an upload using TFTP image variant curl -T <imagename> tftp://192.168.11.1 5) Switch on the device. The image will be uploaded subsequently. You can keep an eye on the diag light on the device, it should keep on blinking for a while indicating the writing of the image. General notes: - In the stock firmware the MAC address is the same among all interfaces so it is left here that way too. Recovery: - TFTP method - U-boot serial console Differences to ar71xx platform - This device is split in two different targets now due to hardware being a bit different under the hood. Dynamic solution within the same image is left for later time. - GPIOs for a sliding On/Off switch, marked 'Movie engine' on the device cover, were the wrong way around and were renamed qos_on -> movie_off, qos_off -> movie_on. Associated key codes remained the same they were. The device tree source code is mostly based on musashino's work Signed-off-by: Mauri Sandberg <sandberg@mailfence.com>
2020-09-07 21:04:26 +02:00
buffalo,wzr-hp-g300nh-rb|\
buffalo,wzr-hp-g300nh-s|\
dlink,dir-825-b1)
ucidef_set_interface_wan "eth1"
ucidef_add_switch "switch0" \
"0:lan" "1:lan" "2:lan" "3:lan" "5@eth0"
;;
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|\
2019-07-25 03:06:32 +02:00
compex,wpj531-16m|\
ath79: Add support for OpenMesh A40 Device specifications: ====================== * Qualcomm/Atheros QCA9558 ver 1 rev 0 * 720/600/240 MHz (CPU/DDR/AHB) * 128 MB of RAM * 16 MB of SPI NOR flash - 2x 7 MB available; but one of the 7 MB regions is the recovery image * 2T2R 2.4 GHz Wi-Fi (11n) * 2T2R 5 GHz Wi-Fi (11ac) * multi-color LED (controlled via red/green/blue GPIOs) * 1x GPIO-button (reset) * external h/w watchdog (enabled by default)) * TTL pins are on board (arrow points to VCC, then follows: GND, TX, RX) * 2x ethernet - eth0 + Label: Ethernet 1 + AR8035 ethernet PHY (RGMII) + 10/100/1000 Mbps Ethernet + 802.3af POE + used as WAN interface - eth1 + Label: Ethernet 2 + AR8035 ethernet PHY (SGMII) + 10/100/1000 Mbps Ethernet + used as LAN interface * 1x USB * internal antennas Flashing instructions: ====================== Various methods can be used to install the actual image on the flash. Two easy ones are: ap51-flash ---------- The tool ap51-flash (https://github.com/ap51-flash/ap51-flash) should be used to transfer the image to the u-boot when the device boots up. initramfs from TFTP ------------------- The serial console must be used to access the u-boot shell during bootup. It can then be used to first boot up the initramfs image from a TFTP server (here with the IP 192.168.1.21): setenv serverip 192.168.1.21 setenv ipaddr 192.168.1.1 tftpboot 0c00000 <filename-of-initramfs-kernel>.bin && bootm $fileaddr The actual sysupgrade image can then be transferred (on the LAN port) to the device via scp <filename-of-squashfs-sysupgrade>.bin root@192.168.1.1:/tmp/ On the device, the sysupgrade must then be started using sysupgrade -n /tmp/<filename-of-squashfs-sysupgrade>.bin Signed-off-by: Sven Eckelmann <sven@narfation.org>
2020-11-23 13:41:34 +01:00
openmesh,a40|\
ath79: Add support for OpenMesh A60 Device specifications: ====================== * Qualcomm/Atheros QCA9558 ver 1 rev 0 * 720/600/240 MHz (CPU/DDR/AHB) * 128 MB of RAM * 16 MB of SPI NOR flash - 2x 7 MB available; but one of the 7 MB regions is the recovery image * 3T3R 2.4 GHz Wi-Fi (11n) * 3T3R 5 GHz Wi-Fi (11ac) * multi-color LED (controlled via red/green/blue GPIOs) * 1x GPIO-button (reset) * external h/w watchdog (enabled by default)) * TTL pins are on board (arrow points to VCC, then follows: GND, TX, RX) * 2x ethernet - eth0 + Label: Ethernet 1 + AR8035 ethernet PHY (RGMII) + 10/100/1000 Mbps Ethernet + 802.3af POE + used as WAN interface - eth1 + Label: Ethernet 2 + AR8031 ethernet PHY (SGMII) + 10/100/1000 Mbps Ethernet + used as LAN interface * 1x USB * internal antennas Flashing instructions: ====================== Various methods can be used to install the actual image on the flash. Two easy ones are: ap51-flash ---------- The tool ap51-flash (https://github.com/ap51-flash/ap51-flash) should be used to transfer the image to the u-boot when the device boots up. initramfs from TFTP ------------------- The serial console must be used to access the u-boot shell during bootup. It can then be used to first boot up the initramfs image from a TFTP server (here with the IP 192.168.1.21): setenv serverip 192.168.1.21 setenv ipaddr 192.168.1.1 tftpboot 0c00000 <filename-of-initramfs-kernel>.bin && bootm $fileaddr The actual sysupgrade image can then be transferred (on the LAN port) to the device via scp <filename-of-squashfs-sysupgrade>.bin root@192.168.1.1:/tmp/ On the device, the sysupgrade must then be started using sysupgrade -n /tmp/<filename-of-squashfs-sysupgrade>.bin Signed-off-by: Sven Eckelmann <sven@narfation.org>
2020-11-23 13:41:34 +01:00
openmesh,a60|\
ath79: Add support for OpenMesh OM2P v4 Device specifications: ====================== * Qualcomm/Atheros QCA9533 v2 * 650/600/217 MHz (CPU/DDR/AHB) * 64 MB of RAM * 16 MB of SPI NOR flash - 2x 7 MB available; but one of the 7 MB regions is the recovery image * 2x 10/100 Mbps Ethernet * 1T1R 2.4 GHz Wi-Fi * 6x GPIO-LEDs (3x wifi, 2x ethernet, 1x power) * 1x GPIO-button (reset) * external h/w watchdog (enabled by default) * TTL pins are on board (arrow points to VCC, then follows: GND, TX, RX) * 2x fast ethernet - eth0 + Label: Ethernet 1 + 24V passive POE (mode B) - eth1 + Label: Ethernet 2 + 802.3af POE + builtin switch port 1 * 12-24V 1A DC * external antenna Flashing instructions: ====================== Various methods can be used to install the actual image on the flash. Two easy ones are: ap51-flash ---------- The tool ap51-flash (https://github.com/ap51-flash/ap51-flash) should be used to transfer the image to the u-boot when the device boots up. initramfs from TFTP ------------------- The serial console must be used to access the u-boot shell during bootup. It can then be used to first boot up the initramfs image from a TFTP server (here with the IP 192.168.1.21): setenv serverip 192.168.1.21 setenv ipaddr 192.168.1.1 tftpboot 0c00000 <filename-of-initramfs-kernel>.bin && bootm $fileaddr The actual sysupgrade image can then be transferred (on the LAN port) to the device via scp <filename-of-squashfs-sysupgrade>.bin root@192.168.1.1:/tmp/ On the device, the sysupgrade must then be started using sysupgrade -n /tmp/<filename-of-squashfs-sysupgrade>.bin Signed-off-by: Sven Eckelmann <sven@narfation.org> [wrap two very long lines, fix typo in comment] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-11-23 13:41:34 +01:00
openmesh,om2p-v4|\
ath79: Add support for OpenMesh OM2P-HS v4 Device specifications: ====================== * Qualcomm/Atheros QCA9533 v2 * 650/600/217 MHz (CPU/DDR/AHB) * 64 MB of RAM * 16 MB of SPI NOR flash - 2x 7 MB available; but one of the 7 MB regions is the recovery image * 2x 10/100 Mbps Ethernet * 2T2R 2.4 GHz Wi-Fi * 6x GPIO-LEDs (3x wifi, 2x ethernet, 1x power) * 1x GPIO-button (reset) * external h/w watchdog (enabled by default) * TTL pins are on board (arrow points to VCC, then follows: GND, TX, RX) * 2x fast ethernet - eth0 + 24V passive POE (mode B) + used as WAN interface - eth1 + 802.3af POE + builtin switch port 1 + used as LAN interface * 12-24V 1A DC * internal antennas Flashing instructions: ====================== Various methods can be used to install the actual image on the flash. Two easy ones are: ap51-flash ---------- The tool ap51-flash (https://github.com/ap51-flash/ap51-flash) should be used to transfer the image to the u-boot when the device boots up. initramfs from TFTP ------------------- The serial console must be used to access the u-boot shell during bootup. It can then be used to first boot up the initramfs image from a TFTP server (here with the IP 192.168.1.21): setenv serverip 192.168.1.21 setenv ipaddr 192.168.1.1 tftpboot 0c00000 <filename-of-initramfs-kernel>.bin && bootm $fileaddr The actual sysupgrade image can then be transferred (on the LAN port) to the device via scp <filename-of-squashfs-sysupgrade>.bin root@192.168.1.1:/tmp/ On the device, the sysupgrade must then be started using sysupgrade -n /tmp/<filename-of-squashfs-sysupgrade>.bin Signed-off-by: Sven Eckelmann <sven@narfation.org>
2020-11-23 13:41:34 +01:00
openmesh,om2p-hs-v4|\
plasmacloud,pa300|\
plasmacloud,pa300e|\
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"
;;
ath79: add support for COMFAST CF-E375AC COMFAST CF-E375AC is a ceiling mount AP with PoE support, based on Qualcomm/Atheros QCA9563 + QCA9886 + QCA8337. Short specification: 2x 10/100/1000 Mbps Ethernet, with PoE support 128MB of RAM (DDR2) 16 MB of FLASH 3T3R 2.4 GHz, 802.11b/g/n 2T2R 5 GHz, 802.11ac/n/a, wave 2 built-in 5x 3 dBi antennas output power (max): 500 mW (27 dBm) 1x RGB LED, 1x button built-in watchdog chipset Flash instruction: 1) Original firmware is based on OpenWrt. Use sysupgrade image directly in vendor GUI. 2) TFTP 2.1) Set a tftp server on your machine with a fixed IP address of 192.168.1.10. A place the sysupgrade as firmware_auto.bin. 2.2) boot the device with an ethernet connection on fixed ip route 2.3) wait a few seconds and try to login via ssh 3) TFTP trough Bootloader 3.1) open the device case and get a uart connection working 3.2) stop the autoboot process and test connection with serverip 3.3) name the sysupgrade image firmware.bin and run firmware_upg MAC addresses: Though the OEM firmware has four adresses in the usual locations, it appears that the assigned addresses are just incremented in a different way: interface address location LAN: *:DC 0x0 WAN *:DD 0x1002 WLAN 2.4g *:E6 n/a (0x0 + 10) WLAN 5g *:DE 0x6 unused *:DF 0x5006 The MAC address pointed at the label is the one assign to the LAN interface. Signed-off-by: Joao Henrique Albuquerque <joaohccalbu@gmail.com> [add label-mac-device, remove redundant uart status, fix whitespace issues, fix commit message wrapping, remove x bit on DTS file] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-08-14 17:04:02 +02:00
comfast,cf-e375ac)
ucidef_add_switch "switch0" \
"0@eth0" "1:wan" "2:lan"
;;
ath79: add support for Qualcomm AP143 reference boards Specifications: SoC: QCA9533 DRAM: 32Mb DDR1 Flash: 8/16Mb SPI-NOR LAN: 4x 10/100Mbps via AR8229 switch (integrated into SoC) on GMII WAN: 1x 10/100Mbps via MII WLAN: QCA9530 USB: 1x 2.0 UART: standard QCA UART header JTAG: yes Button: 1x WPS, 1x reset LEDs: 8x LEDs A version with 4Mb flash is also available, but due to lack of enough space it's not supported. As the original flash layout does not provide enough space for the kernel (1472k), the firmware uses OKLI and concat flash to overcome the limitation without changing the boot address of the bootloaders. Installation: 1. Original bootloader Connect the board to ethernet Set up a server with an IP address of 192.168.1.10 Make the openwrt-ath79-generic-qca_ap143-8m-squashfs-factory.bin available via TFTP tftpboot 0x80060000 openwrt-ath79-generic-qca_ap143-8m-squashfs-factory.bin erase 0x9f050000 +$filesize cp.b $fileaddr 0x9f050000 $filesize Reboot the board. 2. pepe2k's u-boot_mod Connect the board to ethernet Set up a server with an IP address of 192.168.1.10 Make the openwrt-ath79-generic-qca_ap143-8m-squashfs-factory.bin available via TFTP, as "firmware.bin" run fw_upg Reboot the board. For the 16M version of the board, please use openwrt-ath79-generic-qca_ap143-16m-squashfs-factory.bin Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu> [use fwconcatX names, drop redundant uart status, fix IMAGE_SIZE, set up IMAGE/factory.bin without metadata] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-08-03 23:07:21 +02:00
comfast,cf-e560ac|\
qca,ap143-8m|\
qca,ap143-16m|\
tplink,tl-wr841hp-v3)
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>
2020-01-26 17:55:11 +01:00
ucidef_set_interface_wan "eth1"
ucidef_add_switch "switch0" \
"0@eth0" "1:lan" "2:lan" "3:lan" "4:lan"
;;
comfast,cf-wr650ac-v1|\
ath79: add support for ZyXEL NBG6616 Specifications: SoC: Qualcomm Atheros QCA9557 RAM: 128 MB (Nanya NT5TU32M16EG-AC) Flash: 16 MB (Macronix MX25L12845EMI-10G) Ethernet: 5x 10/100/1000 (1x WAN, 4x LAN) Wireless: QCA9557 2.4GHz (nbg), QCA9882 5GHz (ac) USB: 2x USB 2.0 port Buttons: 1x Reset Switches: 1x Wifi LEDs: 11 (Pwr, WAN, 4x LAN, 2x Wifi, 2x USB, WPS) MAC addresses: WAN *:3f uboot-env ethaddr + 3 LAN *:3e uboot-env ethaddr + 2 2.4GHz *:3c uboot-env ethaddr 5GHz *:3d uboot-env ethaddr + 1 The label contains all four MAC addresses, however the one without increment is first, so this one is taken for label MAC address. Notes: The Wifi is controlled by an on/off button, i.e. has to be implemented by a switch (EV_SW). Despite, it appears that GPIO_ACTIVE_HIGH needs to be used, just like recently fixed for the NBG6716. Both parameters have been wrong at ar71xx. Flash Instructions: At first the U-Boot variables need to be changed in order to boot the new combined image format. ZyXEL uses a split kernel + root setup and the current kernel is too large to fit into the partition. As resizing didnt do the trick, I've decided to use the prefered combined image approach to be future-kernel-enlargement-proof (thanks to blocktrron for the assistance). First add a new variable called boot_openwrt: setenv boot_openwrt bootm 0x9F120000 After that overwrite the bootcmd and save the environment: setenv bootcmd run boot_openwrt saveenv After that you can flash the openwrt factory image via TFTP. The servers IP has to be 192.168.1.33. Connect to one of the LAN ports and hold the WPS Button while booting. After a few seconds the NBG6616 will look for a image file called 'ras.bin' and flash it. Return to vendor firmware is possible by resetting the bootcmd: setenv bootcmd run boot_flash saveenv and flashing the vendor image via the TFTP method as described above. Accessing the U-Boot Shell: ZyXEL uses a proprietary loader/shell on top of u-boot: "ZyXEL zloader v2.02" When the device is starting up, the user can enter the the loader shell by simply pressing a key within the 3 seconds once the following string appears on the serial console: | Hit any key to stop autoboot: 3 The user is then dropped to a locked shell. | NBG6616> ? | ATEN x,(y) set BootExtension Debug Flag (y=password) | ATSE x show the seed of password generator | ATSH dump manufacturer related data in ROM | ATRT (x,y,z,u) ATRT RAM read/write test (x=level, y=start addr, z=end addr, u=iterations | ATGO boot up whole system | ATUR x upgrade RAS image (filename) In order to escape/unlock a password challenge has to be passed. Note: the value is dynamic! you have to calculate your own! First use ATSE $MODELNAME (MODELNAME is the hostname in u-boot env) to get the challange value/seed. | NBG6616> ATSE NBG6616 | 00C91D7EAC3C This seed/value can be converted to the password with the help of this bash script (Thanks to http://www.adslayuda.com/Zyxel650-9.html authors): - tool.sh - ror32() { echo $(( ($1 >> $2) | (($1 << (32 - $2) & (2**32-1)) ) )) } v="0x$1" a="0x${v:2:6}" b=$(( $a + 0x10F0A563)) c=$(( 0x${v:12:14} & 7 )) p=$(( $(ror32 $b $c) ^ $a )) printf "ATEN 1,%X\n" $p - end of tool.sh - | # bash ./tool.sh 00C91D7EAC3C | ATEN 1,10FDFF5 Copy and paste the result into the shell to unlock zloader. | NBG6616> ATEN 1,10FDFF5 If the entered code was correct the shell will change to use the ATGU command to enter the real u-boot shell. | NBG6616> ATGU | NBG6616# Signed-off-by: Christoph Krapp <achterin@googlemail.com> [move keys to DTSI, adjust usb_power DT label, remove kernel config change, extend commit message] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-08-09 13:00:05 +02:00
comfast,cf-wr650ac-v2|\
zyxel,nbg6616)
ucidef_add_switch "switch0" \
"0@eth0" "1:lan" "2:lan" "3:lan" "4:lan" "5:wan" "6@eth1"
;;
compex,wpj344-16m|\
compex,wpj563)
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>
2019-07-26 20:32:55 +02:00
ucidef_add_switch "switch0" \
"0@eth0" "3:lan" "2:wan"
;;
compex,wpj558-16m)
ucidef_add_switch "switch0" \
"1:wan" "5:lan" "6@eth0"
;;
ath79: add support for Devolo dLAN pro 1200+ WiFi ac This patch adds support for the Devolo dLAN pro 1200+ WiFi ac. This device is a plc wifi AC2400 router/extender with 2 Ethernet ports, has a QCA7500 PLC and uses the HomePlug AV2 standard. Other than the PLC the hardware is identical to the Devolo Magic 2 WIFI. Therefore it uses the same dts, which was moved to a dtsi to be included by both boards. This is a board that was previously included in the ar71xx tree. Hardware: SoC: AR9344 CPU: 560 MHz Flash: 16 MiB (W25Q128JVSIQ) RAM: 128 MiB DDR2 Ethernet: 2xLAN 10/100/1000 PLC: QCA75000 (Qualcomm HPAV2) 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 The Powerline (PLC) interface of the dLAN pro 1200+ WiFi ac requires 3rd party firmware which is not available from standard OpenWrt package feeds. There is a package feed on github which you must add to OpenWrt buildroot so you can build a firmware image which supports the plc interface. See: https://github.com/0xFelix/dlan-openwrt (forked from Devolo and added compatibility for OpenWrt 21.02) 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: Felix Matouschek <felix@matouschek.org> [add "plus" to compatible and device name] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2021-02-18 23:12:01 +01:00
devolo,dlan-pro-1200plus-ac|\
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>
2019-09-16 12:25:23 +02:00
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>
2020-06-08 01:11:34 +02:00
dlink,dap-2695-a1)
ucidef_add_switch "switch0" \
"0@eth0" "2:lan" "3:wan" "6@eth1"
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>
2020-06-08 01:11:34 +02:00
;;
ath79: add support for D-Link DAP-3662 A1 Specifications: * QCA9557, 16 MiB Flash, 128 MiB RAM, 802.11n 2T2R * QCA9882, 802.11ac 2T2R * 2x Gigabit LAN (1x 802.11af PoE) * IP68 pole-mountable outdoor case Installation: * Factory Web UI is at 192.168.0.50 login with 'admin' and blank password, flash factory.bin * Recovery Web UI is at 192.168.0.50 connect network cable, hold reset button during power-on and keep it pressed until uploading has started (only required when checksum is ok, e.g. for reverting back to oem firmware), flash factory.bin After flashing factory.bin, additional free space can be reclaimed by flashing sysupgrade.bin, since the factory image requires some padding to be accepted for upgrading via OEM Web UI. Both ethernet ports are set to LAN by default, matching the labelling on the case. However, since both GMAC Interfaces eth0 and eth1 are connected to the switch (QCA8337), the user may create an additional 'wan' interface as desired and override the vlan id settings to map br-lan / wan to either the PoE or non-PoE port, depending on the individual scenario of use. So, the LAN and WAN ports would then be connected to different GMACs, e.g. config interface 'lan' option ifname 'eth0.1' ... config interface 'wan' option ifname 'eth1.2' ... config switch_vlan option device 'switch0' option vlan '1' option ports '1 0t' config switch_vlan option device 'switch0' option vlan '2' option ports '2 6t' Signed-off-by: Sebastian Schaper <openwrt@sebastianschaper.net> [add configuration example] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-12-01 22:34:34 +01:00
dlink,dap-3662-a1)
ucidef_add_switch "switch0" \
"0@eth0" "1:lan:2" "2:lan:1" "6@eth1"
;;
dlink,dch-g020-a1)
ucidef_add_switch "switch0" \
"0@eth0" "1:lan:2" "2:lan:1"
;;
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>
2019-03-04 15:18:53 +01:00
engenius,epg5000|\
sitecom,wlr-7100|\
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>
2019-11-04 18:05:38 +01:00
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,balin)
ucidef_add_switch "switch0" \
"0@eth0" "5:lan:1" "4:lan:2" "3:wan"
;;
embeddedwireless,dorin)
ucidef_add_switch "switch0" \
"0@eth0" "1:wan" "2:lan:3" "3:lan:2"
;;
engenius,eap300-v2)
ucidef_add_switch "switch0" \
"0@eth0" "1:lan"
;;
ath79: add support for Senao Engenius ENS202EXT v1 Engenius ENS202EXT v1 is an outdoor wireless access point with 2 10/100 ports, with built-in ethernet switch, detachable antennas and proprietery PoE. FCC ID: A8J-ENS202 Specification: - Qualcomm/Atheros AR9341 v1 - 535/400/200/40 MHz (CPU/DDR/AHB/REF) - 64 MB of RAM - 16 MB of FLASH MX25L12835F(MI-10G) - UART (J1) header on PCB (unpopulated) - 2x 10/100 Mbps Ethernet (built-in switch Atheros AR8229) - 2.4 GHz, up to 27dBm (Atheros AR9340) - 2x external, detachable antennas - 7x LED (5 programmable in ath79), 1x GPIO button (Reset) Known Issues: - Sysupgrade from ar71xx no longer possible - Ethernet LEDs stay on solid when connected, not programmable MAC addresses: eth0/eth1 *:7b art 0x0/0x6 wlan *:7a art 0x1002 The device label lists both addresses, WLAN MAC and ETH MAC, in that order. Since 0x0 and 0x6 have the same content, it cannot be determined which is eth0 and eth1, so we chose 0x0 for both. Installation: 2 ways to flash factory.bin from OEM: - Connect ethernet directly to board (the non POE port) this is LAN for all images - if you get Failsafe Mode from failed flash: only use it to flash Original firmware from Engenius or risk kernel loop which requires serial cable Method 1: Firmware upgrade page: OEM webpage at 192.168.1.1 username and password "admin" In upper right select Reset "Restore to factory default settings" Wait for reboot and login again Navigate to "Firmware Upgrade" page from left pane Click Browse and select the factory.bin image Upload and verify checksum Click Continue to confirm and wait 3 minutes Method 2: Serial to load Failsafe webpage: After connecting to serial console and rebooting... Interrupt boot with any key pressed rapidly execute `run failsafe_boot` OR `bootm 0x9fdf0000` wait a minute connect to ethernet and navigate to "192.168.1.1/index.htm" Select the factory.bin image and upload wait about 3 minutes *If you are unable to get network/LuCI after flashing* You must perform another factory reset: After waiting 3 minutes or when Power LED stop blinking: Hold Reset button for 15 seconds while powered on or until Power LED blinks very fast release and wait 2 minutes Return to OEM: If you have a serial cable, see Serial Failsafe instructions *DISCLAIMER* The Failsafe image is unique to this model. The following directions are unique to this model. DO NOT downgrade to ar71xx this way, can cause kernel loop The easiest way to return to the OEM software is the Failsafe image If you dont have a serial cable, you can ssh into openwrt and run `mtd -r erase fakeroot` Wait 3 minutes connect to ethernet and navigate to 192.168.1.1/index.htm select OEM firmware image from Engenius and click upgrade TFTP Recovery: For some reason, TFTP is not reliable on this board. Takes many attempts, many timeouts before it fully transfers. Starting with an initramfs.bin: Connect to ethernet set IP address and TFTP server to 192.168.1.101 set up infinite ping to 192.168.1.1 rename the initramfs.bin to "vmlinux-art-ramdisk" and host on TFTP server disconnect power to the board hold reset button while powering on board for 8 seconds Wait a minute, power LED should blink eventually if successful and a minute after that the pings should get replies You have now loaded a temporary Openwrt with default settings temporarily. You can use that image to sysupgrade another image to overwrite flash. Format of OEM firmware image: The OEM software of ENS202EXT is a heavily modified version of Openwrt Kamikaze bleeding-edge. One of the many modifications is to the sysupgrade program. Image verification is performed simply by the successful ungzip and untar of the supplied file and name check and header verification of the resulting contents. To form a factory.bin that is accepted by OEM Openwrt build, the kernel and rootfs must have specific names... openwrt-senao-ens202ext-uImage-lzma.bin openwrt-senao-ens202ext-root.squashfs and begin with the respective headers (uImage, squashfs). Then the files must be tarballed and gzipped. The resulting binary is actually a tar.gz file in disguise. This can be verified by using binwalk on the OEM firmware images, ungzipping then untaring, and by swapping headers to see what the OEM upgrade utility accepts and rejects. Note on the factory.bin: The newest kernel is too large to be in the kernel partition the new ath79 kernel is beyond 1592k Even ath79-tiny is 1580k Checksum fails at boot because the bootloader (modified uboot) expects kernel to be 1536k. If the kernel is larger, it gets overwritten when rootfs is flashed, causing a broken image. The mtdparts variable is part of the build and saving a new uboot environment will not persist after flashing. OEM version might interact with uboot or with the custom OEM partition at 0x9f050000. Failed checksums at boot cause failsafe image to launch, allowing any image to be flashed again. HOWEVER: one should not install older Openwrt from failsafe because it can cause rootfs to be unmountable, causing kernel loop after successful checksum. The only way to rescue after that is with a serial cable. For these reasons, a fake kernel (OKLI kernel loader) and fake squashfs rootfs is implemented to take care of the OEM firmware image verification and checksums at boot. The OEM only verifies the checksum of the first image of each partition respectively, which is the loader and the fake squashfs. This completely frees the "firmware" partition from all checks. virtual_flash is implemented to make use of the wasted space. this leaves only 2 erase blocks actually wasted. The loader and fakeroot partitions must remain intact, otherwise the next boot will fail, redirecting to the Failsafe image. Because the partition table required is so different than the OEM partition table and ar71xx partition table, sysupgrades are not possible until one switches to ath79 kernel. Note on sysupgrade.tgz: To make things even more complicated, another change is needed to fix an issue where network does not work after flashing from either OEM software or Failsafe image, which implants the OEM (Openwrt Kamikaze) configuration into the jffs2 /overlay when writing rootfs from factory.bin. The upgrade script has this: mtd -j "/tmp/_sys/sysupgrade.tgz" write "${rootfs}" "rootfs" However, it also accepts scripts before and after: before_local="/etc/before-upgradelocal.sh" after_local="/etc/after-upgradelocal.sh" before="before-upgrade.sh" after="after-upgrade.sh" Thus, we can solve the issue by making the .tgz an empty file by making a before-upgrade.sh in the factory.bin Note on built-in switch: There is two ports on the board, POE through the power supply brick, the other is on the board. For whatever reason, in the ar71xx target, both ports were on the built-in switch on eth1. In order to make use of a port for WAN or a different LAN, one has to set up VLANs. In ath79, eth0 and eth1 is defined in the DTS so that the built-in switch is seen as eth0, but only for 1 port the other port is on eth1 without a built-in switch. eth0: switch0 CPU is port 0 board port is port 1 eth1: POE port on the power brick Since there is two physical ports, it can be configured as a full router, with LAN for both wired and wireless. According to the Datasheet, the port that is not on the switch is connected to gmac0. It is preferred that gmac0 is chosen as WAN over a port on an internal switch, so that link status can pass to the kernel immediately which is more important for WAN connections. Signed-off-by: Michael Pratt <mpratt51@gmail.com> [apply sorting in 01_leds, make factory recipe more generic, create common device node, move label-mac to 02_network, add MAC addresses to commit message, remove kmod-leds-gpio, use gzip directly] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-05-11 22:58:02 +02:00
engenius,ens202ext-v1)
ucidef_set_interface_lan "eth1"
ath79: add support for Senao Engenius ENS202EXT v1 Engenius ENS202EXT v1 is an outdoor wireless access point with 2 10/100 ports, with built-in ethernet switch, detachable antennas and proprietery PoE. FCC ID: A8J-ENS202 Specification: - Qualcomm/Atheros AR9341 v1 - 535/400/200/40 MHz (CPU/DDR/AHB/REF) - 64 MB of RAM - 16 MB of FLASH MX25L12835F(MI-10G) - UART (J1) header on PCB (unpopulated) - 2x 10/100 Mbps Ethernet (built-in switch Atheros AR8229) - 2.4 GHz, up to 27dBm (Atheros AR9340) - 2x external, detachable antennas - 7x LED (5 programmable in ath79), 1x GPIO button (Reset) Known Issues: - Sysupgrade from ar71xx no longer possible - Ethernet LEDs stay on solid when connected, not programmable MAC addresses: eth0/eth1 *:7b art 0x0/0x6 wlan *:7a art 0x1002 The device label lists both addresses, WLAN MAC and ETH MAC, in that order. Since 0x0 and 0x6 have the same content, it cannot be determined which is eth0 and eth1, so we chose 0x0 for both. Installation: 2 ways to flash factory.bin from OEM: - Connect ethernet directly to board (the non POE port) this is LAN for all images - if you get Failsafe Mode from failed flash: only use it to flash Original firmware from Engenius or risk kernel loop which requires serial cable Method 1: Firmware upgrade page: OEM webpage at 192.168.1.1 username and password "admin" In upper right select Reset "Restore to factory default settings" Wait for reboot and login again Navigate to "Firmware Upgrade" page from left pane Click Browse and select the factory.bin image Upload and verify checksum Click Continue to confirm and wait 3 minutes Method 2: Serial to load Failsafe webpage: After connecting to serial console and rebooting... Interrupt boot with any key pressed rapidly execute `run failsafe_boot` OR `bootm 0x9fdf0000` wait a minute connect to ethernet and navigate to "192.168.1.1/index.htm" Select the factory.bin image and upload wait about 3 minutes *If you are unable to get network/LuCI after flashing* You must perform another factory reset: After waiting 3 minutes or when Power LED stop blinking: Hold Reset button for 15 seconds while powered on or until Power LED blinks very fast release and wait 2 minutes Return to OEM: If you have a serial cable, see Serial Failsafe instructions *DISCLAIMER* The Failsafe image is unique to this model. The following directions are unique to this model. DO NOT downgrade to ar71xx this way, can cause kernel loop The easiest way to return to the OEM software is the Failsafe image If you dont have a serial cable, you can ssh into openwrt and run `mtd -r erase fakeroot` Wait 3 minutes connect to ethernet and navigate to 192.168.1.1/index.htm select OEM firmware image from Engenius and click upgrade TFTP Recovery: For some reason, TFTP is not reliable on this board. Takes many attempts, many timeouts before it fully transfers. Starting with an initramfs.bin: Connect to ethernet set IP address and TFTP server to 192.168.1.101 set up infinite ping to 192.168.1.1 rename the initramfs.bin to "vmlinux-art-ramdisk" and host on TFTP server disconnect power to the board hold reset button while powering on board for 8 seconds Wait a minute, power LED should blink eventually if successful and a minute after that the pings should get replies You have now loaded a temporary Openwrt with default settings temporarily. You can use that image to sysupgrade another image to overwrite flash. Format of OEM firmware image: The OEM software of ENS202EXT is a heavily modified version of Openwrt Kamikaze bleeding-edge. One of the many modifications is to the sysupgrade program. Image verification is performed simply by the successful ungzip and untar of the supplied file and name check and header verification of the resulting contents. To form a factory.bin that is accepted by OEM Openwrt build, the kernel and rootfs must have specific names... openwrt-senao-ens202ext-uImage-lzma.bin openwrt-senao-ens202ext-root.squashfs and begin with the respective headers (uImage, squashfs). Then the files must be tarballed and gzipped. The resulting binary is actually a tar.gz file in disguise. This can be verified by using binwalk on the OEM firmware images, ungzipping then untaring, and by swapping headers to see what the OEM upgrade utility accepts and rejects. Note on the factory.bin: The newest kernel is too large to be in the kernel partition the new ath79 kernel is beyond 1592k Even ath79-tiny is 1580k Checksum fails at boot because the bootloader (modified uboot) expects kernel to be 1536k. If the kernel is larger, it gets overwritten when rootfs is flashed, causing a broken image. The mtdparts variable is part of the build and saving a new uboot environment will not persist after flashing. OEM version might interact with uboot or with the custom OEM partition at 0x9f050000. Failed checksums at boot cause failsafe image to launch, allowing any image to be flashed again. HOWEVER: one should not install older Openwrt from failsafe because it can cause rootfs to be unmountable, causing kernel loop after successful checksum. The only way to rescue after that is with a serial cable. For these reasons, a fake kernel (OKLI kernel loader) and fake squashfs rootfs is implemented to take care of the OEM firmware image verification and checksums at boot. The OEM only verifies the checksum of the first image of each partition respectively, which is the loader and the fake squashfs. This completely frees the "firmware" partition from all checks. virtual_flash is implemented to make use of the wasted space. this leaves only 2 erase blocks actually wasted. The loader and fakeroot partitions must remain intact, otherwise the next boot will fail, redirecting to the Failsafe image. Because the partition table required is so different than the OEM partition table and ar71xx partition table, sysupgrades are not possible until one switches to ath79 kernel. Note on sysupgrade.tgz: To make things even more complicated, another change is needed to fix an issue where network does not work after flashing from either OEM software or Failsafe image, which implants the OEM (Openwrt Kamikaze) configuration into the jffs2 /overlay when writing rootfs from factory.bin. The upgrade script has this: mtd -j "/tmp/_sys/sysupgrade.tgz" write "${rootfs}" "rootfs" However, it also accepts scripts before and after: before_local="/etc/before-upgradelocal.sh" after_local="/etc/after-upgradelocal.sh" before="before-upgrade.sh" after="after-upgrade.sh" Thus, we can solve the issue by making the .tgz an empty file by making a before-upgrade.sh in the factory.bin Note on built-in switch: There is two ports on the board, POE through the power supply brick, the other is on the board. For whatever reason, in the ar71xx target, both ports were on the built-in switch on eth1. In order to make use of a port for WAN or a different LAN, one has to set up VLANs. In ath79, eth0 and eth1 is defined in the DTS so that the built-in switch is seen as eth0, but only for 1 port the other port is on eth1 without a built-in switch. eth0: switch0 CPU is port 0 board port is port 1 eth1: POE port on the power brick Since there is two physical ports, it can be configured as a full router, with LAN for both wired and wireless. According to the Datasheet, the port that is not on the switch is connected to gmac0. It is preferred that gmac0 is chosen as WAN over a port on an internal switch, so that link status can pass to the kernel immediately which is more important for WAN connections. Signed-off-by: Michael Pratt <mpratt51@gmail.com> [apply sorting in 01_leds, make factory recipe more generic, create common device node, move label-mac to 02_network, add MAC addresses to commit message, remove kmod-leds-gpio, use gzip directly] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-05-11 22:58:02 +02:00
ucidef_add_switch "switch0" \
"0@eth0" "1:lan"
;;
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"
;;
glinet,gl-x300b)
ucidef_set_interface_wan "eth1"
ucidef_add_switch "switch0" \
"0@eth0" "4: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>
2019-02-05 09:23:58 +01:00
iodata,wn-ac1600dgr|\
iodata,wn-ac1600dgr2|\
iodata,wn-ag300dgr|\
pcs,cr5000|\
wd,mynet-n750)
ucidef_add_switch "switch0" \
"0@eth0" "1:lan" "2:lan" "3:lan" "4:lan" "5:wan"
;;
joyit,jt-or750i)
ucidef_set_interface_wan "eth1"
ucidef_add_switch "switch0" \
"0@eth0" "2:lan:3" "3:lan:2" "4:lan:1"
;;
letv,lba-047-ch)
ucidef_set_interface_wan "eth0"
ucidef_add_switch "switch0" \
"0@eth1" "3:lan:2" "4:lan:1"
;;
librerouter,librerouter-v1)
ucidef_add_switch "switch0" \
"0@eth0" "5:wan" "6@eth1" "4:lan"
;;
ath79: add support for Meraki MR12 Port device support for Meraki MR12 from the ar71xx target to ath79. Specifications: - SoC: AR7242-AH1A CPU - RAM: 64MiB (NANYA NT5DS32M16DS-5T) - NOR Flash: 16MiB (MXIC MX25L12845EMI-10G) - Ethernet: 1 x PoE Gigabit Ethernet Port (SoC MAC + AR8021-BL1E PHY) - Ethernet: 1 x 100Mbit port (SoC MAC+PHY) - Wi-Fi: Atheros AR9283-AL1A (2T2R, 11n) Installation: 1. Requires TFTP server at 192.168.1.101, w/ initramfs & sysupgrade .bins 2. Open shell case 3. Connect a USB->TTL cable to headers furthest from the RF shield 4. Power on the router; connect to U-boot over 115200-baud connection 5. Interrupt U-boot process to boot Openwrt by running: setenv bootcmd bootm 0xbf0a0000; saveenv; tftpboot 0c00000 <filename-of-initramfs-kernel>.bin; bootm 0c00000; 6. Copy sysupgrade image to /tmp on MR12 7. sysupgrade /tmp/<filename-of-sysupgrade>.bin Notes: - kmod-owl-loader is still required to load the ART partition into the driver. - The manner of storing MAC addresses is updated from ar71xx; it is at 0x66 of the 'config' partition, where it was discovered that the OEM firmware stores it. This is set as read-only. If you are migrating from ar71xx and used the method mentioned above to upgrade, use kmod-mtd-rw or UCI to add the MAC back in. One more method for doing this is described below. - Migrating directly from ar71xx has not been thoroughly tested, but one method has been used a couple of times with good success, migrating 18.06.2 to a full image produced as of this commit. Please note that these instructions are only for experienced users, and/or those still able to open their device up to flash it via the serial headers should anything go wrong. 1) Install kmod-mtd-rw and uboot-envtools 2) Run `insmod mtd-rw.ko i_want_a_brick=1` 3) Modify /etc/fw_env.config to point to the u-boot-env partition. The file /etc/fw_env.config should contain: # MTD device env offset env size sector size /dev/mtd1 0x00000 0x10000 0x10000 See https://openwrt.org/docs/techref/bootloader/uboot.config for more details. 4) Run `fw_printenv` to verify everything is correct, as per the link above. 5) Run `fw_setenv bootcmd bootm 0xbf0a0000` to set a new boot address. 6) Manually modify /lib/upgrade/common.sh's get_image function: Change ... cat "$from" 2>/dev/null | $cmd ... into ... ( dd if=/dev/zero bs=1 count=$((0x66)) ; # Pad the first 102 bytes echo -ne '\x00\x18\x0a\x12\x34\x56' ; # Add in MAC address dd if=/dev/zero bs=1 count=$((0x20000-0x66-0x6)) ; # Pad the rest cat "$from" 2>/dev/null ) | $cmd ... which, during the upgrade process, will pad the image by 128K of zeroes-plus-MAC-address, in order for the ar71xx's firmware partition -- which starts at 0xbf080000 -- to be instead aligned with the ath79 firmware partition, which starts 128K later at 0xbf0a0000. 7) Copy the sysupgrade image into /tmp, as above 8) Run `sysupgrade -F /tmp/<sysupgrade>.bin`, then wait Again, this may BRICK YOUR DEVICE, so make *sure* to have your serial cable handy. Signed-off-by: Martin Kennedy <hurricos@gmail.com> [add LED migration and extend compat message] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-11-28 03:03:32 +01:00
meraki,mr12)
ucidef_set_interface_lan "eth0"
ucidef_add_switch "switch0" \
"0@eth1" "1:lan"
;;
mercury,mw4530r-v1|\
tplink,archer-a7-v5|\
tplink,archer-c6-v2|\
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"
;;
ath79: add support for NEC Aterm WF1200CR NEC Aterm WF1200CR is a 2.4/5 GHz band 11ac (Wi-Fi 5) router, based on QCA9561. Specification: - SoC : Qualcomm Atheros QCA9561 - RAM : DDR2 128 MiB (W971GG6SB-25) - Flash : SPI-NOR 8 MiB (MX25L6433FM2I-08G) - WLAN : 2.4/5 GHz 2T2R - 2.4 GHz : QCA9561 (SoC) - 5 GHz : QCA9888 - Ethernet : 2x 10/100 Mbps - Switch : QCA9561 (SoC) - LEDs/Keys : 8x/3x (2x buttons, 1x slide-switch) - UART : through-hole on PCB - JP1: Vcc, GND, NC, TX, RX from "JP1" marking - 115200n8 - Power : 12 VDC, 0.9 A Flash instruction using factory image (stock: < v1.3.2): 1. Boot WF1200CR normally with "Router" mode 2. Access to "http://192.168.10.1/" and open firmware update page ("ファームウェア更新") 3. Select the OpenWrt factory image and click update ("更新") button to perform firmware update 4. Wait ~150 seconds to complete flashing Alternate flash instruction using initramfs image (stock: >= v1.3.2): 1. Prepare the TFTP server with the IP address 192.168.1.10 and place the OpenWrt initramfs image to the TFTP directory with the name "0101A8C0.img" 2. Connect serial console to WF1200CR 3. Boot WF1200CR and interrupt with any key after the message "Hit any key to stop autoboot: 2", the U-Boot starts telnetd after the message "starting telnetd server from server 192.168.1.1" 4. login the telnet (address: 192.168.1.1) 5. Perform the following commands to modify "bootcmd" variable temporary and check the value (to ignore the limitation of available commands, "tp; " command at the first is required as dummy, and the output of "printenv" is printed on the serial console) tp; set bootcmd 'set autostart yes; tftpboot' tp; printenv 6. Save the modified variable with the following command and reset device tp; saveenv tp; reset 7. The U-Boot downloads initramfs image from TFTP server and boots it 8. On initramfs image, download the sysupgrade image to the device and perform the following commands to erase stock firmware and sysupgrade mtd erase firmware sysupgrade <sysupgrade image> 9. After the rebooting by completion of sysupgrade, start U-Boot telnetd and login with the same way above (3, 4) 10. Perform the following commands to reset "bootcmd" variable to the default and reset the device tp; run seattle tp; reset (the contents of "seattle": setenv bootcmd 'bootm 0x9f070040' && saveenv) 11. Wait booting-up the device Known issues: - the following 6x LEDs are connected to the gpio controller on QCA9888 chip and the implementation of control via the controller is missing in ath10k/ath10k-ct - "ACTIVE" (Red/Green) - "2.4GHz" (Red/Green) - "5GHz" (Red/Green) Note: - after the version v1.3.2 of stock firmware, "offline update" by uploading image by user is deleted and the factory image cannot be used - the U-Boot on WF1200CR doesn't configure the port-side LEDs on WAN/LAN and the configuration is required on OpenWrt - gpio-hog: set the direction of GPIO 14(WAN)/19(LAN) to output - pinmux: set GPIO 14/19 as switch-controlled LEDs Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
2021-03-24 16:19:59 +01:00
nec,wf1200cr)
ucidef_set_interface_wan "eth1"
ucidef_add_switch "switch0" \
"0@eth0" "1:lan"
;;
nec,wg1200cr|\
ath79: add support for Qxwlan E1700AC v2 E1700AC v2 based on Qualcomm/Atheros QCA9563 + QCA9880. Specification: - 750/400/250 MHz (CPU/DDR/AHB) - 128 MB of RAM (DDR2) - 8/16 MB of FLASH (SPI NOR) - 3T3R 2.4 GHz - 3T3R 5 GHz - 2 x 10/1000M Mbps Ethernet (RJ45) - 1 x MiniPCI-e - 1 x SIM (3G/4G) - 1 x USB 2.0 Port - 5 x LED , 2 x Button(S8-Reset Buttun), 1 x power input - UART (J5) header on PCB (115200 8N1) Flash instruction: 1.Using tftp mode with UART connection and original LEDE image - Configure PC with static IP 192.168.1.10 and tftp server. - Rename "openwrt-ar71xx-generic-xxx-squashfs-sysupgrade.bin" to "firmware.bin" and place it in tftp server directory. - Connect PC with one of LAN ports, power up the router and press key "Enter" to access U-Boot CLI. - Use the following commands to update the device to LEDE: run lfw - After that the device will reboot and boot to LEDE. - Wait until all LEDs stops flashing and use the router. 2.Using httpd mode with Web UI connection and original LEDE image - Configure PC with static IP 192.168.1.xxx(2-255) and tftp server. - Connect PC with one of LAN ports,press the reset button, power up the router and keep button pressed for around 6-7 seconds, until leds flashing. - Open your browser and enter 192.168.1.1,You will see the upgrade interface, select "openwrt-ar71xx-generic-xxx-squashfs- sysupgrade.bin" and click the upgrade button. - After that the device will reboot and boot to LEDE. - Wait until all LEDs stops flashing and use the router. Signed-off-by: 张鹏 <sd20@qxwlan.com> [cut out of bigger patch, keep swconfig, whitespace fixes] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-10-16 12:53:51 +02:00
qxwlan,e1700ac-v2-8m|\
qxwlan,e1700ac-v2-16m|\
ath79: add support for Qxwlan E750G v8 Qxwlan E750G v8 is based on Qualcomm QCA9344 + QCA9334. Specification: - 560/450/225 MHz (CPU/DDR/AHB) - 128 MB of RAM (DDR2) - 8/16 MB of FLASH (SPI NOR) - 2T2R 2.4G GHz (AR9344) - 2x 10/100/1000 Mbps Ethernet (one port with PoE support) - 7x LED (6 driven by GPIO) - 1x button (reset) - 1x DC jack for main power input (9-48 V) - UART (J23) and LEDs (J2) headers on PCB Flash instruction: 1.Using tftp mode with UART connection and original LEDE image - Configure PC with static IP 192.168.1.10 and tftp server. - Rename "openwrt-ar71xx-generic-xxx-squashfs-sysupgrade.bin" to "firmware.bin" and place it in tftp server directory. - Connect PC with one of LAN ports, power up the router and press key "Enter" to access U-Boot CLI. - Use the following commands to update the device to LEDE: run lfw - After that the device will reboot and boot to LEDE. - Wait until all LEDs stops flashing and use the router. 2.Using httpd mode with Web UI connection and original LEDE image - Configure PC with static IP 192.168.1.xxx(2-255) and tftp server. - Connect PC with one of LAN ports,press the reset button, power up the router and keep button pressed for around 6-7 seconds, until leds flashing. - Open your browser and enter 192.168.1.1,You will see the upgrade interface, select "openwrt-ar71xx-generic-xxx-squashfs- sysupgrade.bin" and click the upgrade button. - After that the device will reboot and boot to LEDE. - Wait until all LEDs stops flashing and use the router. Signed-off-by: 张鹏 <sd20@qxwlan.com> [cut out of bigger patch, keep swconfig] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-10-14 09:47:35 +02:00
qxwlan,e750g-v8-8m|\
qxwlan,e750g-v8-16m|\
ubnt,nanobeam-ac-gen2|\
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>
2019-11-12 22:36:28 +01:00
yuncore,a782|\
yuncore,xd4200)
ucidef_add_switch "switch0" \
"0@eth0" "2:lan" "3:wan"
;;
ath79: add support for Xiaomi AIoT Router AC2350 Device specifications * SoC: QCA9563 @ 775MHz (MIPS 74Kc) * RAM: 128MiB DDR2 * Flash: 16MiB SPI-NOR (EN25QH128) * Wireless 2.4GHz (SoC): b/g/n, 3x3 * Wireless 5Ghz (QCA9988): a/n/ac, 4x4 MU-MIMO * IoT Wireless 2.4GHz (QCA6006): currently unusable * Ethernet (AR8327): 3 LAN × 1GbE, 1 WAN × 1GbE * LEDs: Internet (blue/orange), System (blue/orange) * Buttons: Reset * UART: through-hole on PCB ([VCC 3.3v](RX)(GND)(TX) 115200, 8n1) * Power: 12VDC, 1,5A MAC addresses map (like in OEM firmware) art@0x0 88:C3:97:*:57 wan/label art@0x1002 88:C3:97:*:2D lan/wlan2g art@0x5006 88:C3:97:*:2C wlan5g Obtain SSH Access 1. Download and flash the firmware version 1.3.8 (China). 2. Login to the router web interface and get the value of `stok=` from the URL 3. Open a new tab and go to the following URL (replace <STOK> with the stok value gained above; line breaks are only for easier handling, please put together all four lines into a single URL without any spaces): http://192.168.31.1/cgi-bin/luci/;stok=<STOK>/api/misystem/set_config_iotdev ?bssid=any&user_id=any&ssid=-h%0Anvram%20set%20ssh_en%3D1%0Anvram%20commit %0Ased%20-i%20%27s%2Fchannel%3D.%2A%2Fchannel%3D%5C%5C%22debug%5C%5C%22%2F g%27%20%2Fetc%2Finit.d%2Fdropbear%0A%2Fetc%2Finit.d%2Fdropbear%20start%0A 4. Wait 30-60 seconds (this is the time required to generate keys for the SSH server on the router). Create Full Backup 1. Obtain SSH Access. 2. Create backup of all flash (on router): dd if=/dev/mtd0 of=/tmp/ALL.backup 3. Copy backup to PC (on PC): scp root@192.168.31.1:/tmp/ALL.backup ./ Tip: backup of the original firmware, taken three times, increases the chances of recovery :) Calculate The Password * Locally using shell (replace "12345/E0QM98765" with your router's serial number): On Linux printf "%s6d2df50a-250f-4a30-a5e6-d44fb0960aa0" "12345/E0QM98765" | \ md5sum - | head -c8 && echo On macOS printf "%s6d2df50a-250f-4a30-a5e6-d44fb0960aa0" "12345/E0QM98765" | \ md5 | head -c8 * Locally using python script (replace "12345/E0QM98765" with your router's serial number): wget https://raw.githubusercontent.com/eisaev/ax3600-files/master/scripts/calc_passwd.py python3.7 -c 'from calc_passwd import calc_passwd; print(calc_passwd("12345/E0QM98765"))' * Online https://www.oxygen7.cn/miwifi/ Debricking (lite) If you have a healthy bootloader, you can use recovery via TFTP using programs like TinyPXE on Windows or dnsmasq on Linux. To switch the router to TFTP recovery mode, hold down the reset button, connect the power supply, and release the button after about 10 seconds. The router must be connected directly to the PC via the LAN port. Debricking You will need a full dump of your flash, a CH341 programmer, and a clip for in-circuit programming. Install OpenWRT 1. Obtain SSH Access. 2. Create script (on router): echo '#!/bin/sh' > /tmp/flash_fw.sh echo >> /tmp/flash_fw.sh echo '. /bin/boardupgrade.sh' >> /tmp/flash_fw.sh echo >> /tmp/flash_fw.sh echo 'board_prepare_upgrade' >> /tmp/flash_fw.sh echo 'mtd erase rootfs_data' >> /tmp/flash_fw.sh echo 'mtd write /tmp/openwrt.bin firmware' >> /tmp/flash_fw.sh echo 'sleep 3' >> /tmp/flash_fw.sh echo 'reboot' >> /tmp/flash_fw.sh echo >> /tmp/flash_fw.sh chmod +x /tmp/flash_fw.sh 3. Copy `openwrt-ath79-generic-xiaomi_aiot-ac2350-squashfs-sysupgrade.bin` to the router (on PC): scp openwrt-ath79-generic-xiaomi_aiot-ac2350-squashfs-sysupgrade.bin \ root@192.168.31.1:/tmp/openwrt.bin 4. Flash OpenWRT (on router): /bin/ash /tmp/flash_fw.sh & 5. SSH connection will be interrupted - this is normal. 6. Wait for the indicator to turn blue. Signed-off-by: Evgeniy Isaev <isaev.evgeniy@gmail.com> [improve commit message formatting slightly] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2021-05-11 10:45:51 +02:00
nec,wg800hp|\
xiaomi,aiot-ac2350)
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
;;
2019-10-30 10:07:27 +01:00
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"
;;
ath79: add support for Qxwlan E558 v2 Qxwlan E558 v2 is based on Qualcomm QCA9558 + AR8327. Specification: - 720/600/200 MHz (CPU/DDR/AHB) - 128 MB of RAM (DDR2) - 8/16 MB of FLASH (SPI NOR) - 2T2R 2.4 GHz (QCA9558) - 3x 10/100/1000 Mbps Ethernet (one port with PoE support) - 4x miniPCIe slot (USB 2.0 bus only) - 1x microSIM slot - 5x LED (4 driven by GPIO) - 1x button (reset) - 1x 3-pos switch - 1x DC jack for main power input (9-48 V) - UART (JP5) and LEDs (J8) headers on PCB Flash instruction: 1.Using tftp mode with UART connection and original LEDE image - Configure PC with static IP 192.168.1.10 and tftp server. - Rename "openwrt-ar71xx-generic-xxx-squashfs-sysupgrade.bin" to "firmware.bin" and place it in tftp server directory. - Connect PC with one of LAN ports, power up the router and press key "Enter" to access U-Boot CLI. - Use the following commands to update the device to LEDE: run lfw - After that the device will reboot and boot to LEDE. - Wait until all LEDs stops flashing and use the router. 2.Using httpd mode with Web UI connection and original LEDE image - Configure PC with static IP 192.168.1.xxx(2-255) and tftp server. - Connect PC with one of LAN ports,press the reset button, power up the router and keep button pressed for around 6-7 seconds, until leds flashing. - Open your browser and enter 192.168.1.1,You will see the upgrade interface, select "openwrt-ar71xx-generic-xxx-squashfs- sysupgrade.bin" and click the upgrade button. - After that the device will reboot and boot to LEDE. - Wait until all LEDs stops flashing and use the router. Signed-off-by: 张鹏 <sd20@qxwlan.com> [cut out of bigger patch, keep swconfig, whitespace adjustments] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-10-16 12:42:15 +02:00
qxwlan,e558-v2-8m|\
qxwlan,e558-v2-16m)
ucidef_add_switch "switch0" \
"0@eth1" "4:lan" "5:lan" "6@eth0" "3:wan"
;;
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>
2020-04-29 21:59:04 +02:00
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"
;;
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>
2020-01-19 21:05:31 +01:00
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"
;;
ath79: support for TP-Link EAP225-Wall v2 TP-Link EAP225-Wall v2 is an AC1200 (802.11ac Wave-2) wall plate access point. UART access and debricking require fine soldering. The device was kindly provided for porting by Stijn Segers. Device specifications: * SoC: QCA9561 @ 775MHz * RAM: 128MiB DDR2 * Flash: 16MiB SPI-NOR (GD25Q127CSIG) * Wireless 2.4GHz (SoC): b/g/n, 2x2 * Wireless 5Ghz (QCA9886): a/n/ac, 2x2 MU-MIMO * Ethernet (SoC): 4× 100Mbps * Eth0 (back): 802.3af/at PoE in * Eth1, Eth2 (bottom) * Eth3 (bottom): PoE out (can be toggled by GPIO) * One status LED * Two buttons (both work as failsafe) * LED button, implemented as KEY_BRIGHTNESS_TOGGLE * Reset button Flashing instructions, requires recent firmware (tested on 1.20.0): * ssh into target device and run `cliclientd stopcs` * Upgrade with factory image via web interface Debricking: * Serial port can be soldered on PCB J4 (1: TXD, 2: RXD, 3: GND, 4: VCC) * Bridge unpopulated resistors R162 (TXD) and R165 (RXD) Do NOT bridge R164 * Use 3.3V, 115200 baud, 8n1 * Interrupt bootloader by holding CTRL+B during boot * tftp initramfs to flash via sysupgrade or LuCI web interface MAC addresses: MAC address (as on device label) is stored in device info partition at an offset of 8 bytes. ath9k device has same address as ethernet, ath10k uses address incremented by 1. From OEM ifconfig: br0 Link encap:Ethernet HWaddr 50:...:04 eth0 Link encap:Ethernet HWaddr 50:...:04 wifi0 Link encap:UNSPEC HWaddr 50-...-04-... wifi1 Link encap:UNSPEC HWaddr 50-...-05-... Signed-off-by: Sander Vanheule <sander@svanheule.net> [fix IMAGE_SIZE] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-07-26 22:40:54 +02:00
tplink,eap225-wall-v2)
ucidef_add_switch "switch0" \
"0@eth0" "1:lan" "2:lan" "3:lan" "4:lan"
;;
ath79: add support for TP-Link EAP245-v3 TP-Link EAP245 v3 is an AC1750 (802.11ac Wave-2) ceiling mount access point. UART access (for debricking) requires non-trivial soldering. Specifications: * SoC: QCA9563 (CPU/DDR/AHB @ 775/650/258 MHz) * RAM: 128MiB * Flash: 16MiB SPI-NOR * Wireless 2.4GHz (SoC): b/g/n 3x3 * Wireless 5GHz (QCA9982): a/n/ac 3x3 with MU-MIMO * Ethernet (QCA8337N switch): 2× 1GbE, ETH1 (802.3at PoE) and ETH2 * Green and amber status LEDs * Reset switch (GPIO, available for failsafe) Flashing instructions: All recent firmware versions (latest is 2.20.0), can disable firmware signature verification and use a padded firmware file to flash OpenWrt: * ssh into target device and run `cliclientd stopcs` * upload factory image via web interface The stopcs-method is supported from firmware version 2.3.0. Earlier versions need to be upgraded to a newer stock version before flashing OpenWrt. Factory images for these devices are RSA signed by TP-Link. While the signature verification can be disabled, the factory image still needs to have a (fake) 1024 bit signature added to pass file checks. Debricking instructions: You can recover using u-boot via the serial port: * Serial port is available from J3 (1:TX, 2:RX, 3:GND, 4:3.3V) * Bridge R237 to connect RX, located next to J3 * Bridge R225 to connect TX, located inside can on back-side of board * Serial port is 115200 baud, 8n1, interrupt u-boot by holding ctrl+B * Upload initramfs with tftp and upgrade via OpenWrt Device mac addresses: Stock firmware has the same mac address for 2.4GHz wireless and ethernet, 5GHz is incremented by one. The base mac address is stored in the 'default-mac' partition (offset 0x90000) at an offset of 8 bytes. ART blobs contain no mac addresses. From OEM ifconfig: ath0 Link encap:Ethernet HWaddr 74:..:E2 ath10 Link encap:Ethernet HWaddr 74:..:E3 br0 Link encap:Ethernet HWaddr 74:..:E2 eth0 Link encap:Ethernet HWaddr 74:..:E2 Signed-off-by: Sander Vanheule <sander@svanheule.net> Tested-by: Stijn Tintel <stijn@linux-ipv6.be>
2020-06-04 20:59:13 +02:00
tplink,eap245-v3)
ucidef_add_switch "switch0" \
"0@eth0" "2:lan:1" "5:lan:2"
;;
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-wpa8630-v1|\
tplink,tl-wpa8630p-v2-int|\
tplink,tl-wpa8630p-v2.0-eu|\
tplink,tl-wpa8630p-v2.1-eu)
ath79: add support for TP-Link TL-WPA8630P v2 The TL-WPA8630P v2 is a HomePlug AV2 compatible device with a QCA9563 SoC and 2.4GHz and 5GHz WiFi modules. Specifications -------------- - QCA9563 750MHz, 2.4GHz WiFi - QCA9888 5GHz WiFi - 8MiB SPI Flash - 128MiB RAM - 3 GBit Ports (QCA8337) - PLC (QCA7550) MAC address assignment ---------------------- WiFi 2.4GHz and LAN share the same MAC address as printed on the label. 5GHz WiFi uses LAN-1, based on assumptions from similar devices. LAN Port assignment ------------------- While there are 3 physical LAN ports on the device, there will be 4 visible ports in OpenWrt. The fourth port (internal port 5) is used by the PowerLine Communication SoC and thus treated like a regular LAN port. Versions -------- Note that both TL-WPA8630 and TL-WPA8630P, as well as the different country-versions, differ in partitioning, and therefore shouldn't be cross-flashed. This adds support for the two known partitioning variants of the TL-WPA8630P, where the variants can be safely distinguished via the tplink-safeloader SupportList. For the non-P variants (TL-WPA8630), at least two additional partitioning schemes exist, and the same SupportList entry can have different partitioning. Thus, we don't support those officially (yet). Also note that the P version for Germany (DE) requires the international image version, but is properly protected by SupportList. In any case, please check the OpenWrt Wiki pages for the device before flashing anything! Installation ------------ Installation is possible from the OEM web interface. Make sure to install the latest OEM firmware first, so that the PLC firmware is at the latest version. However, please also check the Wiki page for hints according to altered partitioning between OEM firmware revisions. Additional thanks to Jon Davies and Joe Mullally for bringing order into the partitioning mess. Signed-off-by: Andreas Böhler <dev@aboehler.at> [minor DTS adjustments, add label-mac-device, drop chosen, move common partitions to DTSI, rename de to int, add AU support strings, adjust TPLINK_BOARD_ID, create common node in generic-tp-link.mk, adjust commit message] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-03-15 00:20:22 +01:00
# port 5 (internal) is the power-line port
ucidef_add_switch "switch0" \
"0@eth0" "2:lan:3" "3:lan:2" "4:lan:1" "5:lan:4"
;;
tplink,tl-wr842n-v2|\
tplink,tl-wr941hp-v1)
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"
;;
ubnt,aircube-ac)
ucidef_add_switch "switch0" \
"0@eth0" "2:lan:1" "3:lan:2" "5:lan:3" "4:wan"
;;
ubnt,aircube-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>
2019-03-15 21:02:54 +01:00
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>
2019-03-15 21:02:54 +01:00
;;
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>
2018-08-27 15:59:09 +02:00
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"
;;
ubnt,unifi-ap-pro)
ucidef_add_switch "switch0" \
"0@eth0" "1:lan" "2:lan"
;;
xiaomi,mi-router-4q|\
zbtlink,zbt-wd323)
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>
2018-09-01 04:28:35 +02:00
adtran,bsap1800-v2|\
adtran,bsap1840)
lan_mac=$(mtd_get_mac_binary "Board data" 2)
label_mac=$lan_mac
;;
ath79: add support for Senao Engenius ENS202EXT v1 Engenius ENS202EXT v1 is an outdoor wireless access point with 2 10/100 ports, with built-in ethernet switch, detachable antennas and proprietery PoE. FCC ID: A8J-ENS202 Specification: - Qualcomm/Atheros AR9341 v1 - 535/400/200/40 MHz (CPU/DDR/AHB/REF) - 64 MB of RAM - 16 MB of FLASH MX25L12835F(MI-10G) - UART (J1) header on PCB (unpopulated) - 2x 10/100 Mbps Ethernet (built-in switch Atheros AR8229) - 2.4 GHz, up to 27dBm (Atheros AR9340) - 2x external, detachable antennas - 7x LED (5 programmable in ath79), 1x GPIO button (Reset) Known Issues: - Sysupgrade from ar71xx no longer possible - Ethernet LEDs stay on solid when connected, not programmable MAC addresses: eth0/eth1 *:7b art 0x0/0x6 wlan *:7a art 0x1002 The device label lists both addresses, WLAN MAC and ETH MAC, in that order. Since 0x0 and 0x6 have the same content, it cannot be determined which is eth0 and eth1, so we chose 0x0 for both. Installation: 2 ways to flash factory.bin from OEM: - Connect ethernet directly to board (the non POE port) this is LAN for all images - if you get Failsafe Mode from failed flash: only use it to flash Original firmware from Engenius or risk kernel loop which requires serial cable Method 1: Firmware upgrade page: OEM webpage at 192.168.1.1 username and password "admin" In upper right select Reset "Restore to factory default settings" Wait for reboot and login again Navigate to "Firmware Upgrade" page from left pane Click Browse and select the factory.bin image Upload and verify checksum Click Continue to confirm and wait 3 minutes Method 2: Serial to load Failsafe webpage: After connecting to serial console and rebooting... Interrupt boot with any key pressed rapidly execute `run failsafe_boot` OR `bootm 0x9fdf0000` wait a minute connect to ethernet and navigate to "192.168.1.1/index.htm" Select the factory.bin image and upload wait about 3 minutes *If you are unable to get network/LuCI after flashing* You must perform another factory reset: After waiting 3 minutes or when Power LED stop blinking: Hold Reset button for 15 seconds while powered on or until Power LED blinks very fast release and wait 2 minutes Return to OEM: If you have a serial cable, see Serial Failsafe instructions *DISCLAIMER* The Failsafe image is unique to this model. The following directions are unique to this model. DO NOT downgrade to ar71xx this way, can cause kernel loop The easiest way to return to the OEM software is the Failsafe image If you dont have a serial cable, you can ssh into openwrt and run `mtd -r erase fakeroot` Wait 3 minutes connect to ethernet and navigate to 192.168.1.1/index.htm select OEM firmware image from Engenius and click upgrade TFTP Recovery: For some reason, TFTP is not reliable on this board. Takes many attempts, many timeouts before it fully transfers. Starting with an initramfs.bin: Connect to ethernet set IP address and TFTP server to 192.168.1.101 set up infinite ping to 192.168.1.1 rename the initramfs.bin to "vmlinux-art-ramdisk" and host on TFTP server disconnect power to the board hold reset button while powering on board for 8 seconds Wait a minute, power LED should blink eventually if successful and a minute after that the pings should get replies You have now loaded a temporary Openwrt with default settings temporarily. You can use that image to sysupgrade another image to overwrite flash. Format of OEM firmware image: The OEM software of ENS202EXT is a heavily modified version of Openwrt Kamikaze bleeding-edge. One of the many modifications is to the sysupgrade program. Image verification is performed simply by the successful ungzip and untar of the supplied file and name check and header verification of the resulting contents. To form a factory.bin that is accepted by OEM Openwrt build, the kernel and rootfs must have specific names... openwrt-senao-ens202ext-uImage-lzma.bin openwrt-senao-ens202ext-root.squashfs and begin with the respective headers (uImage, squashfs). Then the files must be tarballed and gzipped. The resulting binary is actually a tar.gz file in disguise. This can be verified by using binwalk on the OEM firmware images, ungzipping then untaring, and by swapping headers to see what the OEM upgrade utility accepts and rejects. Note on the factory.bin: The newest kernel is too large to be in the kernel partition the new ath79 kernel is beyond 1592k Even ath79-tiny is 1580k Checksum fails at boot because the bootloader (modified uboot) expects kernel to be 1536k. If the kernel is larger, it gets overwritten when rootfs is flashed, causing a broken image. The mtdparts variable is part of the build and saving a new uboot environment will not persist after flashing. OEM version might interact with uboot or with the custom OEM partition at 0x9f050000. Failed checksums at boot cause failsafe image to launch, allowing any image to be flashed again. HOWEVER: one should not install older Openwrt from failsafe because it can cause rootfs to be unmountable, causing kernel loop after successful checksum. The only way to rescue after that is with a serial cable. For these reasons, a fake kernel (OKLI kernel loader) and fake squashfs rootfs is implemented to take care of the OEM firmware image verification and checksums at boot. The OEM only verifies the checksum of the first image of each partition respectively, which is the loader and the fake squashfs. This completely frees the "firmware" partition from all checks. virtual_flash is implemented to make use of the wasted space. this leaves only 2 erase blocks actually wasted. The loader and fakeroot partitions must remain intact, otherwise the next boot will fail, redirecting to the Failsafe image. Because the partition table required is so different than the OEM partition table and ar71xx partition table, sysupgrades are not possible until one switches to ath79 kernel. Note on sysupgrade.tgz: To make things even more complicated, another change is needed to fix an issue where network does not work after flashing from either OEM software or Failsafe image, which implants the OEM (Openwrt Kamikaze) configuration into the jffs2 /overlay when writing rootfs from factory.bin. The upgrade script has this: mtd -j "/tmp/_sys/sysupgrade.tgz" write "${rootfs}" "rootfs" However, it also accepts scripts before and after: before_local="/etc/before-upgradelocal.sh" after_local="/etc/after-upgradelocal.sh" before="before-upgrade.sh" after="after-upgrade.sh" Thus, we can solve the issue by making the .tgz an empty file by making a before-upgrade.sh in the factory.bin Note on built-in switch: There is two ports on the board, POE through the power supply brick, the other is on the board. For whatever reason, in the ar71xx target, both ports were on the built-in switch on eth1. In order to make use of a port for WAN or a different LAN, one has to set up VLANs. In ath79, eth0 and eth1 is defined in the DTS so that the built-in switch is seen as eth0, but only for 1 port the other port is on eth1 without a built-in switch. eth0: switch0 CPU is port 0 board port is port 1 eth1: POE port on the power brick Since there is two physical ports, it can be configured as a full router, with LAN for both wired and wireless. According to the Datasheet, the port that is not on the switch is connected to gmac0. It is preferred that gmac0 is chosen as WAN over a port on an internal switch, so that link status can pass to the kernel immediately which is more important for WAN connections. Signed-off-by: Michael Pratt <mpratt51@gmail.com> [apply sorting in 01_leds, make factory recipe more generic, create common device node, move label-mac to 02_network, add MAC addresses to commit message, remove kmod-leds-gpio, use gzip directly] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-05-11 22:58:02 +02:00
alfa-network,ap121f|\
alfa-network,ap121fe|\
alfa-network,n2q|\
alfa-network,n5q|\
alfa-network,pi-wifi4|\
ath79: add support for ALFA Network R36A ALFA Network R36A is a successor of the previous model, the R36 (Ralink RT3050F based). New version is based on Qualcomm/Atheros QCA9531 v2, FCC ID: 2AB879531. Support for this device was first introduced in af8f0629df (ar71xx target). When updating from previous release (and/or ar71xx target), user should only adjust the WAN LED trigger type (netdev in ar71xx, switch port in ath79). Specifications: - Qualcomm/Atheros QCA9531 v2 - 650/400/200 MHz (CPU/DDR/AHB) - 128 MB (R36AH/-U2) or 64 MB (R36A) of RAM (DDR2) - 16 MB of flash (SPI NOR) - 2x 10/100 Mbps Ethernet - Passive PoE input support (12~36 V) in RJ45 near DC jack - 2T2R 2.4 GHz Wi-Fi with Qorvo RFFM8228P FEM - 2x IPEX/U.FL connectors on PCB - 1x USB 2.0 Type-A - 1x USB 2.0 mini Type-B in R36AH-U2 version - USB power is controlled by GPIO - 6/7x LED (5/6 of them are driven by GPIO) - 2x button (reset, wifi/wps) - external h/w watchdog (EM6324QYSP5B, enabled by default) - DC jack with lock, for main power input (12 V) - UART (4-pin, 2.54 mm pitch) header on PCB Optional/additional features in R36A series (R36A was the first model): - for R36AH: USB 2.0 hub* - for R36AH-U2: USB 2.0 hub*, 1x USB 2.0 mini Type-B, one more LED *) there are at least three different USB 2.0 hub in R36AH/-U2 variants: - Terminus-Tech FE 1.1 - Genesys Logic GL852G - Genesys Logic GL850G (used in latests revision) Flash instruction: You can use sysupgrade image directly in vendor firmware which is based on LEDE/OpenWrt. Alternatively, you can use web recovery mode in U-Boot: 1. Configure PC with static IP 192.168.1.2/24. 2. Connect PC with one of RJ45 ports, press the reset button, power up device, wait for first blink of all LEDs (indicates network setup), then keep button for 3 following blinks and release it. 3. Open 192.168.1.1 address in your browser and upload sysupgrade image. Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2020-07-02 07:03:33 +02:00
alfa-network,r36a|\
ath79: add support for Senao Engenius EAP300 v2 FCC ID: A8J-EAP300A Engenius EAP300 v2 is an indoor wireless access point with a 100/10-BaseT ethernet port, 2.4 GHz wireless, internal antennas, and 802.3af PoE. **Specification:** - AR9341 - 40 MHz reference clock - 16 MB FLASH MX25L12845EMI-10G - 64 MB RAM - UART at J1 (populated) - Ethernet port with POE - internal antennas - 3 LEDs, 1 button (power, eth, wlan) (reset) **MAC addresses:** phy0 *:d3 art 0x1002 (label) eth0 *:d4 art 0x0/0x6 **Installation:** - if you get Failsafe Mode from failed flash: only use it to flash Original firmware from Engenius or risk kernel loop or halt which requires serial cable Method 1: Firmware upgrade page: OEM webpage at 192.168.1.1 username and password "admin" Navigate to "Firmware" page from left pane Click Browse and select the factory.bin image Upload and verify checksum Click Continue to confirm and wait 3 minutes Method 2: Serial to load Failsafe webpage: After connecting to serial console and rebooting... Interrupt uboot with any key pressed rapidly execute `run failsafe_boot` OR `bootm 0x9fdf0000` wait a minute connect to ethernet and navigate to "192.168.1.1/index.htm" Select the factory.bin image and upload wait about 3 minutes **Return to OEM:** If you have a serial cable, see Serial Failsafe instructions *DISCLAIMER* The Failsafe image is unique to Engenius boards. If the failsafe image is missing or damaged this will not work DO NOT downgrade to ar71xx this way, can cause kernel loop or halt The easiest way to return to the OEM software is the Failsafe image If you dont have a serial cable, you can ssh into openwrt and run `mtd -r erase fakeroot` Wait 3 minutes connect to ethernet and navigate to 192.168.1.1/index.htm select OEM firmware image from Engenius and click upgrade **TFTP recovery** (unstable / not reliable): rename initramfs to 'vmlinux-art-ramdisk' make available on TFTP server at 192.168.1.101 power board while holding or pressing reset button repeatedly NOTE: for some Engenius boards TFTP is not reliable try setting MTU to 600 and try many times **Format of OEM firmware image:** The OEM software of EAP300 v2 is a heavily modified version of Openwrt Kamikaze. One of the many modifications is to the sysupgrade program. Image verification is performed simply by the successful ungzip and untar of the supplied file and name check and header verification of the resulting contents. To form a factory.bin that is accepted by OEM Openwrt build, the kernel and rootfs must have specific names and begin with the respective headers (uImage, squashfs). Then the files must be tarballed and gzipped. The resulting binary is actually a tar.gz file in disguise. This can be verified by using binwalk on the OEM firmware images, ungzipping then untaring. The OEM upgrade script is at /etc/fwupgrade.sh. OKLI kernel loader is required because the OEM software expects the kernel size to be no greater than 1536k and otherwise the factory.bin upgrade procedure would overwrite part of the kernel when writing rootfs. Signed-off-by: Michael Pratt <mcpratt@pm.me> [clarify MAC address section, bump PKG_RELEASE for uboot-envtools] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-11-05 01:32:27 +01:00
engenius,eap300-v2|\
ath79: add support for Senao Engenius ENS202EXT v1 Engenius ENS202EXT v1 is an outdoor wireless access point with 2 10/100 ports, with built-in ethernet switch, detachable antennas and proprietery PoE. FCC ID: A8J-ENS202 Specification: - Qualcomm/Atheros AR9341 v1 - 535/400/200/40 MHz (CPU/DDR/AHB/REF) - 64 MB of RAM - 16 MB of FLASH MX25L12835F(MI-10G) - UART (J1) header on PCB (unpopulated) - 2x 10/100 Mbps Ethernet (built-in switch Atheros AR8229) - 2.4 GHz, up to 27dBm (Atheros AR9340) - 2x external, detachable antennas - 7x LED (5 programmable in ath79), 1x GPIO button (Reset) Known Issues: - Sysupgrade from ar71xx no longer possible - Ethernet LEDs stay on solid when connected, not programmable MAC addresses: eth0/eth1 *:7b art 0x0/0x6 wlan *:7a art 0x1002 The device label lists both addresses, WLAN MAC and ETH MAC, in that order. Since 0x0 and 0x6 have the same content, it cannot be determined which is eth0 and eth1, so we chose 0x0 for both. Installation: 2 ways to flash factory.bin from OEM: - Connect ethernet directly to board (the non POE port) this is LAN for all images - if you get Failsafe Mode from failed flash: only use it to flash Original firmware from Engenius or risk kernel loop which requires serial cable Method 1: Firmware upgrade page: OEM webpage at 192.168.1.1 username and password "admin" In upper right select Reset "Restore to factory default settings" Wait for reboot and login again Navigate to "Firmware Upgrade" page from left pane Click Browse and select the factory.bin image Upload and verify checksum Click Continue to confirm and wait 3 minutes Method 2: Serial to load Failsafe webpage: After connecting to serial console and rebooting... Interrupt boot with any key pressed rapidly execute `run failsafe_boot` OR `bootm 0x9fdf0000` wait a minute connect to ethernet and navigate to "192.168.1.1/index.htm" Select the factory.bin image and upload wait about 3 minutes *If you are unable to get network/LuCI after flashing* You must perform another factory reset: After waiting 3 minutes or when Power LED stop blinking: Hold Reset button for 15 seconds while powered on or until Power LED blinks very fast release and wait 2 minutes Return to OEM: If you have a serial cable, see Serial Failsafe instructions *DISCLAIMER* The Failsafe image is unique to this model. The following directions are unique to this model. DO NOT downgrade to ar71xx this way, can cause kernel loop The easiest way to return to the OEM software is the Failsafe image If you dont have a serial cable, you can ssh into openwrt and run `mtd -r erase fakeroot` Wait 3 minutes connect to ethernet and navigate to 192.168.1.1/index.htm select OEM firmware image from Engenius and click upgrade TFTP Recovery: For some reason, TFTP is not reliable on this board. Takes many attempts, many timeouts before it fully transfers. Starting with an initramfs.bin: Connect to ethernet set IP address and TFTP server to 192.168.1.101 set up infinite ping to 192.168.1.1 rename the initramfs.bin to "vmlinux-art-ramdisk" and host on TFTP server disconnect power to the board hold reset button while powering on board for 8 seconds Wait a minute, power LED should blink eventually if successful and a minute after that the pings should get replies You have now loaded a temporary Openwrt with default settings temporarily. You can use that image to sysupgrade another image to overwrite flash. Format of OEM firmware image: The OEM software of ENS202EXT is a heavily modified version of Openwrt Kamikaze bleeding-edge. One of the many modifications is to the sysupgrade program. Image verification is performed simply by the successful ungzip and untar of the supplied file and name check and header verification of the resulting contents. To form a factory.bin that is accepted by OEM Openwrt build, the kernel and rootfs must have specific names... openwrt-senao-ens202ext-uImage-lzma.bin openwrt-senao-ens202ext-root.squashfs and begin with the respective headers (uImage, squashfs). Then the files must be tarballed and gzipped. The resulting binary is actually a tar.gz file in disguise. This can be verified by using binwalk on the OEM firmware images, ungzipping then untaring, and by swapping headers to see what the OEM upgrade utility accepts and rejects. Note on the factory.bin: The newest kernel is too large to be in the kernel partition the new ath79 kernel is beyond 1592k Even ath79-tiny is 1580k Checksum fails at boot because the bootloader (modified uboot) expects kernel to be 1536k. If the kernel is larger, it gets overwritten when rootfs is flashed, causing a broken image. The mtdparts variable is part of the build and saving a new uboot environment will not persist after flashing. OEM version might interact with uboot or with the custom OEM partition at 0x9f050000. Failed checksums at boot cause failsafe image to launch, allowing any image to be flashed again. HOWEVER: one should not install older Openwrt from failsafe because it can cause rootfs to be unmountable, causing kernel loop after successful checksum. The only way to rescue after that is with a serial cable. For these reasons, a fake kernel (OKLI kernel loader) and fake squashfs rootfs is implemented to take care of the OEM firmware image verification and checksums at boot. The OEM only verifies the checksum of the first image of each partition respectively, which is the loader and the fake squashfs. This completely frees the "firmware" partition from all checks. virtual_flash is implemented to make use of the wasted space. this leaves only 2 erase blocks actually wasted. The loader and fakeroot partitions must remain intact, otherwise the next boot will fail, redirecting to the Failsafe image. Because the partition table required is so different than the OEM partition table and ar71xx partition table, sysupgrades are not possible until one switches to ath79 kernel. Note on sysupgrade.tgz: To make things even more complicated, another change is needed to fix an issue where network does not work after flashing from either OEM software or Failsafe image, which implants the OEM (Openwrt Kamikaze) configuration into the jffs2 /overlay when writing rootfs from factory.bin. The upgrade script has this: mtd -j "/tmp/_sys/sysupgrade.tgz" write "${rootfs}" "rootfs" However, it also accepts scripts before and after: before_local="/etc/before-upgradelocal.sh" after_local="/etc/after-upgradelocal.sh" before="before-upgrade.sh" after="after-upgrade.sh" Thus, we can solve the issue by making the .tgz an empty file by making a before-upgrade.sh in the factory.bin Note on built-in switch: There is two ports on the board, POE through the power supply brick, the other is on the board. For whatever reason, in the ar71xx target, both ports were on the built-in switch on eth1. In order to make use of a port for WAN or a different LAN, one has to set up VLANs. In ath79, eth0 and eth1 is defined in the DTS so that the built-in switch is seen as eth0, but only for 1 port the other port is on eth1 without a built-in switch. eth0: switch0 CPU is port 0 board port is port 1 eth1: POE port on the power brick Since there is two physical ports, it can be configured as a full router, with LAN for both wired and wireless. According to the Datasheet, the port that is not on the switch is connected to gmac0. It is preferred that gmac0 is chosen as WAN over a port on an internal switch, so that link status can pass to the kernel immediately which is more important for WAN connections. Signed-off-by: Michael Pratt <mpratt51@gmail.com> [apply sorting in 01_leds, make factory recipe more generic, create common device node, move label-mac to 02_network, add MAC addresses to commit message, remove kmod-leds-gpio, use gzip directly] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-05-11 22:58:02 +02:00
engenius,ens202ext-v1)
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>
2018-09-01 04:28:35 +02:00
;;
arduino,yun)
base_mac=$(mtd_get_mac_binary art 0x1002)
lan_mac=$(macaddr_setbit $base_mac 29)
[ $lan_mac = $base_mac ] && lan_mac=$(macaddr_unsetbit $base_mac 29)
;;
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>
2020-05-14 10:44:21 +02:00
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>
2018-08-18 18:30:46 +02:00
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 COMFAST CF-E375AC COMFAST CF-E375AC is a ceiling mount AP with PoE support, based on Qualcomm/Atheros QCA9563 + QCA9886 + QCA8337. Short specification: 2x 10/100/1000 Mbps Ethernet, with PoE support 128MB of RAM (DDR2) 16 MB of FLASH 3T3R 2.4 GHz, 802.11b/g/n 2T2R 5 GHz, 802.11ac/n/a, wave 2 built-in 5x 3 dBi antennas output power (max): 500 mW (27 dBm) 1x RGB LED, 1x button built-in watchdog chipset Flash instruction: 1) Original firmware is based on OpenWrt. Use sysupgrade image directly in vendor GUI. 2) TFTP 2.1) Set a tftp server on your machine with a fixed IP address of 192.168.1.10. A place the sysupgrade as firmware_auto.bin. 2.2) boot the device with an ethernet connection on fixed ip route 2.3) wait a few seconds and try to login via ssh 3) TFTP trough Bootloader 3.1) open the device case and get a uart connection working 3.2) stop the autoboot process and test connection with serverip 3.3) name the sysupgrade image firmware.bin and run firmware_upg MAC addresses: Though the OEM firmware has four adresses in the usual locations, it appears that the assigned addresses are just incremented in a different way: interface address location LAN: *:DC 0x0 WAN *:DD 0x1002 WLAN 2.4g *:E6 n/a (0x0 + 10) WLAN 5g *:DE 0x6 unused *:DF 0x5006 The MAC address pointed at the label is the one assign to the LAN interface. Signed-off-by: Joao Henrique Albuquerque <joaohccalbu@gmail.com> [add label-mac-device, remove redundant uart status, fix whitespace issues, fix commit message wrapping, remove x bit on DTS file] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-08-14 17:04:02 +02:00
comfast,cf-e375ac)
wan_mac=$(macaddr_add $(mtd_get_mac_binary art 0x0) 1)
;;
compex,wpj344-16m|\
compex,wpj558-16m|\
compex,wpj563)
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>
2019-07-26 20:32:55 +02:00
wan_mac=$(mtd_get_mac_binary u-boot 0x2e018)
;;
ath79: add support for Devolo dLAN pro 1200+ WiFi ac This patch adds support for the Devolo dLAN pro 1200+ WiFi ac. This device is a plc wifi AC2400 router/extender with 2 Ethernet ports, has a QCA7500 PLC and uses the HomePlug AV2 standard. Other than the PLC the hardware is identical to the Devolo Magic 2 WIFI. Therefore it uses the same dts, which was moved to a dtsi to be included by both boards. This is a board that was previously included in the ar71xx tree. Hardware: SoC: AR9344 CPU: 560 MHz Flash: 16 MiB (W25Q128JVSIQ) RAM: 128 MiB DDR2 Ethernet: 2xLAN 10/100/1000 PLC: QCA75000 (Qualcomm HPAV2) 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 The Powerline (PLC) interface of the dLAN pro 1200+ WiFi ac requires 3rd party firmware which is not available from standard OpenWrt package feeds. There is a package feed on github which you must add to OpenWrt buildroot so you can build a firmware image which supports the plc interface. See: https://github.com/0xFelix/dlan-openwrt (forked from Devolo and added compatibility for OpenWrt 21.02) 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: Felix Matouschek <felix@matouschek.org> [add "plus" to compatible and device name] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2021-02-18 23:12:01 +01:00
devolo,dlan-pro-1200plus-ac|\
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>
2019-09-16 12:25:23 +02:00
devolo,magic-2-wifi)
label_mac=$(macaddr_add "$(mtd_get_mac_binary art 0x1002)" 3)
;;
dlink,dap-1330-a1|\
dlink,dap-1365-a1|\
dlink,dch-g020-a1)
lan_mac=$(mtd_get_mac_text "mp" 0x1)
label_mac=$lan_mac
;;
dlink,dap-2230-a1|\
dlink,dap-2660-a1|\
dlink,dap-2680-a1|\
dlink,dap-3320-a1)
lan_mac=$(mtd_get_mac_ascii bdcfg "lanmac")
label_mac=$lan_mac
;;
ath79: add support for D-Link DAP-3662 A1 Specifications: * QCA9557, 16 MiB Flash, 128 MiB RAM, 802.11n 2T2R * QCA9882, 802.11ac 2T2R * 2x Gigabit LAN (1x 802.11af PoE) * IP68 pole-mountable outdoor case Installation: * Factory Web UI is at 192.168.0.50 login with 'admin' and blank password, flash factory.bin * Recovery Web UI is at 192.168.0.50 connect network cable, hold reset button during power-on and keep it pressed until uploading has started (only required when checksum is ok, e.g. for reverting back to oem firmware), flash factory.bin After flashing factory.bin, additional free space can be reclaimed by flashing sysupgrade.bin, since the factory image requires some padding to be accepted for upgrading via OEM Web UI. Both ethernet ports are set to LAN by default, matching the labelling on the case. However, since both GMAC Interfaces eth0 and eth1 are connected to the switch (QCA8337), the user may create an additional 'wan' interface as desired and override the vlan id settings to map br-lan / wan to either the PoE or non-PoE port, depending on the individual scenario of use. So, the LAN and WAN ports would then be connected to different GMACs, e.g. config interface 'lan' option ifname 'eth0.1' ... config interface 'wan' option ifname 'eth1.2' ... config switch_vlan option device 'switch0' option vlan '1' option ports '1 0t' config switch_vlan option device 'switch0' option vlan '2' option ports '2 6t' Signed-off-by: Sebastian Schaper <openwrt@sebastianschaper.net> [add configuration example] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-12-01 22:34:34 +01:00
dlink,dap-2695-a1|\
dlink,dap-3662-a1)
label_mac=$(mtd_get_mac_ascii bdcfg "wlanmac")
;;
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)
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)
;;
ath79: add support for Senao Engenius ECB1200 FCC ID: A8J-ECB1200 Engenius ECB1200 is an indoor wireless access point with a GbE port, 2.4 GHz and 5 GHz wireless, external antennas, and 802.3af PoE. **Specification:** - QCA9557 SOC MIPS, 2.4 GHz (2x2) - QCA9882 WLAN PCIe card, 5 GHz (2x2) - AR8035-A switch RGMII, GbE with 802.3af PoE, 25 MHz clock - 40 MHz reference clock - 16 MB FLASH 25L12845EMI-10G - 2x 64 MB RAM 1538ZFZ V59C1512164QEJ25 - UART at JP1 (unpopulated, RX shorted to ground) - 4 external antennas - 4 LEDs, 1 button (power, eth, wifi2g, wifi5g) (reset) **MAC addresses:** MAC Addresses are labeled as ETH and 5GHZ U-boot environment has the vendor MAC addresses MAC addresses in ART do not match vendor eth0 ETH *:5c u-boot-env ethaddr phy0 5GHZ *:5d u-boot-env athaddr ---- ---- ???? art 0x0/0x6 **Installation:** Method 1: Firmware upgrade page: OEM webpage at 192.168.1.1 username and password "admin" Navigate to "Firmware" page from left pane Click Browse and select the factory.bin image Upload and verify checksum Click Continue to confirm and wait 3 minutes Method 2: Serial to load Failsafe webpage: After connecting to serial console and rebooting... Interrupt uboot with any key pressed rapidly (see TFTP recovery) perform a sysupgrade **Serial Access:** the RX line on the board for UART is shorted to ground by resistor R176 therefore it must be removed to use the console but it is not necessary to remove to view boot log optionally, R175 can be replaced with a solder bridge short the resistors R175 and R176 are next to the UART pinout at JP1 **Return to OEM:** If you have a serial cable, see Serial Failsafe instructions Unlike most Engenius boards, this does not have a 'failsafe' image the only way to return to OEM is TFTP or serial access to u-boot **TFTP recovery:** Unlike most Engenius boards, TFTP is reliable here rename initramfs-kernel.bin to 'ap.bin' make the file available on a TFTP server at 192.168.1.10 power board while holding or pressing reset button repeatedly or with serial access: run `tftpboot` or `run factory_boot` with initramfs-kernel.bin then `bootm` with the load address **Format of OEM firmware image:** The OEM software of ECB1200 is a heavily modified version of Openwrt Altitude Adjustment 12.09. This Engenius board, like ECB1750, uses a proprietary header with a unique Product ID. The header for factory.bin is generated by the mksenaofw program included in openwrt. **Note on PLL-data cells:** The default PLL register values will not work because of the AR8035 switch between the SOC and the ethernet port. For QCA955x series, the PLL registers for eth0 and eth1 can be see in the DTSI as 0x28 and 0x48 respectively. Therefore the PLL registers can be read from uboot for each link speed after attempting tftpboot or another network action using that link speed with `md 0x18050028 1` and `md 0x18050048 1`. However the registers that u-boot sets are not ideal and sometimes wrong... the at803x driver supports setting the RGMII clock/data delay on the PHY side. This way the pll-data register only needs to handle invert and phase. for this board clock invert is needed on the MAC side all link speeds functional Signed-off-by: Michael Pratt <mcpratt@pm.me>
2020-11-01 02:23:33 +01:00
engenius,ecb1200|\
engenius,ecb1750)
lan_mac=$(mtd_get_mac_ascii u-boot-env ethaddr)
label_mac=$lan_mac
;;
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>
2019-03-04 15:18:53 +01:00
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)
;;
hak5,lan-turtle|\
hak5,packet-squirrel)
label_mac=$(mtd_get_mac_binary u-boot 0x1fc00)
;;
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>
2019-03-06 20:15:19 +01:00
jjplus,ja76pf2)
wan_mac=$(fconfig -s -r -d $(find_mtd_part "RedBoot config") -n alias/ethaddr)
lan_mac=$(macaddr_add "$wan_mac" 1)
;;
mercury,mw4530r-v1|\
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)
;;
ath79: add support for NEC Aterm WF1200CR NEC Aterm WF1200CR is a 2.4/5 GHz band 11ac (Wi-Fi 5) router, based on QCA9561. Specification: - SoC : Qualcomm Atheros QCA9561 - RAM : DDR2 128 MiB (W971GG6SB-25) - Flash : SPI-NOR 8 MiB (MX25L6433FM2I-08G) - WLAN : 2.4/5 GHz 2T2R - 2.4 GHz : QCA9561 (SoC) - 5 GHz : QCA9888 - Ethernet : 2x 10/100 Mbps - Switch : QCA9561 (SoC) - LEDs/Keys : 8x/3x (2x buttons, 1x slide-switch) - UART : through-hole on PCB - JP1: Vcc, GND, NC, TX, RX from "JP1" marking - 115200n8 - Power : 12 VDC, 0.9 A Flash instruction using factory image (stock: < v1.3.2): 1. Boot WF1200CR normally with "Router" mode 2. Access to "http://192.168.10.1/" and open firmware update page ("ファームウェア更新") 3. Select the OpenWrt factory image and click update ("更新") button to perform firmware update 4. Wait ~150 seconds to complete flashing Alternate flash instruction using initramfs image (stock: >= v1.3.2): 1. Prepare the TFTP server with the IP address 192.168.1.10 and place the OpenWrt initramfs image to the TFTP directory with the name "0101A8C0.img" 2. Connect serial console to WF1200CR 3. Boot WF1200CR and interrupt with any key after the message "Hit any key to stop autoboot: 2", the U-Boot starts telnetd after the message "starting telnetd server from server 192.168.1.1" 4. login the telnet (address: 192.168.1.1) 5. Perform the following commands to modify "bootcmd" variable temporary and check the value (to ignore the limitation of available commands, "tp; " command at the first is required as dummy, and the output of "printenv" is printed on the serial console) tp; set bootcmd 'set autostart yes; tftpboot' tp; printenv 6. Save the modified variable with the following command and reset device tp; saveenv tp; reset 7. The U-Boot downloads initramfs image from TFTP server and boots it 8. On initramfs image, download the sysupgrade image to the device and perform the following commands to erase stock firmware and sysupgrade mtd erase firmware sysupgrade <sysupgrade image> 9. After the rebooting by completion of sysupgrade, start U-Boot telnetd and login with the same way above (3, 4) 10. Perform the following commands to reset "bootcmd" variable to the default and reset the device tp; run seattle tp; reset (the contents of "seattle": setenv bootcmd 'bootm 0x9f070040' && saveenv) 11. Wait booting-up the device Known issues: - the following 6x LEDs are connected to the gpio controller on QCA9888 chip and the implementation of control via the controller is missing in ath10k/ath10k-ct - "ACTIVE" (Red/Green) - "2.4GHz" (Red/Green) - "5GHz" (Red/Green) Note: - after the version v1.3.2 of stock firmware, "offline update" by uploading image by user is deleted and the factory image cannot be used - the U-Boot on WF1200CR doesn't configure the port-side LEDs on WAN/LAN and the configuration is required on OpenWrt - gpio-hog: set the direction of GPIO 14(WAN)/19(LAN) to output - pinmux: set GPIO 14/19 as switch-controlled LEDs Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
2021-03-24 16:19:59 +01:00
nec,wf1200cr|\
nec,wg1200cr)
lan_mac=$(mtd_get_mac_ascii devdata "lanmac")
wan_mac=$(mtd_get_mac_ascii devdata "wanmac")
label_mac=$wan_mac
;;
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>
2019-11-04 18:05:38 +01:00
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)
;;
trendnet,tew-823dru)
lan_mac=$(mtd_get_mac_text mac 0x4)
wan_mac=$(mtd_get_mac_text mac 0x18)
label_mac=$wan_mac
;;
ubnt,airrouter|\
ubnt,bullet-m-ar7240|\
ubnt,bullet-m-ar7241|\
ubnt,nanobridge-m|\
ubnt,nanostation-loco-m|\
ubnt,nanostation-m|\
ubnt,picostation-m|\
ubnt,powerbridge-m|\
ubnt,rocket-m|\
ubnt,unifi)
label_mac=$(cat /sys/class/ieee80211/phy0/macaddress)
;;
ubnt,litebeam-ac-gen2|\
ubnt,nanobeam-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>
2018-08-27 15:59:09 +02:00
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)
;;
ath79: add support for Xiaomi AIoT Router AC2350 Device specifications * SoC: QCA9563 @ 775MHz (MIPS 74Kc) * RAM: 128MiB DDR2 * Flash: 16MiB SPI-NOR (EN25QH128) * Wireless 2.4GHz (SoC): b/g/n, 3x3 * Wireless 5Ghz (QCA9988): a/n/ac, 4x4 MU-MIMO * IoT Wireless 2.4GHz (QCA6006): currently unusable * Ethernet (AR8327): 3 LAN × 1GbE, 1 WAN × 1GbE * LEDs: Internet (blue/orange), System (blue/orange) * Buttons: Reset * UART: through-hole on PCB ([VCC 3.3v](RX)(GND)(TX) 115200, 8n1) * Power: 12VDC, 1,5A MAC addresses map (like in OEM firmware) art@0x0 88:C3:97:*:57 wan/label art@0x1002 88:C3:97:*:2D lan/wlan2g art@0x5006 88:C3:97:*:2C wlan5g Obtain SSH Access 1. Download and flash the firmware version 1.3.8 (China). 2. Login to the router web interface and get the value of `stok=` from the URL 3. Open a new tab and go to the following URL (replace <STOK> with the stok value gained above; line breaks are only for easier handling, please put together all four lines into a single URL without any spaces): http://192.168.31.1/cgi-bin/luci/;stok=<STOK>/api/misystem/set_config_iotdev ?bssid=any&user_id=any&ssid=-h%0Anvram%20set%20ssh_en%3D1%0Anvram%20commit %0Ased%20-i%20%27s%2Fchannel%3D.%2A%2Fchannel%3D%5C%5C%22debug%5C%5C%22%2F g%27%20%2Fetc%2Finit.d%2Fdropbear%0A%2Fetc%2Finit.d%2Fdropbear%20start%0A 4. Wait 30-60 seconds (this is the time required to generate keys for the SSH server on the router). Create Full Backup 1. Obtain SSH Access. 2. Create backup of all flash (on router): dd if=/dev/mtd0 of=/tmp/ALL.backup 3. Copy backup to PC (on PC): scp root@192.168.31.1:/tmp/ALL.backup ./ Tip: backup of the original firmware, taken three times, increases the chances of recovery :) Calculate The Password * Locally using shell (replace "12345/E0QM98765" with your router's serial number): On Linux printf "%s6d2df50a-250f-4a30-a5e6-d44fb0960aa0" "12345/E0QM98765" | \ md5sum - | head -c8 && echo On macOS printf "%s6d2df50a-250f-4a30-a5e6-d44fb0960aa0" "12345/E0QM98765" | \ md5 | head -c8 * Locally using python script (replace "12345/E0QM98765" with your router's serial number): wget https://raw.githubusercontent.com/eisaev/ax3600-files/master/scripts/calc_passwd.py python3.7 -c 'from calc_passwd import calc_passwd; print(calc_passwd("12345/E0QM98765"))' * Online https://www.oxygen7.cn/miwifi/ Debricking (lite) If you have a healthy bootloader, you can use recovery via TFTP using programs like TinyPXE on Windows or dnsmasq on Linux. To switch the router to TFTP recovery mode, hold down the reset button, connect the power supply, and release the button after about 10 seconds. The router must be connected directly to the PC via the LAN port. Debricking You will need a full dump of your flash, a CH341 programmer, and a clip for in-circuit programming. Install OpenWRT 1. Obtain SSH Access. 2. Create script (on router): echo '#!/bin/sh' > /tmp/flash_fw.sh echo >> /tmp/flash_fw.sh echo '. /bin/boardupgrade.sh' >> /tmp/flash_fw.sh echo >> /tmp/flash_fw.sh echo 'board_prepare_upgrade' >> /tmp/flash_fw.sh echo 'mtd erase rootfs_data' >> /tmp/flash_fw.sh echo 'mtd write /tmp/openwrt.bin firmware' >> /tmp/flash_fw.sh echo 'sleep 3' >> /tmp/flash_fw.sh echo 'reboot' >> /tmp/flash_fw.sh echo >> /tmp/flash_fw.sh chmod +x /tmp/flash_fw.sh 3. Copy `openwrt-ath79-generic-xiaomi_aiot-ac2350-squashfs-sysupgrade.bin` to the router (on PC): scp openwrt-ath79-generic-xiaomi_aiot-ac2350-squashfs-sysupgrade.bin \ root@192.168.31.1:/tmp/openwrt.bin 4. Flash OpenWRT (on router): /bin/ash /tmp/flash_fw.sh & 5. SSH connection will be interrupted - this is normal. 6. Wait for the indicator to turn blue. Signed-off-by: Evgeniy Isaev <isaev.evgeniy@gmail.com> [improve commit message formatting slightly] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2021-05-11 10:45:51 +02:00
xiaomi,aiot-ac2350)
lan_mac=$(mtd_get_mac_binary art 0x1002)
;;
ath79: add support for ZyXEL NBG6616 Specifications: SoC: Qualcomm Atheros QCA9557 RAM: 128 MB (Nanya NT5TU32M16EG-AC) Flash: 16 MB (Macronix MX25L12845EMI-10G) Ethernet: 5x 10/100/1000 (1x WAN, 4x LAN) Wireless: QCA9557 2.4GHz (nbg), QCA9882 5GHz (ac) USB: 2x USB 2.0 port Buttons: 1x Reset Switches: 1x Wifi LEDs: 11 (Pwr, WAN, 4x LAN, 2x Wifi, 2x USB, WPS) MAC addresses: WAN *:3f uboot-env ethaddr + 3 LAN *:3e uboot-env ethaddr + 2 2.4GHz *:3c uboot-env ethaddr 5GHz *:3d uboot-env ethaddr + 1 The label contains all four MAC addresses, however the one without increment is first, so this one is taken for label MAC address. Notes: The Wifi is controlled by an on/off button, i.e. has to be implemented by a switch (EV_SW). Despite, it appears that GPIO_ACTIVE_HIGH needs to be used, just like recently fixed for the NBG6716. Both parameters have been wrong at ar71xx. Flash Instructions: At first the U-Boot variables need to be changed in order to boot the new combined image format. ZyXEL uses a split kernel + root setup and the current kernel is too large to fit into the partition. As resizing didnt do the trick, I've decided to use the prefered combined image approach to be future-kernel-enlargement-proof (thanks to blocktrron for the assistance). First add a new variable called boot_openwrt: setenv boot_openwrt bootm 0x9F120000 After that overwrite the bootcmd and save the environment: setenv bootcmd run boot_openwrt saveenv After that you can flash the openwrt factory image via TFTP. The servers IP has to be 192.168.1.33. Connect to one of the LAN ports and hold the WPS Button while booting. After a few seconds the NBG6616 will look for a image file called 'ras.bin' and flash it. Return to vendor firmware is possible by resetting the bootcmd: setenv bootcmd run boot_flash saveenv and flashing the vendor image via the TFTP method as described above. Accessing the U-Boot Shell: ZyXEL uses a proprietary loader/shell on top of u-boot: "ZyXEL zloader v2.02" When the device is starting up, the user can enter the the loader shell by simply pressing a key within the 3 seconds once the following string appears on the serial console: | Hit any key to stop autoboot: 3 The user is then dropped to a locked shell. | NBG6616> ? | ATEN x,(y) set BootExtension Debug Flag (y=password) | ATSE x show the seed of password generator | ATSH dump manufacturer related data in ROM | ATRT (x,y,z,u) ATRT RAM read/write test (x=level, y=start addr, z=end addr, u=iterations | ATGO boot up whole system | ATUR x upgrade RAS image (filename) In order to escape/unlock a password challenge has to be passed. Note: the value is dynamic! you have to calculate your own! First use ATSE $MODELNAME (MODELNAME is the hostname in u-boot env) to get the challange value/seed. | NBG6616> ATSE NBG6616 | 00C91D7EAC3C This seed/value can be converted to the password with the help of this bash script (Thanks to http://www.adslayuda.com/Zyxel650-9.html authors): - tool.sh - ror32() { echo $(( ($1 >> $2) | (($1 << (32 - $2) & (2**32-1)) ) )) } v="0x$1" a="0x${v:2:6}" b=$(( $a + 0x10F0A563)) c=$(( 0x${v:12:14} & 7 )) p=$(( $(ror32 $b $c) ^ $a )) printf "ATEN 1,%X\n" $p - end of tool.sh - | # bash ./tool.sh 00C91D7EAC3C | ATEN 1,10FDFF5 Copy and paste the result into the shell to unlock zloader. | NBG6616> ATEN 1,10FDFF5 If the entered code was correct the shell will change to use the ATGU command to enter the real u-boot shell. | NBG6616> ATGU | NBG6616# Signed-off-by: Christoph Krapp <achterin@googlemail.com> [move keys to DTSI, adjust usb_power DT label, remove kernel config change, extend commit message] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-08-09 13:00:05 +02:00
zyxel,nbg6616)
label_mac=$(mtd_get_mac_ascii u-boot-env ethaddr)
;;
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