aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ramips/image/mt7621.mk
Commit message (Collapse)AuthorAgeFilesLines
* ramips: add support for ALFA Network Quad-E4GPiotr Dymacz2019-11-241-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ALFA Network Quad-E4G is a universal Wi-Fi/4G platform, which offers three miniPCIe (PCIe, USB 2.0, SIM) and a single M.2 B-key (dual-SIM, USB 3.0) slots, RTC and five Gigabit Ethernet ports with PoE support. Specification: - MT7621A (880 MHz) - 256/512 MB of RAM (DDR3) - 16/32+ MB of FLASH (SPI NOR) - optional second SPI flash (8-pin WSON/SOIC) - 1x microSD (SDXC) flash card reader - 5x 10/100/1000 Mbps Ethernet, with passive PoE support (24 V) in LAN1 - optional 802.3at/af PoE module for WAN - 3x miniPCIe slot (with PCIe and USB 2.0 buses, micro SIM and 5 V) - 1x M.2/NGFF B-key 3042 (USB 3.0/2.0, mini + micro SIM) - RTC (TI BQ32002, I2C bus) with backup battery (CR2032) - external hardware watchdog (EM Microelectronic EM6324) - 1x USB 2.0 Type-A - 1x micro USB Type-B for system serial console (Holtek HT42B534) - 11x LED (5 for Ethernet, 5 driven by GPIO, 1x power indicator) - 3x button (reset, user1, user2) - 1x I2C (4-pin, 2.54 mm pitch) header on PCB - 4x SIM (6-pin, 2.00 mm pitch) headers on PCB - 2x UART2/3 (4-pin, 2.54 mm pitch) headers on PCB - 1x mechanical power switch - 1x DC jack with lock (24 V) Other: - U-Boot selects default SIM slot, based on value of 'default_sim' env variable: '1' or unset -> SIM1 (mini), '2' -> SIM2 (micro). This board has additional logic circuit for M.2 SIM switching. The 'sim-select' will work only if both SIM slots are occupied. Otherwise, always slot with SIM inside is selected, no matter 'sim-select' value. - U-Boot enables power in all three miniPCIe and M.2 slots before loading the kernel - this board supports 'dual image' feature (controlled by 'dual_image' U-Boot environment variable) - all three miniPCIe slots have additional 5 V supply on pins 47 and 49 - the board allows to install up to two oversized miniPCIe cards (vendor has dedicated MediaTek MT7615N/D cards for this board) - this board has additional logic circuit controlling PERSTn pins inside miniPCIe slots. By default, PERSTn (GPIO19) is routed to all miniPCIe slots but setting GPIO22 to high allows PERSTn control per slot, using GPIO23-25 (value is inverted) Flash instructions: You can use the 'sysupgrade' image directly in vendor firmware which is based on OpenWrt (make sure to not preserve settings - use 'sysupgrade -n -F ...' command). Alternatively, use web recovery mode in U-Boot: 1. Power the device with reset button pressed, the modem LED will start blinking slowly and after ~3 seconds, when it starts blinking faster, you can release the button. 2. Setup static IP 192.168.1.2/24 on your PC. 3. Go to 192.168.1.1 in browser and upload 'sysupgrade' image. Signed-off-by: Piotr Dymacz <pepe2k@gmail.com> (backported from commit e68539aca43a560077364de27eb220f1d85ca3ef)
* ramips: use upstream RAW_APPENDED_DTB instead of our OWRTDTBChuanhong Guo2019-11-241-1/+1
| | | | | | | | | | | | | | | | | | | Upstream kernel added support for RAW_APPENDED_DTB on ralink arch in the following commit: 02564fc89d3d ("ralink: Introduce fw_passed_dtb to arch/mips/ralink") Use upstream solution and get rid of our OWRTDTB hack. This commit set DEVICE_DTS to $$(DTS) instead of replacing DTS with DEVICE_DTS in device profile because DTS variable will be dropped in later commits. Signed-off-by: Chuanhong Guo <gch981213@gmail.com> [Tested on mt7621/mt76x8] Tested-by: Chuanhong Guo <gch981213@gmail.com> [Tested on rt305x/mt7620] Tested-by: INAGAKI Hiroshi <musashino.open@gmail.com> (cherry picked from commit 7a8d3432c739c6ff038295176e8b6324e92fc116) Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
* ramips: set uImage name of WeVO 11AC NAS and W2914NS v2Sungbo Eo2019-11-211-0/+2
| | | | | | | | | | | | | | | | The stock firmware and bootloader only accept uImage with names that match certain patterns. This patch enables OpenWrt installation from stock firmware without having to reflash the bootloader or access the UART console. Installation via web interface: 1. Flash **initramfs** image through the stock web interface. 2. Boot into OpenWrt and perform sysupgrade with sysupgrade image. Signed-off-by: Sungbo Eo <mans0n@gorani.run> (cherry picked from commit 19800ac095f6ddbba03ccab08e5197b1eec4a49e) [backported] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ramips: add factory image for NETGEAR R6220David Bauer2019-09-161-1/+6
| | | | | | | | | | | This adds an easy-installation factory image for the NETGEAR R6220 router. The factory image can either be flashed via the vendor Web-UI or the bootloader using nmrpflash. Tested with NETGEAR V1.1.0.86 firmware. Signed-off-by: David Bauer <mail@david-bauer.net> (cherry picked from commit 607dfdf211bebb5043cbc0267c1e2c3e3c2514b4)
* ramips: add support for ASUS RT-AC57UDavid Bauer2019-07-211-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SoC: MediaTek MT7621AT RAM: 128M (Winbond W631GG6KB-15) FLASH: 16MB (Spansion S25FL128SA) WiFi: MediaTek MT7603EN bgn 2SS WiFi: MediaTek MT7612EN nac 2SS BTN: Reset - WPS LED: - Power - LAN {1-4} - WAN - WiFi 2.4 GHz - WiFi 5 GHz - USB UART: UART is present next to the Power LED. TX - RX - GND - 3V3 / 57600-8N1 3V3 is the nearest one to the Power LED. Installation ------------ Via TFTP: 1. Set your computers IP-Address to 192.168.1.75. 2. Power up the Router with the Reset button pressed. 3. Release the Reset button after 5 seconds. 4. Upload OpenWRT sysupgrade image via TFTP: > tftp -4 -v -m binary 192.168.1.1 -c put <IMAGE> Via SSH: Note: User/password for SSH is identical with the one used in the Web-interface. 1. Complete the initial setup wizard. 2. Activate SSH under "Administration" -> "System". 3. Transfer the OpenWrt sysupgrade image via scp: > scp owrt.bin admin@192.168.1.1:/tmp 4. Connect via SSH to the router. > ssh admin@192.168.1.1 5. Write the OpenWrt image to flash. > mtd-write -i /tmp/owrt.bin -d linux 6. Reboot the router > reboot Signed-off-by: David Bauer <mail@david-bauer.net> (cherry picked from commit 14e0e4f138e35c3e2a15cc3a836c939547ee053b)
* ramips: create R6220 dtsi and improve WNDR3700v5 supportJan Hoffmann2019-05-311-1/+2
| | | | | | | | | | | | | | | | | | The R6220 and WNDR3700v5 are identical apart from using NAND/NOR flash and having a different casing. This adds a new cleaned up R6220.dtsi with the common bits for both devices. Both devices now have feature parity. Performed cleanup: * generic DTS node names * regulator for usb power * added missing pinctrl groups * use switch port instead of VLAN as trigger for WAN LED Fixes for WNDR3700v5: * all LEDS work * correct ethernet MAC addresses Signed-off-by: Jan Hoffmann <jan@3e8.eu>
* ramips: add support for Telco Electronics X1Nicholas Smith2019-05-181-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | Hardware: SoC: MT7621 DRAM: 256MB DDR3 Flash: 16MB SPI-NOR WiFi: 2.4GHz: MT7603 @ PCIe0 WiFi: 5.8GHz: MT7612 @ PCIe1 Modem: Sierra Wireless MC74xx Interfaces: GBE RJ45 x5 mPCIe x2 UART x1 I2C x1 JTAG x1 UIM x1 LEDs x6 Flash instructions: Flash from within the factory bootloader, firmware web interface or CLI using sysupgrade -F -n Signed-off-by: Nicholas Smith <mips171@icloud.com>
* ramips: add factory image for WNDR3700v5Jan Hoffmann2019-05-181-1/+10
| | | | | | | | | This uses the existing rules for Sercomm factory images and moves them to the ramips image Makefile, so they can be used in all subtargets. The new factory image for WNDR3700v5 can be flashed using nmrpflash. Signed-off-by: Jan Hoffmann <jan@3e8.eu>
* ramips: add support for Youku YK-L2Zhao Yu2019-04-061-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Hardware spec: CPU: MTK MT7621A RAM: 256MB ROM: 16MB SPI Flash WiFi: MT7603EN + MT7612EN Button: 2 buttons (reset, wps) LED: 8 LEDs (Power 2G 5G WPS Internet LAN1 LAN2 USB) Ethernet: 3 ports, 2 LAN + 1 WAN Other: USB3.0 Flashing instructions: Visit the openwrt forum topic for this router: https://forum.openwrt.org/t/add-openwrt-support-for-youku-yk-l2/34692 to get the bootloader and unlock firmware. 0. upgrade your router with the telnet firmware via the firmware upgrade page on the webui. 1. telnet 192.168.11.1 from your PC 2. Download the pb-boot-youku_l2-20190317-61b6d33.bin and transfer it to the /tmp directory of the router. 3. mtd write /tmp/pb-boot-youku_l2-20190317-61b6d33.bin Bootloader 4. turn off the power 5. Push the reset button while turning on the router and wait until LED start blinking (~10sec.) 6. Connect Ethernet port and goto http://192.168.1.1. 7. Upload the firmware to firmware restore page in webui. Signed-off-by: Zhao Yu <574249312@qq.com> Signed-off-by: Christian Lamparter <chunkeey@gmail.com> [rewrote the flashing instructions, fixed author]
* ramips: add Netgear EX6150David Bauer2019-03-291-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SoC: MediaTek MT7621 RAM: 64M (Winbond W9751G6KB-25) FLASH: 16MB (Macronix MX25L12835F) WiFi: MediaTek MT7662E bgn 2SS WiFi: MediaTek MT7662E nac 2SS BTN: ON/OFF - Reset - WPS - AP/Extender toggle LED: - Arrow Right (blue) - Arrow Left (blue) - WiFi 1 (red/green) - WiFi 2 (red/green) - Power (green/amber) - WPS (Green) UART: UART is present as Pads on the backside of the PCB. They are located on the other side of the Ethernet port. 3.3V - GND - TX - RX / 57600-8N1 3.3V is the nearest one to the antenna connectors Installation ------------ Update the factory image via the Netgear web-interfaces (by default: 192.168.1.250/24). You can also use the factory image with the nmrpflash tool. For more information see https://github.com/jclehner/nmrpflash Signed-off-by: David Bauer <mail@david-bauer.net> [merge conflict in 02_network, flash@0 node rename, wlan DTS triggers] Signed-off-by: Petr Štetiar <ynezz@true.cz>
* ramips: Xiaomi MIR3G: detect board name from DTSOzgur Can Leonard2019-03-211-2/+3
| | | | | | | | | | | | | | | | - Former "mir3g" board name becomes "xiaomi,mir3g". - Reorder some entries to maintain alphabetical order. - Change DTS so status LEDs (yellow/red/blue) mimic Xiaomi stock firmware: (Section Indicator) <http://files.xiaomi-mi.co.uk/files/router_pro/router%20PRO%20EN.pdf> <http://files.xiaomi-mi.co.uk/files/Mi_WiFi_router_3/MiWiFi_router3_EN.pdf> |Yellow: Update (LED flickering), the launch of the system (steady light); |Blue: during normal operation (steady light); |Red: Safe mode (display flicker), system failure (steady light); Signed-off-by: Ozgur Can Leonard <ozgurcan@gmail.com> [Added link to similar Router 3 model] Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
* ramips: add support for Xiaomi Mi Router 3 ProOzgur Can Leonard2019-03-131-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Hardware: CPU: MediaTek MT7621AT (2x880MHz) RAM: 512MB DDR3 FLASH: 256MB NAND WiFi: 2.4GHz 4x4 MT7615 b/g/n (Needs driver, See Issues!) WiFI: 5GHz 4x4 MT7615 a/n/ac (Needs driver, See Issues!) USB: 1x 3.0 ETH: 1x WAN 10/100/1000 3x LAN 10/100/1000 LED: Power/Status BTN: RESET UART: 115200 8n1 Partition layout and boot: Stock Xiaomi firmware has the MTD split into (among others) - kernel0 (@0x200000) - kernel1 (@0x600000) - rootfs0 - rootfs1 - overlay (ubi) Xiaomi uboot expects to find kernels at 0x200000 & 0x600000 referred to as system 1 & system 2 respectively. a kernel is considered suitable for handing control over if its linux magic number exists & uImage CRC are correct. If either of those conditions fail, a matching sys'n'_fail flag is set in uboot env & a restart performed in the hope that the alternate kernel is okay. If neither kernel checksums ok and both are marked failed, system 2 is booted anyway. Note uboot's tftp flash install writes the transferred image to both kernel partitions. Installation: Similar to the Xiaomi MIR3G, we keep stock Xiaomi firmware in kernel0 for ease of recovery, and install OpenWRT into kernel1 and after. The installation file for OpenWRT is a *squashfs-factory.bin file that contains the kernel and a ubi partition. This is flashed as follows: nvram set flag_try_sys1_failed=1 nvram set flag_try_sys2_failed=0 nvram commit dd if=factory.bin bs=1M count=4 | mtd write - kernel1 dd if=factory.bin bs=1M skip=4 | mtd write - rootfs0 reboot Reverting to stock: The part of stock firmware we've kept in kernel0 allows us to run stock recovery, which will re-flash stock firmware from a *.bin file on a USB. For this we do the following: fw_setenv flag_try_sys1_failed 0 fw_setenv flag_try_sys2_failed 1 reboot After reboot the LED status light will blink red, at which point pressing the 'reset' button will cause stock firmware to be installed from USB. Issues: OpenWRT currently does not have support for the MT7615 wifi chips. There is ongoing work to add mt7615 support to the open source mt76 driver. Until that support is in place, there are closed-source kernel modules that can be used. See: https://forum.openwrt.org/t/support-for-xiaomi-wifi-r3p-pro/20290/170 Signed-off-by: Ozgur Can Leonard <ozgurcan@gmail.com> Signed-off-by: Christian Lamparter <chunkeey@gmail.com> [02_network remaps, Added link to notes]
* ramips: add kmod-mt76x2 to WeVo 11AC NASJu Se Hoon2019-02-051-1/+1
| | | | | | | | The WeVo 11AC NAS has a MT7612E 802.11ac chip on the PCB. Signed-off-by: Ju Se Hoon <joosahoon@gmail.com> [renamed author from Albis-dev to real name, editted commit message] Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
* ramips: cleanup the RB750Gr3 supportAnton Arapov2019-01-051-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Always enable the pwr led and use the usr led for boot status indication. Rename nodes in the dts, to match what is recommend in the devicetree specification. Increase the maximum spi frequency to 20MHz and drop the m25p,chunked-io which isn't required on mt7621. Use the BTN_0 keycode for the mode button. This board doesn't have any wireless. Use a more descriptive label for the reset button and the GPIO enabling the usb vcc supply. Use the beeper kernel module for the buzzer. Fix the pinmux to switch only pins used as GPIOs to the GPIO function. Add support for the PoE enable GPIO to the userspace. The PoE power status can be read via GPIO7. Since OpenWrt doesn't have support for reading inputs from userspace, prepare only the pinmux for the GPIO. Signed-off-by: Anton Arapov <arapov@gmail.com> Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org> Signed-off-by: Mathias Kresin <dev@kresin.me>
* ramips: add RB750Gr3 native supportAnton Arapov2019-01-051-8/+7
| | | | | | | | | | | | | | | | | This patch adds support of MikroTik RouterBOARD 750Gr3, without the need to reflashing the bootloader. Installation through RouterBoot follows the usual MikroTik method https://openwrt.org/toh/mikrotik/common Since the image isn't compatible with RouterBOARD 750Gr3 installations which have replaced the bootloader, the former used userspace boardname is not added to the SUPPORTED_DEVICES, to prevent a brick while trying to upgrade to the image with native support. Signed-off-by: Anton Arapov <arapov@gmail.com> Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org> Signed-off-by: Mathias Kresin <dev@kresin.me>
* ramips: consolidate seama image build codeMathias Kresin2018-12-301-11/+2
| | | | | | | | Create a common template which has the required image build code defined. Add some new variables to pass individual parts to the seama recipes. Signed-off-by: Mathias Kresin <dev@kresin.me>
* ramips: add support for GeHua GHL-R-001Deng Qingfang2018-12-291-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | Specs SoC: MT7621AT RAM: 512MiB Flash: 32MiB MX25L25635F SPI NOR 2.4G: MT7603EN 5G: MT7612EN Ethernet: 4x GE ports (1x WAN, 3x LAN) with link status LEDs USB 3.0 LEDs: POWER, 5G WIFI, 2.4G WIFI, USB, Internet. The last two ones are controlled by GPIO UART: There are 2 UARTs (UARTLITE1/ttyS0 and UARTLITE3/ttyS1) on board. UARTLITE1 is close to LEDs, and UARTLITE3 is close to flash chip. The stock u-boot uses UARTLITE1 by default. Baud rate is 57600 Flash instruction 1. telnet 192.168.9.1 2317, username is "root" and password is "admin" One can alternatively use UART to log in 2. Put OpenWrt firmware in a FAT32 USB drive, and connect it to the router One can alternatively download the firmware via wget through Internet 3. mtd write /path/to/openwrt.bin firmware 4. reboot Signed-off-by: Deng Qingfang <dengqf6@mail2.sysu.edu.cn>
* ramips: add support for CreativeBox v1Weijie Gao2018-12-281-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | Hardware: SoC: MT7621 DRAM: 512MB DDR3 Flash: 32MB SPI-NOR WiFi 2.4GHz: MT7603 @ PCIe0 WiFi 5.8GHz: MT7612 @ PCIe1 SATA: ASM1061 @ PCIe2 Interfaces: GBE RJ45 x5 USB3.0 x1 eSATA (with USB2.0) x1 SATA x1 UART x1 I2C x1 JTAG x1 Flash instructions: Through factory bootloader or firmware web interface Signed-off-by: Weijie Gao <hackpascal@gmail.com>
* ramips: add support for Netgear R6350NOGUCHI Hiroshi2018-12-161-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Netgear R6350 is a wireless router, aka Netgear AC1750. Specification: - SoC: Mediatek MT7621AT (2 CPU cores, 4 threads) - RAM: 128MiB (Nanya NT5CC64M16GP-DI) - ROM: 128MiB NAND Flash (Macronix MX30LF1G18AC-TI) - Wireless: for 11b/g/n (upto 300Mbps): MT7603 for 11a/ac (upto 1450Mbps) : MT7615, is not avaliable now - Ethernet LAN speed: up to 1000Mbps - Ethernet LAN ports: 4 - Ethernet WAN speed: up to 1000Mbps - Ethernet WAN ports: 1 - USB ports: 1 (USB 2.0) - LEDs: 4 (all can be controlled by SoC's GPIO) - buttons: 2 - serial ports: unknown Installation through telnet: - Copy kernel.bin and rootfs.bin to a USB flash disk, plug to usb port on the router. - Enable telnet with link: http://192.168.1.1/setup.cgi?todo=debug (login if required, default: admin password) - You will see "Debug Enabled!" - Telnet 192.168.1.1 and login with "root" - ls /mnt/shares/ to find out path of your USB disk. 'myUdisk' for example. - cd /mnt/shares/myUdisk - mtd_write write rootfs.bin Rootfs - mtd_write write kernel.bin Kernel - reboot recovery when bricked: nmrpflash can be used to recover to the netgear firmware if a broken image was flashed. The SC_PART_MAP partition suggests that an on flash partition table exists. After implementing a partition parser/builder for the sercom partition format, the definitions don't match the flash layout used by the stock firmware. It either means the partition format has not yet been completely understood or it isn't used by the stock firmware. For now, use fixed partitions instead. Signed-off-by: NOGUCHI Hiroshi <drvlabo@gmail.com> [apply latest ramips changes and document the on flash partition map issues] Signed-off-by: Mathias Kresin <dev@kresin.me>
* ramips: merge relocate compile into build recipeMathias Kresin2018-11-301-9/+0
| | | | | | | Compile the loader if the relocate-kernel image recipe is used and get rid of the legacy build code to do so. Signed-off-by: Mathias Kresin <dev@kresin.me>
* ramips: add support for MTC Wireless Router WR1201Valentín Kivachuk2018-11-301-0/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MTC Wireless Router WR1201 is the OEM name of the board. It is also sold rebranded as STRONG Dual Band Gigabit Router 1200. Specification: - SoC: MediaTek MT7621A (880 MHz) - Flash: 16 MiB - RAM: 128 MiB - Wireless: 2.4Ghz(MT7602EN) and 5Ghz (MT7612EN) - Ethernet speed: 10/100/1000 - Ethernet ports: 4+1 - 1x USB 3.0 - 1x microSD reader - Serial baud rate of Bootloader and factory firmware: 57600 The OEM webinterface writes only as much bytes as listed in the uImage header field to the flash. Also, the OEM webinterface evaluates the name field of uImage header before flashing (the string "WR1201_8_128") To flash via webinterface, is mandatory to use first initramfs.bin and after (from the OpenWrt) the sysupgrade.bin Some notes: - Some microSD will not work: mtk-sd 1e130000.sdhci: no support for card's volts mmc0: error -22 whilst initialising SDIO card mtk-sd 1e130000.sdhci: no support for card's volts mmc0: error -22 whilst initialising MMC card mtk-sd 1e130000.sdhci: no support for card's volts mmc0: error -22 whilst initialising SDIO card mtk-sd 1e130000.sdhci: card claims to support voltages below defined range mtk-sd 1e130000.sdhci: no support for card's volts mmc0: error -22 whilst initialising MMC card mtk-sd 1e130000.sdhci: no support for card's volts mmc0: error -22 whilst initialising SDIO card mtk-sd 1e130000.sdhci: no support for card's volts mmc0: error -22 whilst initialising MMC card Signed-off-by: Valentín Kivachuk <vk18496@gmail.com>
* ramips: unifiy sysupgrade file extensionsMathias Kresin2018-11-291-7/+6
| | | | | | | Use .bin as file extension where possible. The user doesn't need to that sysupgrade images for NAND boards are tarballs. Signed-off-by: Mathias Kresin <dev@kresin.me>
* ramips: remove duplicate image build variablesMathias Kresin2018-11-291-4/+1
| | | | | | | Remove image build variables which are set to the same value as the default image build recipe. Signed-off-by: Mathias Kresin <dev@kresin.me>
* ramips: add support for UniElec U7621-06-512M-64M variantNishant Sharma2018-11-281-0/+8
| | | | | | | | | | | | | | | | | | | | | | Add support for UniElec U7621-06 variant with 512MB RAM and 64MB flash. Additional specs are below: CPU: MT7621 (880Mhz) Bootloader: Ralink U-Boot Flash: 64MB - U-Boot identifies as Macronix MX66L51235F - kernel identifies as MX66L51235l (65536 Kbytes) RAM: 512MB Rest of the details as per commit 46ab81e405d2 ("ramips add support for UniElec U7621-06") Signed-off-by: Nishant Sharma <nishant@unmukti.in> [use generic board detection, add firmware partition compatible, extend firmware partition to use all of the remaining flash space, add a maximum image size matching the firmware partition size] Signed-off-by: Mathias Kresin <dev@kresin.me>
* ramips: use generic board detection for Unielec u7621-06Mathias Kresin2018-11-281-8/+9
| | | | | | | | Use the generic board detection for the board instead of the target specific one. Mark the sysupgrade image compatible with the former used userspace boardname to allow an upgrade from earlier versions. Signed-off-by: Mathias Kresin <dev@kresin.me>
* treewide: use wpad-basic for not small flash targetsMathias Kresin2018-10-161-29/+29
| | | | | | | | | | | | Add out of the box support for 802.11r and 802.11w to all targets not suffering from small flash. Signed-off-by: Mathias Kresin <dev@kresin.me> Mathias did all the heavy lifting on this, but I'm the one who should get shouted at for committing. Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
* ramips: only limit lzma dictionary size on mt7621Jo-Philipp Wich2018-08-301-0/+1
| | | | | | | | | | | | | The changed dictionary size leads to a different LZMA header which breaks sysupgrade image magic checkibng on at least some RT288x boards. Since the commit message only mentions testing on MT7621 and since the change appears to break at least one other ramips subtarget, do not take any chances and restrict the size limitation to only MT7621. Fixes FS#1797 Fixes 09b6755946 ("ramips: limit dictionary size for lzma compression") Signed-off-by: Jo-Philipp Wich <jo@mein.io>
* ramips: add support for ELECOM WRC-1900GSTNOGUCHI Hiroshi2018-08-231-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ELECOM WRC-1900GST is a wireless router, based on Mediatek MT7621A. This is almost same as WRC-2533GST except wireless specs. Specifications: - SoC : MT7621A (four logical CPU cores) - RAM : 128MiB - ROM : 16MiB of SPI NOR-FLASH - wireless : 5GHz : 3T3R up to 1300Mbps/11ac with MT7615 2.4GHz : 3T3R up to 600Mbps/11n with MT7615 - Ethernet : 5 ports, all ports is capable of 1000base-T - Ether switch : MT7530 (MT7621A built-in) - LEDs : 4 LEDs - buttons : 2 buttons and 1 slide-switch - UART : header is on PCB, 57600bps Flash instruction using factory image: 1. Connect the computer to the LAN port of WRC-1900GST 2. Connect power cable to WRC-1900GST and turn on it 3. Access to "https://192.168.2.1/" and open firmware update page ("ファームウェア更新") 4. Select the OpenWrt factory image and click apply ("適用") button 5. Wait ~150 seconds to complete flashing Signed-off-by: NOGUCHI Hiroshi <drvlabo@gmail.com>
* ramips: add support for ELECOM WRC-2533GSTINAGAKI Hiroshi2018-07-301-0/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ELECOM WRC-2533GST is a 2.4/5 GHz band 11ac rotuer, based on MediaTek MT7621A. Specification: - MT7621A (2-Core, 4-Threads) - 128 MB of RAM (DDR3) - 16 MB of Flash (SPI) - 4T4R 2.4/5 GHz wifi - MediaTek MT7615 - 5x 10/100/1000 Mbps Ethernet - 4x LEDs, 6 keys (2x buttons, 1x slide switch) - UART header on PCB - Vcc, GND, TX, RX from ethernet port side - baudrate: 57600 bps Flash instruction using factory image: 1. Connect the computer to the LAN port of WRC-2533GST 2. Connect power cable to WRC-2533GST and turn on it 3. Access to "https://192.168.2.1/" and open firmware update page ("ファームウェア更新") 4. Select the OpenWrt factory image and click apply ("適用") button 5. Wait ~150 seconds to complete flashing Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
* ramips: define common MikroTik RouterBOARD image recipeThibaut VARÈNE2018-07-191-11/+9
| | | | | | | | | | All these devices share the exact same image format. The usb3 kmod is added for the rbm11g, as the rbm11g has a mini-pcie slot like its bigger sibling. The usb kmod is necessary for usb-over-pcie support, which is mandatory for a lot of LTE modules. Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
* ramips: add support for I-O DATA WN-AX1167GRINAGAKI Hiroshi2018-07-071-0/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I-O DATA WN-AX1167GR is a 2.4/5 GHz band 11ac router, based on MediaTek MT7621A. Specification: - MT7621A (2-Cores, 4-Threads) - 64 MB of RAM (DDR2) - 16 MB of Flash (SPI) - 2T2R 2.4/5 GHz - 5x 10/100/1000 Mbps Ethernet - 2x LEDs, 4x keys (2x buttons, 1x slide switch) - UART header on PCB - Vcc, GND, TX, RX from ethernet port side - baudrate: 115200 bps (U-Boot, OpenWrt) Stock firmware: In the stock firmware, WN-AX1167GR has two os images each composed of Linux kernel and rootfs. These images are stored in "Kernel" and "app" partition of the following partitions, respectively. (excerpt from dmesg): MX25L12805D(c2 2018c220) (16384 Kbytes) mtd .name = raspi, .size = 0x01000000 (16M) .erasesize = 0x00010000 (64K) .numeraseregions = 0 Creating 10 MTD partitions on "raspi": 0x000000000000-0x000001000000 : "ALL" 0x000000000000-0x000000030000 : "Bootloader" 0x000000030000-0x000000040000 : "Config " 0x000000040000-0x000000050000 : "Factory" 0x000000050000-0x000000060000 : "iNIC_rf" 0x000000060000-0x0000007e0000 : "Kernel" 0x000000800000-0x000000f80000 : "app" 0x000000f90000-0x000000fa0000 : "Key" 0x000000fa0000-0x000000fb0000 : "backup" 0x000000fb0000-0x000001000000 : "storage" The flag for boot partition is stored in "Key" partition, and U-Boot reads this and determines the partition to boot. If the image that U-Boot first reads according to the flag is "Bad Magic Number", U-Boot then tries to boot from the other image. If the second image is correct, change the flag to the number corresponding to that image and boot from that image. (example): ## Booting image at bc800000 ... Bad Magic Number,FFFFFFFF Boot from KERNEL 1 !! ## Booting image at bc060000 ... Image Name: MIPS OpenWrt Linux-4.14.50 Image Type: MIPS Linux kernel Image (lzma compressed) Data Size: 1865917 Bytes = 1.8 MB Load Address: 80001000 Entry Point: 80001000 Verifying Checksum ... OK Uncompressing Kernel Image ... OK raspi_erase_write: offs:f90000, count:34 . . Done! Starting kernel ... Flash instruction using factory image: 1. Connect the computer to the LAN port of WN-AX1167GR 2. Connect power cable to WN-AX1167GR and turn on it 3. Access to "192.168.0.1" on the web browser and open firmware update page ("ファームウェア") 4. Select the OpenWrt factory image and perform firmware update 5. On the initramfs image, execute "mtd erase firmware" to erase stock firmware and execute sysupgrade with sysupgrade image for WN-AX1167GR 6. Wait ~180 seconds to complete flasing Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
* ramips: add support for MikroTik RouterBOARD RBM11gTobias Schramm2018-07-041-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit adds support for the MikroTik RouterBOARD RBM11g. =Hardware= The RBM11g is a mt7621 based device featuring one GbE port and one miniPCIe slot with a sim card socket and USB 2.0. ==Switch== The single onboard Ethernet port is connected the CPU directly. The internal switch of the mt7621 SoC is disabled. ==Flash== The device has one spi nor flash chip. It is a 128 Mbit winbond 25Q128FVS connected to CS0. ==PCIe== The board features a single miniPCIe slot. It has a dedicated mini SIM socket and a USB 2.0 port. Power to the miniPCIe slot is controlled via GPIO9. ==USB== There are no external USB ports. ==Power== The board can accept both, passive PoE and external power via a 2.1 mm barrel jack (center-positive). The input voltage range is 11-32 V. ==Serial port== The device does have an onboard UART on an unpopulated header next to the flash chip: GND: pin 2 TX: pin 7 RX: pin 6 Settings: 115200, 8N1 See below illustration for positioning of the header. 0 = screw hole * = some pin T = TX pin R = RX pin G = GND pin Pinout: +--------------- |O | __ | / \ | \__/ | | | | +---+ | |RAM| | +--+ | | | |**| <- unpopulated header with UART | |*T| +---+ | |R*| +--------+ | |**| | | | |G*| | CPU | | +--+ | | | +--+ | | | | | +--------+ | +--+ <- flash chip |O | +-----+ | | | |+--+ | | || | | | +--------------------- =Installation= To install an OpenWRT image to the device two components must be built: 1. A openwrt initramfs image 2. A openwrt sysupgrade image ===initramfs & sysupgrade image=== Select target devices "Mikrotik RBM11G" in openwrt menuconfig and build the images. This will create the images "openwrt-ramips-mt7621-mikrotik_rbm11g-initramfs-kernel.bin" and "openwrt-ramips-mt7621-mikrotik_rbm11g-squashfs-sysupgrade.bin" in the output directory. ==Installing== **Make sure to back up your RouterOS license in case you do ever want to go back to RouterOS using "/system license output" and back up the created license file.** When rebooted the board will try booting via ethernet first. If your board does not boot via ethernet automatically you will have to attach to the serial port and set ethernet as boot device within RouterBOOT. 1. Set up a dhcp server that points the bootfile to tftp server serving the "openwrt-ramips-mt7621-mikrotik_rbm11g-initramfs-kernel.bin" initramfs image 2. Connect to ethernet port on board 3. Power on the board 4. Wait for OpenWrt to boot Right now OpenWrt will be running with a SSH server listening. Now OpenWrt must be flashed to the devices flash: 1. Copy "openwrt-ramips-mt7621-mikrotik_rbm11g-squashfs-sysupgrade.bin" to the device using scp. 2. Write openwrt to flash using "sysupgrade openwrt-ramips-mt7621-mikrotik_rbm11g-squashfs-sysupgrade.bin" Once the flashing completes the board will reboot. Disconnect from the devices ethernet port or stop the DHCP/TFTP server to prevent the device from booting via ethernet again. The device should now boot straight to OpenWrt. Signed-off-by: Tobias Schramm <tobleminer@gmail.com>
* ramips: RE350: add rootfs offset to headerAlex Maclean2018-06-261-1/+1
| | | | | | | Have mktplinkfw fill in the rootfs offset so the firmware splitter can find it without aligning to erase blocks. Signed-off-by: Alex Maclean <monkeh@monkeh.net>
* ramips: Add support for Mikrotik RouterBOARD RBM33gTobias Schramm2018-06-211-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit adds support for the Mikrotik RouterBOARD RBM33g. =Hardware= The RBM33g is a mt7621 based device featuring three gigabit ports, 2 miniPCIe slots with sim card sockets, 1 M.2 slot, 1 USB 3.0 port and a male onboard RS-232 serial port. Additionally there are a lot of accessible GPIO ports and additional buses like i2c, mdio, spi and uart. ==Switch== The three Ethernet ports are all connected to the internal switch of the mt7621 SoC: port 0: Ethernet Port next to barrel jack with PoE printed on it port 1: Innermost Ethernet Port on opposite side of RS-232 port port 2: Outermost Ethernet Port on opposite side of RS-232 port port 6: CPU ==Flash== The device has two spi flash chips. The first flash chips is rather small (512 kB), connected to CS0 by default and contains only the RouterBOOT bootloader and some factory information (e.g. mac address). The second chip has a size of 16 MB, is by default connected to CS1 and contains the firmware image. ==PCIe== The board features three PCIe-enabled slots. Two of them are miniPCIe slots (PCIe0, PCIe1) and one is a M.2 (Key M) slot (PCIe2). Each of the miniPCIe slots is connected to a dedicated mini SIM socket on the back of the board. Power to all three PCIe-enabled slots is controlled via GPIOs on the mt7621 SoC: PCIe0: GPIO9 PCIe1: GPIO10 PCIe2: GPIO11 ==USB== The board has one external USB 3.0 port at the rear. Additionally PCIe port 0 has a permanently enabled USB interface. PCIe slot 1 shares its USB interface with the rear USB port. Thus only either the rear USB port or the USB interface of PCIe slot 1 can be active at the same time. The jumper next to the rear USB port controls which one is active: open: USB on PCIe 1 is active closed: USB on rear USB port is active ==Power== The board can accept both, passive PoE and external power via a 2.1 mm barrel jack. The input voltage range is 11-32 V. =Installation= ==Prerequisites== A USB -> RS-232 Adapter and a null modem cable are required for installation. To install an OpenWRT image to the device two components must be built: 1. A openwrt initramfs image 2. A openwrt sysupgrade image ===initramfs & sysupgrade image=== Select target devices "Mikrotik RBM33G" in openwrt menuconfig and build the images. This will create the images "openwrt-ramips-mt7621-mikrotik_rbm33g-initramfs-kernel.bin" and "openwrt-ramips-mt7621-mikrotik_rbm33g-squashfs-sysupgrade.bin" in the output directory. ==Installing== **Make sure to back up your RouterOS license in case you do ever want to go back to RouterOS using "/system license output" and back up the created license file.** Serial settings: 115200 8N1 The installation is a two-step process. First the "openwrt-ramips-mt7621-mikrotik_rbm33g-initramfs-kernel.bin" must be booted via tftp: 1. Set up a dhcp server that points the bootfile to tftp server serving the "openwrt-ramips-mt7621-mikrotik_rbm33g-initramfs-kernel.bin" initramfs image 2. Connect to WAN port (left side, next to sys-LED and power indicator) 3. Connect to serial port of board 4. Power on board and enter RouterBOOT setup menu 5. Set boot device to "boot over ethernet" 6. Set boot protocol to "dhcp protocol" (can be omitted if DHCP server allows dynamic bootp) 6. Save config 7. Wait for board to boot via Ethernet On the serial port you should now be presented with the OpenWRT boot log. The next steps will install OpenWRT persistently. 1. Copy "openwrt-ramips-mt7621-mikrotik_rbm33g-squashfs-sysupgrade.bin" to the device using scp. 2. Write openwrt to flash using "sysupgrade openwrt-ramips-mt7621-mikrotik_rbm33g-squashfs-sysupgrade.bin" Once the flashing completes reboot the router and let it boot from flash. It should boot straight to OpenWRT. Signed-off-by: Tobias Schramm <tobleminer@gmail.com>
* ramips: add support for ELECOM WRC-1167GHBK2-SINAGAKI Hiroshi2018-06-191-0/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ELECOM WRC-1167GHBK2-S is a 2.4/5 GHz band 11ac router, based on MediaTek MT7621A. Specification: - MT7621A (2-Cores, 4-Threads) - 128 MB of RAM (DDR3) - 16 MB of Flash (SPI) - 2T2R 2.4/5 GHz - MediaTek MT7615D - 5x 10/100/1000 Mbps Ethernet - 6x LEDs, 2x keys - UART header on PCB - Vcc, GND, TX, RX from ethernet port side - baudrate: 57600 bps Flash instruction using factory image: 1. Rename the factory image to "wrc-1167ghbk2-s_v0.00.bin" 2. Connect the computer to the LAN port of WRC-1167GHBK2-S 3. Connect power cable to WRC-1167GHBK2-S and turn on it 4. Access to "http://192.168.2.1/details.html" and open firmware update page ("手動更新(アップデート)") 5. Select the factory image and click apply ("適用") button 6. Wait ~150 seconds to complete flashing Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
* ramips: mt7621: fix wireless package selectionMathias Kresin2018-06-191-5/+4
| | | | | | | Add wpad-mini if wireless drivers are included. Drop the mt76 package if both of the provided drivers are included with their own packages. Signed-off-by: Mathias Kresin <dev@kresin.me>
* ramips: add support for I-O DATA WN-GX300GRINAGAKI Hiroshi2018-06-081-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I-O DATA WN-GX300GR is a 2.4 GHz band 11n router, based on MediaTek MT7621S. Specification: - MT7621S (1-Core, 2-Threads) - 64 MB of RAM - 8 MB of Flash (SPI) - 2T2R 2.4 GHz - 5x 10/100/1000 Mbps Ethernet - 2x LEDs, 4x keys (2x buttons, 1x slide switch) - UART header on PCB - Vcc, GND, TX, RX from ethernet port side - baudrate: 115200 bps (U-Boot, OpenWrt) Flash instruction using initramfs image: 1. Connect serial cable to UART header 2. Rename OpenWrt initramfs image for WN-GX300GR to "uImageWN-GX300GR" and place it in the TFTP directory 3. Set the IP address of the computer to 192.168.99.8, connect to the LAN port of WN-GX300GR, and start the TFTP server on the computer 4. Connect power cable to WN-GX300GR and turn on the router 5. Press "1" key on the serial console to interrupt boot process on U-Boot, press Enter key 3 times and start firmware download via TFTP 6. WN-GX300GR downloads initramfs image and boot with it 7. On the initramfs image, execute "mtd erase firmware" to erase stock firmware and execute sysupgrade with sysupgrade image for WN-GX300GR 8. Wait ~150 seconds to complete flasing Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
* ramips: Use generic board detect for GnuBee devicesRosen Penev2018-05-301-2/+2
| | | | | | | | | | | This is a port of an old commit from mkresin's tree: 09260cdf3e9332978c2a474a58e93a6f2b55f4a8 This has the potential to break sysupgrade but it should be fine as there is no stable release of LEDE or OpenWrt that support these devices. Signed-off-by: Rosen Penev <rosenp@gmail.com>
* ramips: add support for mqmaker witi 512mb versionDavide Ammirata2018-05-071-4/+15
| | | | | | | | | | | | Splitted out the dts file and create the new dts for the 256 MByte RAM and the 512 MB RAM version. Migrate both versions to the common board detection. The install the 512 MByte Version on a board running the 256 MByte image, a forceful sysupgrade with the -F flag is required. Signed-off-by: Davide Ammirata <list@davidea.it>
* ramips: add support for the YouHua WR1200JSZheng Qian2018-04-081-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | YouHua tech WR1200JS is an AC1200 router with 5 1Gb ports (4 Lan, 1 Wan) and 1 USB 2.0 port. Devices is base on MediaTek MT7621AT + MT7603E + MT7612E. Specification: - MT7612AT (880 MHz) - 128 MB of RAM - 16 MB of FLASH (SPI NOR) - 5x 10/100/1000 Mbps Ethernet - 2T2R 2.4 GHz (MT7603E) - 2T2R 5 GHz (MT7612E) - 1x USB 2.0 - 10x LED (Power 2G 5G WPS Internet LAN4-1 USB) - 3x button (reset wifi wps) - DC jack for main power input (12V) Installation: 1.) Press reset key 5 sec and restore the factory default 2.) Login webUI and change username to root and set a new password 3.) Visit http://192.168.2.254/adm/telnetd.shtml and turn on the telnet service 4.) Copy openwrt-ramips-mt7621-youhua_wr1200js-initramfs-kernel.bin to a usb pan 5.) Plug the usb pan to the router, telnet to the router and login by root 6.) cd /media/sda1 and check the initramfs file is there 7.) exec command: mtd_write write openwrt-ramips-mt7621-youhua_wr1200js-initramfs-kernel.bin Kernel 8.) reboot and visit 192.168.1.1 Signed-off-by: Zheng Qian <sotux82@gmail.com>
* ramips: mt7621: add Mediatek AP-MT7621A-V60 EVB supportRoman Yeryomin2018-02-241-0/+8
| | | | | | | | | | | | | | | | | | | | This board has: - mt7621 SoC - 8MB SPI flash - 128MB RAM - 5x ethernet ports from internal (SoC) switch - 1x ethernet port sitting on gmac2 and IC+ phy (not yet supported) - 3x PCIe slots - 1x USB 2.0 and 1x USB 3.0 - sound based on wm8960 - SDXC card slot (full size) First fw write from interactive u-boot menu, interrupt with 2. After that sysupgrade. Tested both with 4.9 and 4.14 Signed-off-by: Roman Yeryomin <roman@advem.lv>
* ramips: improve GnuBee Personal Cloud Two supportMathias Kresin2018-02-201-2/+2
| | | | | | | | | | | | | | | | | | Use the generic board detection for the GnuBee Personal Cloud Two instead of the target specific one as all recent additions are doing. Fixup the pinmux to set all pins used as GPIO to the function GPIO. Request pins where used. Drop the i2c from the dts. There is nothing connected. While at it fix an indentation issue and use references instead of duplicating the whole node path. Use the same switch config as for the GB-PC1 and drop the led trigger for the not supported IP1001 phy connected to second rgmii. Fixes: c60a21532bc9 ("ramips: Add support for the GnuBee Personal Cloud Two") Signed-off-by: Mathias Kresin <dev@kresin.me>
* ramips: Add support for the GnuBee Personal Cloud TwoRosen Penev2018-02-131-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The GnuBee Personal Cloud Two crowdfunded on https://www.crowdsupply.com It is a low-cost, low-power, network-attached storage device. Specifications: - SoC: MediaTek MT7621AT - RAM: DDR3 512 MB - Flash: 32 MB - Six SATA ports for 3.5" Drives - One SDcard - One USB 3.0 - Two USB 2.0 - Gigabit Ethernet: Three Ports - UART 3.5mm Audio Jack or 3 pin header - 57600 8N1 - Three GPIOs available on a pin header Flash instructions: The GnuBee Personal Cloud Two ships with libreCMC installed. libreCMC is a Free Software Foundation approved fork of LEDE/OpenWrt. As such one can upgrade using the webinterface or sysupgrade. Das U-Boot has multiple options for recovery or updates including : - USB - http - tftp Errata: - While there are three ethernet ports, the third requires support for the second GMAC. This will come in kernel 4.14. - The first hard drive slot has a clearance issue with the two fan headers. Workaround is to pull the headers out and connect the pins to jumper wires. - Using this device as a NAS is problematic with the 4.9 kernel as many /dev/sdX reads throw silent errors. The current theory behind this is some kind of unhandled DMA mapping error in the kernel. This is not an issue with kernel 4.4. Signed-off-by: L. D. Pinney <ldpinney@gmail.com> Signed-off-by: Rosen Penev <rosenp@gmail.com>
* ramips: add support for newifi d2Jackson Ming Hu2017-12-211-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | Previously Newifi D2 could only use PandoraBox M1's firmware. It works fine, but LED GPIO is different. As a result, a separated DTS file for this device should be implemented. Hardware spec: * CPU: MTK MT7621A * RAM: 512MB * ROM: 32MB SPI Flash * WiFi: MTK MT7603+MT7612 * Button: 2 buttons (reset, wps) * LED: 3 single-color LEDs (USB, WiFi 2.4GHz, WiFi 5GHz) & 2 dual-color LEDs (Power, Internet) * Ethernet: 5 ports, 4 LAN + 1 WAN Installation method: Same as Newifi D1, users may need to request unlock code from the device manufacturer. Otherwise, a SPI flash programmer may be necessary to get the firmware flashed. After the device is unlocked, press and hold reset button before power cable plugs in. Then go to http://192.168.1.1 to upload and flash the firmware package. Signed-off-by: Jackson Ming Hu <huming2207@gmail.com>
* ramips: sync image filename with boardnameMathias Kresin2017-12-211-3/+2
| | | | | | | | | | | | | Use <manufacturer>_<modelname> as image name for board using the devicetree compat string as boardname. Replace the underline of the device define, to keep the SUPPORTED_DEVICES in sync with a devicetree compat string based boardname. Override the default SUPPORTED_DEVICES for board which are having an userspace boardname with an underline. Signed-off-by: Mathias Kresin <dev@kresin.me>
* ramips: fallback to generic board detectMathias Kresin2017-12-211-1/+1
| | | | | | | Fallback to the generic board detection if no case for the current board exists. Signed-off-by: Mathias Kresin <dev@kresin.me>
* ramips: add support for ZBT WE3526Felix Fietkau2017-11-161-0/+11
| | | | | | | | | | | | | | | | | This is a variant of the ZBT WG3526 with a few minor modifications. The wifi chips are swapped, and there is no GPIO controllable status LED. There is also no SATA port. Specifications: - MT7621AT (880 MHz) - 512 MB RAM - 16 MB Flash (SPI NOR) - 5x 1Gbps Ethernet (built-in switch) - MT7612E 802.11ac 5 GHz WLAN - MT7603E 802.11n 2.4 GHz WLAN Signed-off-by: Felix Fietkau <nbd@nbd.name>
* ramips: add support for UniElec U7621-06Piotr Dymacz2017-11-141-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | UniElec U7621-06 is a router platform board based on MediaTek MT7621AT. The device has the following specifications: - MT7621AT (880 MHz) - 256/512 MB of RAM (DDR3) - 8/16/32/64 MB of FLASH (SPI NOR) - 5x 1 Gbps Ethernet (MT7621 built-in switch) - 1x ASMedia ASM1061 (for mSATA and SATA) - 2x miniPCIe slots (PCIe bus only) - 1x mSATA slot (with USB 2.0 bus for modem) - 1x SATA - 1x miniSIM slot - 1x microSD slot - 1x USB 3.0 - 12x LEDs (3 GPIO-controlled) - 1x reset button - 1x UART header (4-pins) - 1x GPIO header (30-pins) - 1x FPC connector for LEDs (20-pin, 0.5 mm pitch) - 1x DC jack for main power (12 V) The following has been tested and is working: - Ethernet switch - miniPCIe slots (tested with Wi-Fi cards) - mSATA slot (tested with modem and mSATA drive) - miniSIM slot - sysupgrade - reset button - microSD slot Installation: This board might come with a different firmware versions (MediaTek SDK, PandoraBox, Padavan, etc.). If your board comes with PandoraBox, you can install LEDE using sysupgrade. Just SSH to the router and perform forced sysupgrade (due to a board name mismatch). The default IP of this board should be: 192.168.1.1 and username/password: root/admin. In case of a different firmware, you can use web based recovery described below. Use the following command to perform the sysupgrade (for the 256MB RAM/16MB flash version): sysupgrade -n -F lede-ramips-mt7621-u7621-06-256M-16M-squashfs-sysupgrade.bin Recovery: This board contains a Chinese, closed-source bootloader called Breed (Boot and Recovery Environment for Embedded Devices). Breed supports web recovery and to enter it, you keep the reset button pressed for around 5 seconds during boot. Your machine will be assigned an IP through DHCP and the router will use IP address 192.168.1.1. The recovery website is in Chinese, but is easy to use. Click on the second item in the list to access the recovery page, then the second item on the next page is where you select the firmware. In order to start the recovery, you click the button at the bottom. LEDs list (top row, left to right): - LED_WWAN# (connected with pin 42 in LTE/mSATA slot) - Power (connected directly to 3V3) - CTS2_N (GPIO10, configured as "status" LED) - TXD2 (GPIO11, configured as "led4", without default trigger) - RXD2 (GPIO12, configured as "led5", without default trigger) - LED_WLAN# (connected with pin 44 in wifi0 slot) LEDs list (bottom row, left to right): - ESW_P0_LED_0 - ESW_P1_LED_0 - ESW_P2_LED_0 - ESW_P3_LED_0 - ESW_P4_LED_0 - LED_WLAN# (connected with pin 44 in wifi1 slot) Other notes: 1. The board is available with different amounts of RAM and flash. We have only added support for the 256/16 MB configuration, as that seems to be the default. However, all the required infrastructure is in place for making support for the other configurations easy. 2. The manufacturer offers five different wireless cards with MediaTek chipsets, based on MT76x2, MT7603 and MT7615. Images of the board all show that the miniPCIe slots are dedicated to specific Wi-Fi cards. However, the slots are generic. 3. All boards we got access to had the same EEPROM content. The default firmware reads the Ethernet MAC from offset 0xe000 in factory partition. This offset only contains 0xffs, so a random MAC will be generated on every boot of the router. There is a valid MAC stored at offset 0xe006 and this MAC is shown as the WAN MAC in the bootloader. However, it is the same on all boards we have checked. Based on information provided by the vendor, all boards sold in small quantities are considered more as samples for development purposes. Signed-off-by: Piotr Dymacz <pepe2k@gmail.com> Signed-off-by: Kristian Evensen <kristian.evensen@gmail.com>
* ramips: improve Xiaomi Mi Router 3G supportKevin Darbyshire-Bryant2017-09-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit improves support for the Xiaomi Mi Router 3G originally added in commit 6e283cdc0da25928f8148805ebef7f8f2b769ee8 Improvements: - Remove software watchdog as hardware watchdog now working as per commit 3fbf3ab44f5cebb22e30a4c8681b13341feed6a6 for all mt7621 devices. - Reset button polarity corrected - length of press determines reboot (short press) vs. reset to defaults (long press) behaviour. - Enable GPIO amber switch port LEDs on board rear - lit indicates 1Gbit link and blink on activity. Green LEDs driven directly by switch indicating any link speed and tx activity. - USB port power on/off GPIO exposed as 'usbpower' - Add access to uboot environment settings for checking/setting uboot boot order preference from user space. Changes: - Front LED indicator is physically made of independent Yellow/Amber, Red & Blue LEDs combined via a plastic 'lightpipe' to a front panel indicator, hence the colour behaviour is similar to an RGB LED. RGB LEDs are not supported at this time because they produce colour results that do not then match colour labels, e.g. enabling 'mir3g:red' and 'mir3g:blue' would result in a purple indicator and we have no such label for purple. The yellow, red & blue LEDs have been split out as individual yellow, red & blue status LEDs, with yellow being the default status LED as before and with red's WAN and blue's USB default associations removed. - Swapped order of vlan interfaces (eth0.1 & eth0.2) to match stock vlan layout. eth0.1 is LAN, eth0.2 is WAN - Add 'lwlll' vlan layout to mt7530 switch driver to prevent packet leakage between kernel switch init and uci swconfig uboot behaviour & system 'recovery' uboot expects to find bootable kernels at nand addresses 0x200000 & 0x600000 known by uboot as "system 1" and "system 2" respectively. uboot chooses which system to hand control to based on 3 environment variables: flag_last_success, flag_try_sys1_failed & flag_try_sys2_failed last_success represents a preference for a particular system and is set to 0 for system 1, set to 1 for system 2. last_success is considered *if* and only if both try_sys'n'_failed flags are 0 (ie. unset) If *either* failed flags are set then uboot will attempt to hand control to the non failed system. If both failed flags are set then uboot will check the uImage CRC of system 1 and hand control to it if ok. If the uImage CRC of system is not ok, uboot will hand control to system 2 irrespective of system 2's uImage CRC. NOTE: uboot only ever sets failed flags, it *never* clears them. uboot sets a system's failed flag if that system's was selected for boot but the uImage CRC is incorrect. Fortunately with serial console access, uboot provides the ability to boot an initramfs image transferred via tftp, similarly an image may be flashed to nand however it will flash to *both* kernels so a backup of stock kernel image is suggested. Note that the suggested install procedure below set's system 1's failed flag (stock) thus uboot ignores the last_success preference and boots LEDE located in system 2. Considerable thought has gone into whether LEDE should replace both kernels, only one (and which one) etc. LEDE kernels do not include a minimal rootfs and thus unlike the stock kernel cannot include a method of controlling uboot environment variables in the event of rootfs mount failure. Similarly uboot fails to provide an external mechanism for indicating boot system failure. Installation - from stock. Installation through telnet/ssh: - copy lede-ramips-mt7621-mir3g-squashfs-kernel1.bin and lede-ramips-mt7621-mir3g-squashfs-rootfs0.bin to usb disk or wget it from LEDE download site to /tmp - switch to /extdisks/sda1/ (if copied to USB drive) or to /tmp if wgetted from LEDE download site - run: mtd write lede-ramips-mt7621-mir3g-squashfs-kernel1.bin kernel1 - run: mtd write lede-ramips-mt7621-mir3g-squashfs-rootfs0.bin rootfs0 - run: nvram set flag_try_sys1_failed=1 - run: nvram commit - run: reboot Recovery - to stock. Assuming you used the above installation instructions you will have a stock kernel image in system 1. If it can be booted then it may be used to perform a stock firmware recovery, thus erasing LEDE completely. From a 'working' LEDE state (even failsafe) Failsafe only: - run: mount_root - run: sh /etc/uci-defaults/30_uboot-envtools Then do the steps for 'All' All: - run: fw_setenv flag_try_sys2_failed 1 - run: reboot The board will reboot into system 1 (stock basic kernel) and wait with system red light slowly blinking for a FAT formatted usb stick with a recovery image to be inserted. Press and hold the reset button for around 1 second. Status LED will turn yellow during recovery and blue when recovery complete. Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
* ramips: add Xiaomi Mi Router 3G supportPavel Kubelun2017-08-231-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit adds support for Xiaomi Mi WiFi Router 3G. Short specification: - MT7621AT + MT7603EN + 7612EN - 256MB DDR3 RAM - 128MB NAND flash - 1+2 x 1000M Ethernet - 1x USB 3.0 port - reset button - yellow, blue, red leds Installation through telnet/ssh: - copy lede-ramips-mt7621-mir3g-squashfs-kernel1.bin and lede-ramips-mt7621-mir3g-squashfs-rootfs0.bin to usb disk or wget it from LEDE download site to /tmp - switch to /extdisks/sda1/ (if copied to USB drive) or to /tmp if wgetted from LEDE download site - run: mtd write lede-ramips-mt7621-mir3g-squashfs-kernel1.bin kernel1 - run: mtd write lede-ramips-mt7621-mir3g-squashfs-rootfs0.bin rootfs0 - run: mtd erase kernel0 - run: reboot Originally stock firmware has following partitions: - ... - kernel0 (primary kernel image) - kernel1 (secondary kernel image, used by u-boot in failsafe routine) - rootfs0 (primary rootfs) - rootfs1 (secondary rootfs in case primary fails) - overlay (used as ubi overlay) This commit squashes rootfs0, rootfs1 and overlay partitions into 1, so it can be used by LEDE fully for package installation, resulting in 117,5MiB. This device lacks hw watchdog, so adding softdog instead (stock does the same). Signed-off-by: Pavel Kubelun <be.dissent@gmail.com>