aboutsummaryrefslogtreecommitdiffstats
path: root/package/boot/uboot-envtools
Commit message (Collapse)AuthorAgeFilesLines
...
* ipq40xx: add support for Plasma Cloud PA2200Marek Lindner2020-12-221-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Device specifications: * QCA IPQ4019 * 256 MB of RAM * 32 MB of SPI NOR flash (w25q256) - 2x 15 MB available; but one of the 15 MB regions is the recovery image * 2T2R 2.4 GHz - QCA4019 hw1.0 (SoC) - requires special BDF in QCA4019/hw1.0/board-2.bin with bus=ahb,bmi-chip-id=0,bmi-board-id=20,variant=PlasmaCloud-PA2200 * 2T2R 5 GHz (channel 36-64) - QCA9888 hw2.0 (PCI) - requires special BDF in QCA9888/hw2.0/board-2.bin bus=pci,bmi-chip-id=0,bmi-board-id=16,variant=PlasmaCloud-PA2200 * 2T2R 5 GHz (channel 100-165) - QCA4019 hw1.0 (SoC) - requires special BDF in QCA4019/hw1.0/board-2.bin with bus=ahb,bmi-chip-id=0,bmi-board-id=21,variant=PlasmaCloud-PA2200 * GPIO-LEDs for 2.4GHz, 5GHz-SoC and 5GHz-PCIE * GPIO-LEDs for power (orange) and status (blue) * 1x GPIO-button (reset) * TTL pins are on board (arrow points to VCC, then follows: GND, TX, RX) * 2x gigabit ethernet - phy@mdio3: + Label: Ethernet 1 + gmac0 (ethaddr) in original firmware + used as LAN interface - phy@mdio4: + Label: Ethernet 2 + gmac1 (eth1addr) in original firmware + 802.3at POE+ + used as WAN interface * 12V 2A DC Flashing instructions: The tool ap51-flash (https://github.com/ap51-flash/ap51-flash) should be used to transfer the factory image to the u-boot when the device boots up. Signed-off-by: Marek Lindner <marek.lindner@kaiwoo.ai> [sven@narfation.org: prepare commit message, rebase, use all LEDs, switch to dualboot_datachk upgrade script, use eth1 as designated WAN interface] Signed-off-by: Sven Eckelmann <sven@narfation.org>
* ipq40xx: add support for Plasma Cloud PA1200Marek Lindner2020-12-221-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Device specifications: * QCA IPQ4018 * 256 MB of RAM * 32 MB of SPI NOR flash (w25q256) - 2x 15 MB available; but one of the 15 MB regions is the recovery image * 2T2R 2.4 GHz - QCA4019 hw1.0 (SoC) - requires special BDF in QCA4019/hw1.0/board-2.bin with bus=ahb,bmi-chip-id=0,bmi-board-id=16,variant=PlasmaCloud-PA1200 * 2T2R 5 GHz - QCA4019 hw1.0 (SoC) - requires special BDF in QCA4019/hw1.0/board-2.bin with bus=ahb,bmi-chip-id=0,bmi-board-id=17,variant=PlasmaCloud-PA1200 * 3x GPIO-LEDs for status (cyan, purple, yellow) * 1x GPIO-button (reset) * 1x USB (xHCI) * TTL pins are on board (arrow points to VCC, then follows: GND, TX, RX) * 2x gigabit ethernet - phy@mdio4: + Label: Ethernet 1 + gmac0 (ethaddr) in original firmware + used as LAN interface - phy@mdio3: + Label: Ethernet 2 + gmac1 (eth1addr) in original firmware + 802.3af/at POE(+) + used as WAN interface * 12V/24V 1A DC Flashing instructions: The tool ap51-flash (https://github.com/ap51-flash/ap51-flash) should be used to transfer the factory image to the u-boot when the device boots up. Signed-off-by: Marek Lindner <marek.lindner@kaiwoo.ai> [sven@narfation.org: prepare commit message, rebase, use all LEDs, switch to dualboot_datachk upgrade script, use eth1 as designated WAN interface] Signed-off-by: Sven Eckelmann <sven@narfation.org>
* ath79: Add support for Plasma Cloud PA300ESven Eckelmann2020-12-221-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Device specifications: * Qualcomm/Atheros QCA9533 v2 * 650/600/217 MHz (CPU/DDR/AHB) * 64 MB of RAM * 16 MB of SPI NOR flash (mx25l12805d) - 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 * 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 fast ethernet - eth0 + Label: Ethernet 1 + 24V passive POE (mode B) + used as WAN interface - eth1 + Label: Ethernet 2 + 802.3af POE + builtin switch port 2 + used as LAN interface * 12-24V 1A DC * external antennas Flashing instructions: The tool ap51-flash (https://github.com/ap51-flash/ap51-flash) should be used to transfer the factory image to the u-boot when the device boots up. Signed-off-by: Sven Eckelmann <sven@narfation.org>
* ath79: Add support for Plasma Cloud PA300Sven Eckelmann2020-12-221-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Device specifications: * Qualcomm/Atheros QCA9533 v2 * 650/600/217 MHz (CPU/DDR/AHB) * 64 MB of RAM * 16 MB of SPI NOR flash (mx25l12805d) - 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 * 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 fast ethernet - eth0 + Label: Ethernet 1 + 24V passive POE (mode B) + used as WAN interface - eth1 + Label: Ethernet 2 + 802.3af POE + builtin switch port 2 + used as LAN interface * 12-24V 1A DC * internal antennas Flashing instructions: The tool ap51-flash (https://github.com/ap51-flash/ap51-flash) should be used to transfer the factory image to the u-boot when the device boots up. Signed-off-by: Sven Eckelmann <sven@narfation.org>
* ath79: add support for Senao Engenius ECB350 v1Michael Pratt2020-12-221-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | FCC ID: A8J-ECB350 Engenius ECB350 v1 is an indoor wireless access point with a gigabit ethernet port, 2.4 GHz wireless, external antennas, and PoE. **Specification:** - AR7242 SOC - AR9283 WLAN 2.4 GHz (2x2), PCIe on-board - AR8035-A switch RGMII, GbE with 802.3af PoE - 40 MHz reference clock - 8 MB FLASH 25L6406EM2I-12G - 32 MB RAM - UART at J2 (populated) - 2 external antennas - 3 LEDs, 1 button (power, lan, wlan) (reset) **MAC addresses:** MACs are labeled as WLAN and WAN vendor MAC addresses in flash are duplicate phy0 WLAN *:b8 --- eth0 WAN *:b9 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 0x9f670000` 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 **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 ECB350 v1 is a heavily modified version of Openwrt Kamikaze. One of the many modifications is to the sysupgrade program. Image verification is performed 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. The factory upgrade script follows the original mtd partitions. **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 AR724x series, the PLL register for GMAC0 can be seen in the DTSI as 0x2c. Therefore the PLL register can be read from u-boot for each link speed after attempting tftpboot or another network action using that link speed with `md 0x1805002c 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 no extra adjustements are needed on the MAC side all link speeds functional Signed-off-by: Michael Pratt <mcpratt@pm.me>
* ath79: add support for Senao Engenius ECB1200Michael Pratt2020-12-221-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* ramips: add support for Senao Engenius ESR600HMichael Pratt2020-12-221-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | FCC ID: A8J-ESR750H Engenius ESR600H is an indoor wireless router with a gigabit switch, 2.4 GHz and 5 GHz wireless, internal and external antennas, and a USB port. **Specification:** - RT3662F MIPS SOC, 5 GHz WMAC (2x2) - RT5392L PCI on-board, 2.4 GHz (2x2) - AR8327 RGMII, 7-port GbE, 25 MHz clock - 40 MHz reference clock - 8 MB FLASH 25L6406EM2I-12G - 64 MB RAM - UART at J12 (unpopulated) - 2 internal antennas (5 GHz) - 2 external antennas (2.4 GHz) - 9 LEDs, 1 button (power, wps, wifi2g, wifi5g, 5 LAN/WAN) - USB 2 port (GPIO controlled power) **MAC addresses:** MAC Addresses are labeled as WAN and WLAN U-boot environment has the the vendor MAC address for ethernet MAC addresses in "factory" are part of wifi calibration data eth0.2 WAN *:13:e7 u-boot-env wanaddr eth0.1 ---- *:13:e8 u-boot-env wanaddr + 1 phy0 WLAN *:14:b8 factory 0x8004 phy1 ---- *:14:bc factory 0x4 **Installation:** Method 1: Firmware upgrade page OEM webpage at 192.168.0.1 username and password "admin" Navigate to Network Setting --> Tools --> Firmware Click Browse and select the factory.dlf image Click Continue to confirm and wait 6 minutes or more... Method 2: Serial console to load TFTP image: (see TFTP recovery) **Return to OEM:** Unlike most Engenius boards, this does not have a 'failsafe' image the only way to return to OEM is serial access to uboot Unlike most Engenius boards, public images are not available... so the only way to return to OEM is to have a copy of the MTD partition "firmware" BEFORE flashing openwrt. **TFTP recovery:** Unlike most Engenius boards, TFTP is reliable here however it requires serial console access (soldering pins to the UART pinouts) build your own image... with 'ramdisk' selected under 'Target Images' rename initramfs-kernel.bin to 'uImageESR-600H' make the file available on a TFTP server at 192.168.99.8 interrupt boot by holding or pressing '4' in serial console as soon as board is powered on `tftpboot 0x81000000` `bootm 0x81000000` perform a sysupgrade **Format of OEM firmware image:** This Engenius board uses the Senao proprietary header with a unique Product ID. The header for factory.bin is generated by the mksenaofw program included in openwrt. .dlf file extension is also required for OEM software to accept it **Note on using OKLI:** the kernel is now too large for the bootloader to handle so OKLI is used via the `kernel-loader` image command recently in master several other ramips boards have the same problem 'Kernel panic - not syncing: Failed to find ralink,rt3883-sysc node' see commit ad19751edc21ae713bd95df6b93be64bd1e0c612 Signed-off-by: Michael Pratt <mcpratt@pm.me>
* uboot-envtools: ramips: use full names for Xiaomi Mi RoutersAdrian Schmutzler2020-12-082-4/+4
| | | | | | | | | This updates uboot-envtools with the updated names from ramips target. Fixes: 6d4382711a65 ("ramips: use full names for Xiaomi Mi Router devices") Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* uboot-envtools: add support for the realtek targetJohn Crispin2020-12-021-0/+29
| | | | | | On most boards the MAC is located inside the u-boot-env. Signed-off-by: John Crispin <john@phrozen.org>
* ramips: add support for Xiaomi Mi Router 4CAtaberk Özen2020-11-252-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit adds support for Xiaomi's Mi Router 4C device. Specifications: - CPU: MediaTek MT7628AN (580MHz) - Flash: 16MB - RAM: 64MB DDR2 - 2.4 GHz: IEEE 802.11b/g/n with Integrated LNA and PA - Antennas: 4x external single band antennas - WAN: 1x 10/100M - LAN: 2x 10/100M - LEDs: 2x yellow/blue. Programmable (labelled as power on case) - Non-programmable (shows WAN activity) - Button: Reset How to install: 1- Use OpenWRTInvasion to gain telnet and ftp access. 2- Push openwrt firmware to /tmp/ using ftp. 3- Connect to router using telnet. (IP: 192.168.31.1 - Username: root - No password) 4- Use command "mtd -r write /tmp/firmware.bin OS1" to flash into the router.. 5- It takes around 2 minutes. After that router will restart itself to OpenWrt. Signed-off-by: Ataberk Özen <ataberkozen123@gmail.com> [wrap commit message, bump PKG_RELEASE for uboot-envtools, remove dts-v1 from DTS, fix LED labels] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ath79: add support for Senao Engenius EAP300 v2Michael Pratt2020-11-252-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* mvebu: add initial support for Globalscale ESPRESSObin-UltraVladimir Vid2020-11-232-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds support for Globalscale ESPRESSObin-Ultra. Device uses the same Armada-3720 SoC with extended hardware support. - SoC: Armada-3720 - RAM: 1 GB DDR4 - Flash: 4MB SPI NOR (mx25u3235f) + 8 GB eMMC - Ethernet: Topaz 6341 88e6341 (4x GB LAN + 1x WAN with 30W PoE) - WiFI: 2x2 802.11ac Wi-Fi marvell (88w8997 PCIe+USB) - 1x USB 2.0 port - 1x USB 3.0 port - 1x microSD slot - 1x mini-PCIe slot (USB [with nano-sim slot]) - 1x mini-USB debug UART - 1x RTC Clock and battery - 1x reset button - 1x power button - 4x LED (RGBY) - Optional 1x M.2 2280 slot ** Installation ** Copy dtb from build_dir to bin/ and run tftpserver there: $ cp ./build_dir/target-aarch64_cortex-a53_musl/linux-mvebu_cortexa53/ linux-5.4.65/arch/arm64/boot/dts/marvell/armada-3720-espressobin-ultra.dtb bin/targets/mvebu/cortexa53/ $ in.tftpd -L -s bin/targets/mvebu/cortexa53/ Connect to the device UART via microUSB port on the back side and power on the device. Power on the device and hit any key to stop the autoboot. Set serverip (host IP) and ipaddr (any free IP address on the same subnet), e.g: $ setenv serverip 192.168.1.10 # Host $ setenv ipaddr 192.168.1.15 # Device Ping server to confirm network is working: $ ping $serverip Using neta@30000 device host 192.168.1.15 is alive Tftpboot the firmware: $ tftpboot $kernel_addr_r openwrt-mvebu-cortexa53-globalscale_espressobin-ultra-initramfs-kernel.bin $ tftpboot $fdt_addr_r armada-3720-espressobin-ultra.dtb Set the console and boot the image: $ setenv bootargs $console $ booti $kernel_addr_r - $fdt_addr_r Once the initramfs is booted, transfer openwrt-mvebu-cortexa53-globalscale_espressobin-ultra-squashfs-sdcard.img.gz to /tmp dir on the device. Gunzip and dd the image: $ gunzip /tmp/openwrt-mvebu-cortexa53-globalscale_espressobin-ultra-squashfs-sdcard.img.gz $ dd if=/tmp/openwrt-mvebu-cortexa53-globalscale_espressobin-ultra-squashfs-sdcard.img of=/dev/mmcblk0 && sync Reboot the device. Signed-off-by: Vladimir Vid <vladimir.vid@sartura.hr>
* uboot-envtools: ath79: add support for ALFA Network Pi-WiFi4Piotr Dymacz2020-11-181-0/+1
| | | | Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
* uboot-envtools: support Xiaomi Mi Router 3G v2/4A GigabitAntonis Kanouras2020-11-122-1/+3
| | | | | | | | | | | | Add support for the following devices: - Xiaomi Mi Wi-Fi Router 3G v2 - Xiaomi Mi Router 4A Gigabit Edition Signed-off-by: Antonis Kanouras <antonis@metadosis.eu> [add explicit case for 4A, bump PKG_RELEASE, improve commit title/message] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* uboot-envtools: mvebu: fix config for mainline u-bootAndre Heider2020-10-111-1/+8
| | | | | | | | | | | | Mainline u-boot dynamically passes the mtd partitions via devicetree: $ cat /proc/mtd dev: size erasesize name mtd0: 003f0000 00001000 "firmware" mtd1: 00010000 00001000 "u-boot-env" Add support for this setup. Signed-off-by: Andre Heider <a.heider@gmail.com>
* uboot-envtools: ath79: add support for ALFA Network N5QPiotr Dymacz2020-09-281-0/+1
| | | | Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
* uboot-envtools: ath79: add support for ALFA Network N2QPiotr Dymacz2020-09-281-0/+1
| | | | Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
* uboot-envtools: ath79: add support for ALFA Network R36APiotr Dymacz2020-09-281-0/+1
| | | | Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
* uboot-envtools: ath79: add support for Samsung WAM250Piotr Dymacz2020-09-281-0/+1
| | | | Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
* uboot-envtools: ath79: add support for Wallys DR531Piotr Dymacz2020-09-281-0/+3
| | | | Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
* uboot-envtools: ath79: add support for ALFA Network AP121FEPiotr Dymacz2020-09-281-0/+1
| | | | Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
* ipq40xx: Add support for Linksys MR8300 (Dallas)Hans Geiblinger2020-09-251-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Linksys MR8300 is based on QCA4019 and QCA9888 and provides three, independent radios. NAND provides two, alternate kernel/firmware images with fail-over provided by the OEM U-Boot. Hardware Highlights: SoC: IPQ4019 at 717 MHz (4 CPUs) RAM: 512MB RAM SoC: Qualcomm IPQ4019 at 717 MHz (4 CPUs) RAM: 512M DDR3 FLASH: 256 MB NAND (Winbond W29N02GV, 8-bit parallel) ETH: Qualcomm QCA8075 (4x GigE LAN, 1x GigE Internet Ethernet Jacks) BTN: Reset and WPS USB: USB3.0, single port on rear with LED SERIAL: Serial pads internal (unpopulated) LED: Four status lights on top + USB LED WIFI1: 2x2:2 QCA4019 2.4 GHz radio on ch. 1-14 WIFI2: 2x2:2 QCA4019 5 GHz radio on ch. 36-64 WIFI3: 2x2:2 QCA9888 5 GHz radio on ch. 100-165 Support is based on the already supported EA8300. Key differences: EA8300 has 256MB RAM where MR8300 has 512MB RAM. MR8300 has a revised top panel LED setup. Installation: "Factory" images may be installed directly through the OEM GUI using URL: https://ip-of-router/fwupdate.html (Typically 192.168.1.1) Signed-off-by: Hans Geiblinger <cybrnook2002@yahoo.com> [copied Hardware-highlights from EA8300. Fixed alphabetical order. fixed commit subject, removed bogus unit-address of keys, fixed author (used Signed-off-By to From:) ] Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
* ipq40xx: add support for Luma Home WRTQ-329ACNTomasz Maciej Nowak2020-09-251-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Luma Home WRTQ-329ACN, also known as Luma WiFi System, is a dual-band wireless access point. Specification SoC: Qualcomm Atheros IPQ4018 RAM: 256 MB DDR3 Flash: 2 MB SPI NOR 128 MB SPI NAND WIFI: 2.4 GHz 2T2R integrated 5 GHz 2T2R integrated Ethernet: 2x 10/100/1000 Mbps QCA8075 USB: 1x 2.0 Bluetooth: 1x 4.0 CSR8510 A10, connected to USB bus LEDS: 16x multicolor LEDs ring, controlled by MSP430G2403 MCU Buttons: 1x GPIO controlled EEPROM: 16 Kbit, compatible with AT24C16 UART: row of 4 holes marked on PCB as J19, starting count from the side of J19 marking on PCB 1. GND, 2. RX, 3. TX, 4. 3.3V baud: 115200, parity: none, flow control: none The device supports OTA or USB flash drive updates, unfotunately they are signed. Until the signing key is known, the UART access is mandatory for installation. The difficult part is disassembling the casing, there are a lot of latches holding it together. Teardown Prepare three thin, but sturdy, prying tools. Place the device with back of it facing upwards. Start with the wall having a small notch. Insert first tool, until You'll feel resistance and keep it there. Repeat the procedure for neighbouring walls. With applying a pressure, one edge of the back cover should pop up. Now carefully slide one of the tools to free the rest of the latches. There's no need to solder pins to the UART holes, You can use hook clips, but wiring them outside the casing, will ease debuging and recovery if problems occur. Installation 1. Prepare TFTP server with OpenWrt initramfs image. 2. Connect to UART port (don't connect the voltage pin). 3. Connect to LAN port. 4. Power on the device, carefully observe the console output and when asked quickly enter the failsafe mode. 5. Invoke 'mount_root'. 6. After the overlayfs is mounted run: fw_setenv bootdelay 3 This will allow to access U-Boot shell. 7. Reboot the device and when prompted to stop autoboot, hit any key. 8. Adjust "ipaddr" and "serverip" addresses in U-Boot environment, use 'setenv' to do that, then run following commands: tftpboot 0x84000000 <openwrt_initramfs_image_name> bootm 0x84000000 and wait till OpenWrt boots. 9. In OpenWrt command line run following commands: fw_setenv openwrt "setenv mtdids nand1=spi_nand; setenv mtdparts mtdparts=spi_nand:-(ubi); ubi part ubi; ubi read 0x84000000 kernel; bootm 0x84000000" fw_setenv bootcmd "run openwrt" 10. Transfer OpenWrt sysupgrade image to /tmp directory and flash it with: ubirmvol /dev/ubi0 -N ubi_rootfs sysupgrade -v -n /tmp/<openwrt_sysupgrade_image_name> 11. After flashing, the access point will reboot to OpenWrt, then it's ready for configuration. Reverting to OEM firmware 1. Execute installation guide steps: 1, 2, 3, 7, 8. 2. In OpenWrt command line run following commands: ubirmvol /dev/ubi0 -N rootfs_data ubirmvol /dev/ubi0 -N rootfs ubirmvol /dev/ubi0 -N kernel ubirename /dev/ubi0 kernel1 kernel ubi_rootfs1 ubi_rootfs ubimkvol /dev/ubi0 -S 34 -N kernel1 ubimkvol /dev/ubi0 -S 320 -N ubi_rootfs1 ubimkvol /dev/ubi0 -S 264 -N rootfs_data fw_setenv bootcmd bootipq 3. Reboot. Known issues The LEDs ring doesn't have any dedicated driver or application to control it, the only available option atm is to manipulate it with 'i2cset' command. The default action after applying power to device is spinning blue light. This light will stay active at all time. To disable it install 'i2c-tools' with opkg and run: i2cset -y 2 0x48 3 1 0 0 i The light will stay off until next cold boot. Additional information After completing 5. step from installation guide, one can disable asking for root password on OEM firmware by running: sed -e 's/root:x:/root::/' -i /etc/passwd This is useful for investigating the OEM firmware. One can look at the communication between the stock firmware and the vendor's cloud servers or as a way of making a backup of both flash chips. The root password seems to be constant across all sold devices. This is output of 'led_ctl' from OEM firmware to illustrate possibilities of LEDs ring: Usage: led_ctl [status | upgrade | force_upgrade | version] led_ctl solid COLOR <brightness> led_ctl single COLOR INDEX <brightness 0 - 15> led_ctl spinning COLOR <period 1 - 16 (lower = faster)> led_ctl fill COLOR <period 1 - 16 (lower = faster)> ( default is 5 ) led_ctl flashing COLOR <on dur 1 - 128> <off dur 1 - 128> (default is 34) ( default is 34 ) led_ctl pulsing COLOR COLOR: red, green, blue, yellow, purple, cyan, white Signed-off-by: Tomasz Maciej Nowak <tomek_n@o2.pl> [squash "ipq-wifi: add BDFs for Luma Home WRTQ-329ACN" into commit, changed ubi volumes for easier integration, slightly reworded commit message, changed ubi volume layout to use standard names all around] Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
* ramips: add support for Linksys EA7300 v2J. Scott Heppler2020-09-231-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This submission relied heavily on the work of Santiago Rodriguez-Papa <contact at rodsan.dev> Specifications: * SoC: MediaTek MT7621A (880 MHz 2c/4t) * RAM: Winbond W632GG6MB-12 (256M DDR3-1600) * Flash: Winbond W29N01HVSINA (128M NAND) * Eth: MediaTek MT7621A (10/100/1000 Mbps x5) * Radio: MT7603E/MT7615N (2.4 GHz & 5 GHz) 4 antennae: 1 internal and 3 non-deatachable * USB: 3.0 (x1) * LEDs: White (x1 logo) Green (x6 eth + wps) Orange (x5, hardware-bound) * Buttons: Reset (x1) WPS (x1) Installation: Flash factory image through GUI. This might fail due to the A/B nature of this device. When flashing, OEM firmware writes over the non-booted partition. If booted from 'A', flashing over 'B' won't work. To get around this, you should flash the OEM image over itself. This will then boot the router from 'B' and allow you to flash OpenWRT without problems. Reverting to factory firmware: Hard-reset the router three times to force it to boot from 'B.' This is where the stock firmware resides. To remove any traces of OpenWRT from your router simply flash the OEM image at this point. Signed-off-by: J. Scott Heppler <shep971@centurylink.net>
* lantiq: use uniform "u-boot-env" mtd labelMartin Schiller2020-09-171-1/+1
| | | | | | | | | | | This is the most popular choice in the linux kernel tree. Within OpenWrt, this change will establish consistency with ath79 and ramips targets. Signed-off-by: Martin Schiller <ms@dev.tdt.de> [extend commit message, include netgear_dm200, update base-files] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ipq40xx: add Edgecore ECW5211 supportRobert Marko2020-09-171-0/+1
| | | | | | | | | | | | | | | | | This patch adds support for the Edgecore ECW5211 indoor AP. Specification: - SoC: Qualcomm Atheros IPQ4018 ARMv7-A 4x Cortex A-7 - RAM: 256MB DDR3 - NOR Flash: 16MB SPI NOR - NAND Flash: 128MB MX35LFxGE4AB SPI-NAND - Ethernet: 2 x 1G via Q8075 PHY connected to ethernet adapter via PSGMII (802.3af POE IN on eth0) - USB: 1 x USB 3.0 SuperSpeed - WLAN: Built-in IPQ4018 (2x2 802.11bng, 2x2 802.11 acn) - CC2540 BLE connected to USB 2.0 port - Atmel AT97SC3205T I2C TPM Signed-off-by: Robert Marko <robert.marko@sartura.hr>
* ipq806x: add Edgecore ECW5410 supportRobert Marko2020-09-171-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds support for the Edgecore ECW5410 indoor AP. Specification: - SoC: Qualcomm Atheros IPQ8068 ARMv7 2x Cortex A-15 - RAM: 256MB(225 usable) DDR3 - NOR Flash: 16MB SPI NOR - NAND Flash: 128MB S34MS01G2 Parallel NAND - Ethernet: 2 x 1G via 2x AR8033 PHY-s connected directly to GMAC2 and GMAC3 via SGMII (802.3af POE IN on eth0) - USB: 1 x USB 3.0 SuperSpeed - WLAN: 2x QCA9994 AC Wawe 2 (1x 2GHz bgn, 1x 5GHz acn) - CC2540 BLE - UART console on RJ45 next to ethernet ports exposed. Its Cisco pin compatible, 115200 8n1 baud. Installation instructions: Through stock firmware or initramfs. 1.Connect to console 2. Login with root account, if password is unknown then interrupt the boot with f and reset it in failsafe. 3. Transfer factory image 4. Flash the image with ubiformat /dev/mtd1 -y -f <your factory image path> This will replace the rootfs2 with OpenWrt, if you are currently running from rootfs2 then simply change /dev/mtd1 to /dev/mtd0 Note Initramfs: 1. Connect to console 2. Transfer the image from TFTP server with tftpboot, or by using DHCP advertised image with dhcp command. 3. bootm 4. Run ubiformat /dev/mtd1 You need to interrupt the bootloader after rebooting and run: run altbootcmd This will switch your active rootfs partition to one you wrote to and boot from it. So if rootfs1 is active, then it will change it to rootfs2. This will format the rootfs2 partition, if your active partition is 2 then simply change /dev/mtd1 with /dev/mtd0 If you dont format the partition you will be writing too, then sysupgrade will find existing UBI rootfs and kernel volumes and update those. This will result in wrong ordering and OpenWrt will panic on boot. 5. Transfer sysupgrade image 6. Flash with sysupgrade -n. Note that sysupgrade will write the image to rootfs partition that is not currently in use. Signed-off-by: Robert Marko <robert.marko@sartura.hr>
* uboot-envtools: mvebu: update uci defaults for Turris OmniaKlaus Kudielka2020-09-132-2/+6
| | | | | | | | | | | | On the Turris Omnia 2019, u-boot environment is located at 0xF0000, instead of 0xC0000. The switch happened with u-boot-omnia package version 2019-04-2 (May 10, 2019). Check the installed u-boot release, and set the default accordingly. Signed-off-by: Klaus Kudielka <klaus.kudielka@gmail.com> [bump PKG_RELEASE, use lower case for hex offset] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ramips: fix partitions and boot for RAVPower RP-WD03Adrian Schmutzler2020-09-112-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The RAVPower RP-WD03 is a battery powered router, with an Ethernet and USB port. Due due a limitation in the vendor supplied U-Boot bootloader, we cannot exceed a 1.5 MB kernel size, as is the case with recent builds (i.e. post v19.07). This breaks both factory and sysupgrade images. To address this, use the lzma loader (loader-okli) to work around this limitation. The improvements here also address the "misplaced" U-Boot environment partition, which is located between the kernel and rootfs in the stock image / implementation. This is addressed by making use of mtd-concat, maximizing space available in the booted image. This will make sysupgrade from earlier versions impossible. Changes are based on the recently supported HooToo HT-TM05, as the hardware is almost identical (except for RAM size) and is from the same vendor (SunValley). While at it, also change the SPI frequency accordingly. Installation: - Download the needed OpenWrt install files, place them in the root of a clean TFTP server running on your computer. Rename the files as, - openwrt-ramips-mt7620-ravpower_rp-wd03-squashfs-kernel.bin => kernel - openwrt-ramips-mt7620-ravpower_rp-wd03-squashfs-rootfs.bin => rootfs - Plug the router into your computer via Ethernet - Set your computer to use 10.10.10.254 as its IP address - With your router shut down, hold down the power button until the first white LED lights up. - Push and hold the reset button and release the power button. Continue holding the reset button for 30 seconds or until it begins searching for files on your TFTP server, whichever comes first. - The router (10.10.10.128) will look for your computer at 10.10.10.254 and install the two files. Once it has finished installation, it will automatically reboot and start up OpenWrt. - Set your computer to use DHCP for its IP address Notes: - U-Boot environment can be modified, u-boot-env is preserved on initial install or sysupgrade - mtd-concat functionality is included, to leave a "hole" for u-boot-env, combining the OEM kernel and rootfs partitions Most of the changes in this commit are the work of Russell Morris (as credited below), I only wrapped them up and added compat-version. Thanks to @mpratt14 and @xabolcs for their help getting the lzma loader to work! Fixes: 5ef79af4f80f ("ramips: add support for Ravpower WD03") Suggested-by: Russell Morris <rmorris@rkmorris.us> Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ramips: add support for HooToo HT-TM05Russell Morris2020-09-032-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The HooToo HT-TM05 is a battery powered router, with an Ethernet and USB port. Vendor U-Boot limited to 1.5 MB kernel size, so use lzma loader (loader-okli). Specifications: SOC: MediaTek MT7620N BATTERY: 10400mAh WLAN: 802.11bgn LAN: 1x 10/100 Mbps Ethernet USB: 1x USB 2.0 (Type-A) RAM: 64 MB FLASH: GigaDevice GD25Q64, Serial 8 MB Flash, clocked at 50 MHz Flash itself specified to 80 MHz, but speed limited by mt7620 SPI fast-read enabled (m25p) LED: Status LED (blue after boot, green with WiFi traffic 4 leds to indicate power level of the battery (unable to control) INPUT: Power, reset button MAC assignment based on vendor firmware: 2.4 GHz *:b4 (factory 0x04) LAN/label *:b4 (factory 0x28) WAN *:b5 (factory 0x2e) Tested and working: - Ethernet - 2.4 GHz WiFi (Correct MAC-address) - Installation from TFTP (recovery) - OpenWRT sysupgrade (Preserving and non-preserving), through the usual ways: command line and LuCI - LEDs (except as noted above) - Button (reset) - I2C, which is needed for reading battery charge status and level - U-Boot environment / variables (from U-Boot, and OpenWrt) Installation: - Download the needed OpenWrt install files, place them in the root of a clean TFTP server running on your computer. Rename the files as, - ramips-mt7620-hootoo_tm05-squashfs-kernel.bin => kernel - ramips-mt7620-hootoo_tm05-squashfs-rootfs.bin => rootfs - Plug the router into your computer via Ethernet - Set your computer to use 10.10.10.254 as its IP address - With your router shut down, hold down the power button until the first white LED lights up. - Push and hold the reset button and release the power button. Continue holding the reset button for 30 seconds or until it begins searching for files on your TFTP server, whichever comes first. - The router (10.10.10.128) will look for your computer at 10.10.10.254 and install the two files. Once it has finished installation, it will automatically reboot and start up OpenWrt. - Set your computer to use DHCP for its IP address Notes: - U-Boot environment can be modified, u-boot-env is preserved on initial install or sysupgrade - mtd-concat functionality is included, to leave a "hole" for u-boot-env, combining the OEM kernel and rootfs partitions I would like to thank @mpratt14 and @xabolcs for their help getting the lzma loader to work! Signed-off-by: Russell Morris <rmorris@rkmorris.us> [drop changes in image/Makefile, fix indent and PKG_RELEASE in uboot-envtools, fix LOADER_FLASH_OFFS, minor commit message facelift, add COMPILE to Device/Default] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ath79: add support for Senao Engenius ENH202 v1Michael Pratt2020-08-311-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | FCC ID: U2M-ENH200 Engenius ENH202 is an outdoor wireless access point with 2 10/100 ports, built-in ethernet switch, internal antenna plates and proprietery PoE. Specification: - Qualcomm/Atheros AR7240 rev 2 - 40 MHz reference clock - 8 MB FLASH ST25P64V6P (aka ST M25P64) - 32 MB RAM - UART at J3 (populated) - 2x 10/100 Mbps Ethernet (built-in switch at gmac1) - 2.4 GHz, 2x2, 29dBm (Atheros AR9280 rev 2) - internal antenna plates (10 dbi, semi-directional) - 5 LEDs, 1 button (LAN, WAN, RSSI) (Reset) Known Issues: - Sysupgrade from ar71xx no longer possible - Power LED not controllable, or unknown gpio MAC addresses: eth0/eth1 *:11 art 0x0/0x6 wlan *:10 art 0x120c 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 or halt 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 0x9f670000` 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 Format of OEM firmware image: The OEM software of ENH202 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-enh202-uImage-lzma.bin openwrt-senao-enh202-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. OKLI kernel loader is required because the OEM firmware expects the kernel to be no greater than 1024k and the factory.bin upgrade procedure would otherwise overwrite part of the kernel when writing rootfs. Note on built-in switch: ENH202 is originally configured to be an access point, but with two ethernet ports, both WAN and LAN is possible. the POE port is gmac0 which is preferred to be the port for WAN because it gives link status where swconfig does not. Signed-off-by: Michael Pratt <mpratt51@gmail.com> [assign label_mac in 02_network, use ucidef_set_interface_wan, use common device definition, some reordering] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ath79: add support for Senao Engenius ENS202EXT v1Michael Pratt2020-08-311-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* ar71xx: drop targetAdrian Schmutzler2020-08-301-115/+0
| | | | | | | | | | This target has been mostly replaced by ath79 and won't be included in the upcoming release anymore. Finally put it to rest. This also removes all references in packages, tools, etc. as well as the uboot-ar71xx and vsc73x5-ucode packages. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ath79: add support for ALLNET ALL-WAP02860ACTomasz Maciej Nowak2020-08-151-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* uboot-envtools: ath79: add ZyXEL NBG6616 uboot env supportChristoph Krapp2020-08-101-1/+2
| | | | | | This adds support for ZyXEL NBG6616 uboot-env access Signed-off-by: Christoph Krapp <achterin@googlemail.com>
* uboot-envtools: ar71xx: add ZyXEL NBG6616 uboot env supportChristoph Krapp2020-08-091-0/+1
| | | | | | | | This adds support for ZyXEL NBG6616 uboot-env access Signed-off-by: Christoph Krapp <achterin@googlemail.com> [add "ar71xx" to commit title] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ath79/nand: add support for Netgear WNDR4300TNDavy Hollevoet2020-08-061-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds support for the WNDR4300TN, marketed by Belgian ISP Telenet. The hardware is the same as the WNDR4300 v1, without the fifth ethernet port (WAN) and the USB port. The circuit board has the traces, but the components are missing. Specifications: * SoC: Atheros AR9344 * RAM: 128 MB * Flash: 128 MB NAND flash * WiFi: Atheros AR9580 (5 GHz) and AR9344 (2.4 GHz) * Ethernet: 4x 1000Base-T * LED: Power, LAN, WiFi 2.4GHz, WiFi 5GHz, WPS * UART: on board, to the right of the RF shield at the top of the board Installation: * Flashing through the OEM web interface: + Connect your computer to the router with an ethernet cable and browse to http://192.168.0.51/ + Log in with the default credentials are admin:password + Browse to Advanced > Administration > Firmware Upgrade in the Telenet interface + Upload the Openwrt firmware: openwrt-ath79-nand-netgear_wndr4300tn-squashfs-factory.img + Proceed with the firmware installation and give the device a few minutes to finish and reboot. * Flashing through TFTP: + Configure your wired client with a static IP in the 192.168.1.x range, e.g. 192.168.1.10 and netmask 255.255.255.0. + Power off the router. + Press and hold the RESET button (the factory reset button on the bottom of the device, with the gray circle around it, next to the Telenet logo) and turn the router on while keeping the button pressed. + The power LED will start flashing orange. You can release the button once it switches to flashing green. + Transfer the image over TFTP: $ tftp 192.168.1.1 -m binary -c put openwrt-ath79-nand-netgear_wndr4300tn-squashfs-factory.img Signed-off-by: Davy Hollevoet <github@natox.be> [use DT label reference for adding LEDs in DTSI files] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* uboot-envtools: ath79: add support for the Nanostation M (XM)Rui Salvaterra2020-08-011-0/+1
| | | | | | Tested on an AirGrid M2 (AG‑HP‑2G16). Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
* kirkwood: use real model names for Linksys devicesAdrian Schmutzler2020-07-311-2/+3
| | | | | | | | | | | | This replaces the internal device names "Audi" and "Viper" with the real model names, which a user would look for. This makes the Linksys devices on this target consistent with the names recently changed for mvebu based on the same idea. As a consequence, the "viper" device definition is split into two separate definitions with the correct names for both real models. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* imx6: use device-tree compatible for board nameAdrian Schmutzler2020-07-271-5/+31
| | | | | | | | | | | | | | In imx6, we currently use the model from DTS to derive a board name manually in /lib/imx6.sh. However, if we have individual DTS files anyway, we can exploit generic 02_sysinfo and use the compatible as board name directly. While at it, remove the wildcards from /lib/upgrade/platform.sh as these might make code shorter, but are quite unpleasant when grepping for a specific device. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ramips: add support for Linksys EA7300 v1Santiago Rodriguez-Papa2020-07-161-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Specifications: * SoC: MediaTek MT7621A (880 MHz 2c/4t) * RAM: Nanya NT5CC128M16IP-DIT (256M DDR3-1600) * Flash: Macronix MX30LF1G18AC-TI (128M NAND) * Eth: MediaTek MT7621A (10/100/1000 Mbps x5) * Radio: MT7615N (2.4 GHz & 5 GHz) 4 antennae: 1 internal and 3 non-deatachable * USB: 3.0 (x1) * LEDs: White (x1 logo) Green (x6 eth + wps) Orange (x5, hardware-bound) * Buttons: Reset (x1) WPS (x1) Everything works! Been running it for a couple weeks now and haven't had any problems. Please let me know if you run into any. Installation: Flash factory image through GUI. This might fail due to the A/B nature of this device. When flashing, OEM firmware writes over the non-booted partition. If booted from 'A', flashing over 'B' won't work. To get around this, you should flash the OEM image over itself. This will then boot the router from 'B' and allow you to flash OpenWRT without problems. Reverting to factory firmware: Hard-reset the router three times to force it to boot from 'B.' This is where the stock firmware resides. To remove any traces of OpenWRT from your router simply flash the OEM image at this point. Signed-off-by: Santiago Rodriguez-Papa <contact@rodsan.dev> [use v1 only, minor DTS adjustments, use LINKSYS_HWNAME and add it to DEVICE_VARS, wrap DEVICE_PACKAGES, adjust commit message/title] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* mvebu: add support for MACCHIATObin Single ShotTomasz Maciej Nowak2020-07-121-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add support for Marvell MACCHIATObin Single Shot, cortex-a72 based Marvell ARMADA 8040 Community board. Single Shot was broken as the device tree is different on the Double Shot Board. Specifications: - Quad core Cortex-A72 (up to 2GHz) - DDR4 DIMM slot with optional ECC and single/dual chip select support - Dual 10GbE (1/2.5/10GbE) SFP+ 2.5GbE (1/2.5GbE) via SFP 1GbE via copper - SPI Flash - 3 X SATA 3.0 connectors - MicroSD connector - eMMC - PCI x4 3.0 slot - USB 2.0 Headers (Internal) - USB 3.0 connector - Console port (UART) over microUSB connector - 20-pin Connector for CPU JTAG debugger - 2 X UART Headers - 12V input via DC Jack - ATX type power connector - Form Factor: Mini-ITX (170 mm x 170 mm) More details at http://macchiatobin.net Installation: Write the Image to your Micro SD Card and insert it in the MACCHIATObin Single Shot SD Card Slot. In the U-Boot Environment: 1. reset U-Boot environment: env default -a saveenv 2. prepare U-Boot with boot script: setenv bootcmd "load mmc 1:1 0x4d00000 boot.scr; source 0x4d00000" saveenv or manually (hanging lines indicate wrapped one-line command): setenv fdt_name armada-8040-mcbin-singleshot.dtb setenv image_name Image setenv bootcmd 'mmc dev 1; ext4load mmc 1:1 $kernel_addr $image_name;ext4load mmc 1:1 $fdt_addr $fdt_name;setenv bootargs $console root=/dev/mmcblk1p2 rw rootwait; booti $kernel_addr - $fdt_addr' saveenv On newer Bootloaders (18.12) the Variables have been changed, use: setenv fdt_name armada-8040-mcbin-singleshot.dtb setenv image_name Image setenv bootcmd 'mmc dev 1; ext4load mmc 1:1 $kernel_addr_r $image_name;ext4load mmc 1:1 $fdt_addr_r $fdt_name;setenv bootargs $console root=/dev/mmcblk1p2 rw rootwait; booti $kernel_addr_r - $fdt_addr_r' Reported-by: Alexandra Alth <alexandra@alth.de> Signed-off-by: Tomasz Maciej Nowak <tomek_n@o2.pl> Tested-by: Alexandra Alth <alexandra@alth.de> [add specs and installation as provided by Alexandra Alth] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* mvebu: fix support for Marvell 8040 MACCHIATOBinAdrian Schmutzler2020-07-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | Between kernels 4.20 and 5.0, a new variant of this board has been introduced ("Single Shot"), and the existing one has been renamed with the appendix "Double Shot". [1] This also adjusted the first compatible in the list: marvell,armada8040-mcbin -> marvell,armada8040-mcbin-doubleshot This patch updates the OpenWrt implementation of this device by adjusting the relevant references to that compatible (i.e., our board name). To still provide support for 4.19 with our setup, this adds a small patch to change the compatible there as well. [1] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=b1f0bbe2700051886b954192b6c1751233fe0f52 Cc: Tomasz Maciej Nowak <tomek_n@o2.pl> Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de> Reviewed-by: Tomasz Maciej Nowak <tomek_n@o2.pl>
* kirkwood: add support for Check Point L-50Pawel Dembicki2020-07-111-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds support for the Check Point L-50 from 600/1100 series routers. Specification: -CPU: Marvell Kirkwood 88F6281 1200MHz -RAM: 512MB -Flash: NAND 512MB -WiFi: mPCIe card based on Atheros AR9287 b/g/n -WAN: 1 Gigabit Port (Marvell 88E1116R PHY) -LAN: 9 Gigabit Ports (2x Marvell 88E6171(5+4)) -USB: 2x USB2.0 -Express card slot -SD card slot -Serial console: RJ-45 115200 8n1 -Unsupported DSL Known issues: -DSL not supported -Expresscard not tested Installation: Step one -> backup: make backup u-boot and env for revert stock posibility make backup dsl_mac_addr, dmz_mac_addr, eth1addr, ethaddr and all lanX_mac_addr Step two -> Use kwboot tool to upload openwrt u-boot to RAM: run kwboot: "kwboot -B 115200 /dev/ttyUSB0 -b u-boot.kwb -p -t" end start u-boot Step three -> Restore macs (e.g. below): setenv eth1addr 00:1C:XX:XX:XX:6C setenv ethaddr 00:1C:XX:XX:XX:6B setenv lan1_mac_addr 00:1C:XX:XX:XX:6C setenv lan2_mac_addr 00:1C:XX:XX:XX:6D setenv lan3_mac_addr 00:1C:XX:XX:XX:6E setenv lan4_mac_addr 00:1C:XX:XX:XX:6F setenv lan5_mac_addr 00:1C:XX:XX:XX:70 setenv lan6_mac_addr 00:1C:XX:XX:XX:71 setenv lan7_mac_addr 00:1C:XX:XX:XX:72 setenv lan8_mac_addr 00:1C:XX:XX:XX:73 setenv dmz_mac_addr 00:1C:XX:XX:XX:74 setenv dsl_mac_addr 00:1C:XX:XX:XX:75 Step four -> flash u-boot: mw 0x0800000 0xffff 0x100000 nand erase 0x0 100000 tftp 0x0800000 openwrt-kirkwood-l50-u-boot.kwb nand write 0x0800000 0x0 0x100000 saveenv Step five -> run initramfs image: tftpboot 0x02000000 openwrt.bin; bootm 0x02000000; Step six -> install sysupgrade OpenWrt image: copy to /tmp/ sysupgrade image run sysupgrade Back to stock: Restore original u-boot end env. Install factory image via stock u-boot. Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
* uboot-envtools: ath79: update ubootenv partion index for gl-ar300mHuangbin Zhan2020-07-111-4/+8
| | | | | | | The block index of u-boot-env changed from mtd1 to mtd3 after upgrading kernel to 5.4. This patch search the mtd block by label name, work as expect when perform a clean flash. Signed-off-by: Huangbin Zhan <zhanhb88@gmail.com>
* ath79: add support for Arduino YunSungbo Eo2020-07-081-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Arduino Yun is a microcontroller development board, based on Atmel ATmega32u4 and Atheros AR9331. Specifications: - MCU: ATmega32U4 - SoC: AR9331 - RAM: DDR2 64MB - Flash: SPI NOR 16MB - WiFi: - 2.4GHz: SoC internal - Ethernet: 1x 10/100Mbps - USB: 1x 2.0 - MicroSD: 1x SDHC Notes: - Stock firmware is based on OpenWrt AA. - The SoC UART can be accessed only through the MCU. YunSerialTerminal is recommended for access to serial console. - Stock firmware uses non-standard 250000 baudrate by default. - The MCU can be reprogrammed from the SoC with avrdude linuxgpio. Installation: 1. Update U-Boot environment variables to adapt to new partition scheme. > setenv bootcmd "run addboard; run addtty; run addparts; run addrootfs; bootm 0x9f050000 || bootm 0x9fea0000" > setenv mtdparts "spi0.0:256k(u-boot)ro,64k(u-boot-env),15936k(firmware),64k(nvram),64k(art)ro" > saveenv 2. Boot into stock firmware normally and perform sysupgrade with sysupgrade image. # sysupgrade -n -F /tmp/sysupgrade.bin Signed-off-by: Sungbo Eo <mans0n@gorani.run>
* ipq806x: add support for Linksys EA7500 V1Pawel Dembicki2020-07-081-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds support for the Linksys EA7500 V1 router. Specification: - CPU: Qualcomm IPQ8064 - RAM: 256MB - Flash: NAND 128MB - WiFi: QCA9982 an+ac + QCA9983 bgn - Ethernet: 5 GBE Ports (WAN+ 4xLAN) (QCA8337) - USB: 1x USB 3.0 1x USB2.0 - Serial console: RJ-45 115200 8n1 (1V8 Voltage level) - 2 Buttons - 1 LED Known issues: - Some devices won't flash via web gui Installation: - Newer stock images doesn't allow to install custom firmware. - Please downgrade software to 1.1.2 version. Official firmware: https://downloads.linksys.com/downloads/firmware/FW_EA7500_1.1.2.172843_prod.gpg.img - Do it two times to downgrade all stored images. - Apply factory image via web-gui. Serial + TFTP method: - downgrade to 1.1.2 two times - connect ehternet and serial cable - set ip address of tftp server to 192.168.1.254 - put openwrt factory image to tftp folder and rename it to macan.bin - stop device while booting in u-boot - run command: "run flashimg" - run command: "setenv boot_part 1" - run command "saveenv" - reset Back to stock: - Please use old non-gpg image like this 1.1.2: https://downloads.linksys.com/downloads/firmware/FW_EA7500_1.1.2.172843_prod.img - ssh to router and copy image to tmp - use sysupgrade -n -F Tested by github users: @jack338c and @grzesiczek1 Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com> [removed i2c4_pins, mdio0_pins, nand_pins, rgmii2_pins from DTSI] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ipq40xx: add support for Buffalo WTR-M2133HPYanase Yuki2020-07-081-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Buffalo WTR-M2133HP is a Tri-Band router based on IPQ4019. Specification ------------- - SoC: Qualcomm IPQ4019 - RAM: 512MiB - Flash Memory: NAND 128MiB (MXIC MX30LF1G18AC) - Wi-Fi: Qualcomm IPQ4019 (2.4GHz, 1ch - 13ch) - Wi-Fi: Qualcomm IPQ4019 (5GHz, 36ch - 64ch) - Wi-Fi: Qualcomm QCA9984 (2T2R, 5GHz, 100ch - 140ch) - Ethernet: 4x 10/100/1000 Mbps (1x WAN, 3x LAN) - LED: 4x white LED, 4x orange LED, 1x blue LED - USB: 1x USB 3.0 port - Input: 2x tactile switch, 2x slide switch (2x SP3T) - Serial console: 115200bps, pinheader JP5 on PCB - Power: DC 12V 2A Flash instruction ----------------- 1. Set up a TFTP server (IP address: 192.168.11.10) 2. Rename "initramfs-fit-uImage.itb" to "WTR-M2133HP-initramfs.uImage" and put it into the TFTP server directory. 3. Connect the TFTP server and WTR-M2133HP. 4. Hold down the AOSS button, then power on the router. 5. After booting OpenWrt initramfs image, connect to the router by SSH. 6. Transfer "squashfs-nand-factory.ubi" to the router. 7. Execute the following commands. # ubidetach -p /dev/mtd15 # ubiformat /dev/mtd15 -f /tmp/openwrt-ipq40xx-generic-buffalo_wtr-m2133hp-squashfs-nand-factory.ubi # fw_setenv bootcmd bootipq 8. Perform reboot. Recover to stock firmware ------------------------- 1. Execute the following command. # fw_setenv bootcmd bootbf 2. Reboot and wait several minutes. Signed-off-by: Yanase Yuki <dev@zpc.sakura.ne.jp>
* kirkwood: add support for Zyxel NSA310SPawel Dembicki2020-07-081-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Zyxel NSA310S is a NAS based on Marvell kirkwood SoC. Specification: - Processor Marvell 88F6702 1 GHz - 256MB RAM - 128MB NAND - 1x GBE LAN port (PHY: Marvell 88E1318) - 2x USB 2.0 - 1x SATA - 3x button - 7x leds - serial on J1 connector (115200 8N1) (GND-NOPIN-RX-TX-VCC) Known issues: - no kernel module for RTC. [*] - buzzer (connected to MPP43) need to be drived by 1kHz signal - no kernel module for internal MCU connected via I2C[**] [*] Karoly Pocsi made simple, unofficial driver for HT1382. It can be found here: https://www.madadmin.com/zyxel-nsa320s-es-debian-linux-4-resz/ [**] Karoly Pocsi found how CPU talk with MCU: It is possible to query the MCU-controlled fan speed and temperature: i2cget -y 0x0 0x0a 0x07 i2cget -y 0x0 0x0a 0x08 The first value (0x07) is the temperature in ° C, the second (0x08) is the time in milliseconds to complete one fan revolution (rpm = 60,000 / value). Info translated from: https://www.madadmin.com/zyxel-nsa320s-es-debian-linux-4-resz/ Installation: TFTP: 1. Run serial console and go to u-boot. 2. Copy u-boot via tftp and write to NAND: => mw 0x0800000 0xffff 0x100000 => nand erase 0x0 100000 => setenv ipaddr 192.168.1.2 => setenv serverip 192.168.1.4 => tftp 0x0800000 nsa310s-u-boot.kwb => nand write 0x0800000 0x0 0x100000 => reset 3. Run new u-Boot, repair bootcmd and restore MAC address from sticker => setenv ethaddr AA:BB:CC:DD:EE:FF => saveenv 4. Copy and run initramfs image => setenv ipaddr 192.168.1.2 => setenv serverip 192.168.1.4 => tftpboot zyxel_nsa310s-initramfs-uImage => bootm 0x800000 5. Download sysupgrade image and perform sysupgrade USB: 1. Prepare usb fat32 drive with u-boot.kwb and initramfs image. Stick it to USB 2.0 port. 2. Run serial console and go to u-boot. 3. Copy u-boot from usb and write to NAND: => mw 0x0800000 0xffff 0x100000 => nand erase 0x0 100000 => usb start => fatload usb 0 0x0800000 u-boot.kwb => nand write 0x0800000 0x0 0x100000 => reset 4. Run new u-Boot, repair bootcmd and restore MAC address from sticker => setenv ethaddr AA:BB:CC:DD:EE:FF => saveenv 5. Copy and run initramfs image: => usb start => fatload usb 0 0x0800000 initramfs-uImage => bootm 0x800000 6. Download sysupgrade image and perform sysupgrade. Based on work ThBexx <thomas.beckler@hotmail.com> DTS based on dropped support in 0ebdf0c. Tested-by: Lech Perczak <lech.perczak@gmail.com> Reviewed-by: Lech Perczak <lech.perczak@gmail.com> Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com> [NSA310s -> NSA310S in DEVICE_MODEL] Signed-off-by: Petr Štetiar <ynezz@true.cz>
* ramips: Add support for Xiaomi Mi Router(Black,R2100)Emir Efe Kucuk2020-07-081-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Xiaomi Mi Router AC2100 is a *black* cylindrical router that shares many characteristics (apart from its looks and the GPIO ports) with the 6-antenna *white* "Xiaomi Redmi Router AC2100" See the visual comparison of the two routers here: https://github.com/emirefek/openwrt-R2100/raw/imgcdn/rm2100-r2100.jpg Specification of R2100: - CPU: MediaTek MT7621A - RAM: 128 MB DDR3 - FLASH: 128 MB ESMT NAND - WIFI: 2x2 802.11bgn (MT7603) - WIFI: 4x4 802.11ac (MT7615) - ETH: 3xLAN+1xWAN 1000base-T - LED: Power, WAN in Yellow and Blue - UART: On board (Don't know where is should be confirmed by anybody else) - Modified u-boot Hacking of official firmware process is same at both RM2100 and R2100. Thanks to @namidairo Here is the detailed guide Hack: https://github.com/impulse/ac2100-openwrt-guide Guide is written for MacOS but it will work at linux. needed packages: python3(with scapy), netcat, http server, telnet client 1. Run PPPoE&exploit to get nc and wget busybox, get telnet and wget firmware 2. mtd write openwrt-ramips-mt7621-xiaomi_mi-router-ac2100-kernel1.bin kernel1 3. nvram set uart_en=1 4. nvram set bootdelay=5 5. nvram set flag_try_sys1_failed=1 6. nvram commit 7. mtd -r write openwrt-ramips-mt7621-xiaomi_mi-router-ac2100-rootfs0.bin rootfs0 other than these I specified in here. Everything is same with: https://github.com/openwrt/openwrt/commit/f3792690c4f0567a8965d82898295b9d50c3bb7e Thanks for all community and especially for this device: @Ilyas @scp07 @namidairo @Percy @thorsten97 @impulse (names@forum.openwrt.com) MAC Locations: WAN *:b5 = factory 0xe006 LAN *:b6 = factory 0xe000 WIFI 5ghz *:b8 = factory 0x8004 WIFI 2.4ghz *:b7 = factory 0x0004 Signed-off-by: Emir Efe Kucuk <emirefek@gmail.com> [refactored common image bits into Device/xiaomi-ac2100, fixed From:] Signed-off-by: Petr Štetiar <ynezz@true.cz>