1. 04 Mar, 2020 2 commits
    • Adrian Schmutzler's avatar
      ramips: add support for NETGEAR R6700v2/AC2400 · 6e80df5e
      Adrian Schmutzler authored
      SoC: MediaTek MT7621AT
      RAM: 256M DDR3
      FLASH: 128M NAND
      WiFi: MediaTek MT7615N an+ac
      MediaTek MT7615N bgn
      ETH: MediaTek MT7621AT
      BTN: 1x Connect (WPS), 1x WLAN, 1x Reset
      LED: Power (white/amber), WAN(white/amber), 2.4G(white), 5G(white),
      USB(white) , GuestWifi(white) 4x LAN(white/amber), Wifi Button(white),
      WPS Button(white)
      
      Installation:
      
      Login to netgear webinterface and flash factory.img
      
      Based on a discontinued GitHub Pull Request by
      kuyokushin <codenamezero@protonmail.com>
      
      https://github.com/openwrt/openwrt/pull/2545
      
      NOTE: Netgear R6700 v2 have five clones: R6900 v2, R7450, Nighthawk
      AC2400, Nighthawk AC2100 and already added R6800. Rest of them  should
      be really easy supportable. Image for R6700v2 should work perfectly with
      them. Please refer:
      
      https://github.com/openwrt/openwrt/pull/2614
      
      
      
      Tested-by: Víctor Gibrán <victorgibranmz@hotmail.com> [R6700v2]
      Tested-by: John Landrum <jl31m10@yahoo.com> [AC2400]
      Signed-off-by: default avatarAdrian Schmutzler <freifunk@adrianschmutzler.de>
      [add guest led to mt7621_netgear_r6700-v2.dts end edit commit message]
      Signed-off-by: default avatarPawel Dembicki <paweldembicki@gmail.com>
      6e80df5e
    • Pawel Dembicki's avatar
      ramips: mt7621: add support for Netgear R6800 · 4e931720
      Pawel Dembicki authored
      
      
      This patch adds support for the Netgear R6800, aka Netgear AC1900 and
      R6800-100PES.
      
      Specification:
      - SoC: MediaTek MT7621AT (880 MHz)
      - Flash: 128 MiB NAND
      - RAM: 256 MiB
      - Wireless: MediaTek MT7615EN b/g/n , MediaTek MT7615EN an+ac
      - LAN speed: 10/100/1000
      - LAN ports: 4
      - WAN speed: 10/100/1000
      - WAN ports: 1
      - USB 2.0
      - USB 3.0
      - Serial baud rate of Bootloader and factory firmware: 57600
      
      Known issues:
      - Device has 3 wifi LEDs: Wifi 5Ghz, Wifi 2.4Ghz and Wifi on/off.
        Wifi on/off is not used.
      
      Installation:
      - apply factory image via stock web-gui.
      
      Back to stock:
      - nmrpflash can be used to recover to the stock Netgear firmware.
      Signed-off-by: default avatarPawel Dembicki <paweldembicki@gmail.com>
      4e931720
  2. 07 Feb, 2020 2 commits
  3. 05 Feb, 2020 2 commits
    • INAGAKI Hiroshi's avatar
      ramips: add support for I-O DATA WN-AX1167GR2 · 867db0a2
      INAGAKI Hiroshi authored
      I-O DATA WN-AX1167GR2 is a 2.4/5 GHz band 11ac router, based on MediaTek
      MT7621A.
      
      Specification:
      
      - SoC		: MediaTek MT7621A
      - RAM		: DDR3 128 MiB
      - Flash		: NAND 128 MiB
      - WLAN		: MediaTek MT7615D (2.4/5 GHz, 2T2R)
      - Ethernet	: 5x 10/100/1000 Mbps
        - Switch	: MediaTek MT7621A (MT7530)
      - LEDs/Input	: 2x/3x (2x buttons, 1x slide-switch)
      - UART		: through-hole on PCB
        - J5: Vcc, TX, RX, NC, GND
        - 57600 bps
      
      Flash instruction using initramfs image:
      
      1. Boot WN-AX1167GR2 normally
      2. Access to "http://192.168.0.1/
      
      " and open firmware update page
      ("ファームウェア")
      3. Select the OpenWrt initramfs image and click update ("更新")
      button to perform firmware update
      4. On the initramfs image, perform sysupgrade with squashfs-sysupgrade
      image
      5. Wait ~120 seconds to complete flashing
      
      Notes:
      
      - configuration in DeviceTree of DBDC (Dual-Band-Dual-Concurrent) mode
      for MT7615D chip is not supported in mt76 driver
      - last 0x80000 (512 KiB) in NAND flash is not used on stock firmware
      - stock firmware requires "customized uImage header" by MSTC
      (MitraStar Technology Corp.), but U-Boot doesn't
        - uImage magic (0x0 - 0x3) : 0x434F4D42 (COMB)
        - header crc32 (0x4 - 0x7) : with data length and data crc32
        - image name (0x20 - 0x37) : model ID and firmware versions
        - data length (0x38 - 0x3b): kernel + rootfs
        - data crc32 (0x3c - 0x3f) : kernel + rootfs
      Signed-off-by: default avatarINAGAKI Hiroshi <musashino.open@gmail.com>
      Reviewed-by: default avatarSungbo Eo <mans0n@gorani.run>
      867db0a2
    • INAGAKI Hiroshi's avatar
      ramips: add support for I-O DATA WN-DX1167R · 3c0e2aa6
      INAGAKI Hiroshi authored
      I-O DATA WN-DX1167R is a 2.4/5 GHz band 11ac rotuer, based on MediaTek
      MT7621A.
      
      Specification:
      
      - SoC		: MediaTek MT7621A
      - RAM		: DDR3 128 MiB
      - Flash		: NAND 128 MiB
      - WLAN		: MediaTek MT7615D (2.4/5 GHz, 2T2R)
      - Ethernet	: 5x 10/100/1000 Mbps
        - Switch	: MediaTek MT7621A (MT7530)
      - LEDs/Input	: 2x/3x (2x buttons, 1x slide-switch)
      - UART		: through-hole on PCB
        - J5: Vcc, TX, RX, NC, GND
        - 57600 bps
      
      Flash instruction using initramfs image:
      
      1. Boot WN-DX1167R normally
      2. Access to "http://192.168.0.1/
      
      " and open firmware update page
      ("ファームウェア")
      3. Select the OpenWrt initramfs image and click update ("更新")
      button to perform firmware update
      4. On the initramfs image, perform sysupgrade with squashfs-sysupgrade
      image
      5. Wait ~120 seconds to complete flashing
      
      Notes:
      
      - configuration in DeviceTree of DBDC (Dual-Band-Dual-Concurrent) mode
      for MT7615D chip is not supported in mt76 driver
      - last 0x80000 (512 KiB) in NAND flash is not used on stock firmware
      - stock firmware requires "customized uImage header" by MSTC
      (MitraStar Technology Corp.), but U-Boot doesn't
        - uImage magic (0x0 - 0x3) : 0x434F4D43 (COMC)
        - header crc32 (0x4 - 0x7) : with data length and data crc32
        - image name (0x20 - 0x37) : model ID and firmware versions
        - data length (0x38 - 0x3b): kernel + rootfs
        - data crc32 (0x3c - 0x3f) : kernel + rootfs
      Signed-off-by: default avatarINAGAKI Hiroshi <musashino.open@gmail.com>
      Reviewed-by: default avatarSungbo Eo <mans0n@gorani.run>
      3c0e2aa6
  4. 14 Nov, 2019 1 commit
    • Piotr Dymacz's avatar
      ramips: add support for ALFA Network Quad-E4G · e68539ac
      Piotr Dymacz authored
      
      
      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/100 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)
      
      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: default avatarPiotr Dymacz <pepe2k@gmail.com>
      e68539ac
  5. 02 Nov, 2019 1 commit
    • Adrian Schmutzler's avatar
      ramips: split base-files into subtargets · 19724e28
      Adrian Schmutzler authored
      
      
      While most of the target's contents are split into subtargets, the
      base-files are maintained for the target as a whole.
      
      However, OpenWrt already implements a mechanism that will use (and
      even prefer) files in the subtargets' directories. This can be
      exploited to make several scripts subtarget-specific and thus save
      some space.
      
      In certain cases, keeping files in parent (=target) base-files was
      more convenient, and thus no splitting was performed for those.
      
      Note that this will increase overall code lines, but reduce code
      per subtarget.
      
      base-files ipk size reduction:
      master (mt7621)   60958 B
      split (mt7620)    46358 B (- 14.3 kiB)
      split (mt7621)    48759 B (- 11.9 kiB)
      split (mt76x8)    44948 B (- 15.6 kiB)
      split (rt288x)    43508 B (- 17.0 kiB)
      split (rt305x)    45616 B (- 15.0 kiB)
      split (rt3883)    44176 B (- 16.4 kiB)
      
      Run-tested on:
      GL.iNet GL-MT300N-V2 (mt76x8)
      D-Link DWR-116 (mt7620)
      Signed-off-by: default avatarAdrian Schmutzler <freifunk@adrianschmutzler.de>
      19724e28
  6. 24 Oct, 2019 1 commit
    • Gabor Varga's avatar
      ramips: add support for Asus RT-AC65P · 7c5f712e
      Gabor Varga authored
      
      
      The Asus RT-AC65P router is identical with the RT-AC85P, but better to make separate images for it.
      
      On both routers the installation can be done also via SSH:
      
      Note: The 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 factory image via scp:
       > scp openwrt-ramips-mt7621-asus_rt-ac65p-squashfs-factory.bin admin@192.168.50.1:/tmp
      4. Connect via SSH to the router.
       > ssh admin@192.168.50.1
      5. Write the OpenWrt image to flash.
       > mtd-write -i
      /tmp/openwrt-ramips-mt7621-asus_rt-ac65p-squashfs-factory.bin -d linux
      6. Reboot the router
       > reboot
      
      Changelog:
      
      v3: removed [] from filename, rebased to latest master
      v2: Rebased to latest master
      v1: Initial release
      Signed-off-by: default avatarGabor Varga <vargagab@gmail.com>
      7c5f712e
  7. 20 Sep, 2019 1 commit
    • Birger Koblitz's avatar
      ramips: add support for Asus RT-AC85P · fde8e2e0
      Birger Koblitz authored
      
      
      SoC:	MediaTek MT7621AT dual-core @ 880MHz
      RAM:	256M (Winbond W632GG6KB-1)
      FLASH:	128MB (Macronix MX30LF1G18AC-TI)
      WiFi:	- 2.4GHz MediaTek MT7615N bgn
      	- 5GHz MediaTek MT7615N nac
      Switch: SoC integrated Gigabit Switch (4 x LAN, 1 x WAN)
      USB:	1 x USB 3.1 (Gen 1)
      BTN:	Reset, WPS
      LED:	- Power (blue)
      	- 5Ghz (blue)
      	- 2.4GHz (blue)
      	- Internet (blue)
      	- 4x LAN (blue)
      	(LAN/WAN leds are not controllable by GPIOs)
      UART: 	UART is present as Pads marked J4 on the PCB.
      	3.3V - TX - RX - GND / 57600-8N1
      	3.3V is the square pad
      MAC:	The MAC address on the router-label matches the MAC of
      	the 2.4 GHz WiFi.
      	LAN and WAN MAC are identical: MAC_LABEL+4
      	5 GHz WiFi MAC: also MAC_LABEL+4
      
      Installation
      ------------
      Via U-Boot tftpd:
      Switch on device, within 2s press reset button and keep pressed
      until power LED starts blinking slowly.
      Upload factory image via tftp put, the router's ip is 192.168.1.1
      and expects the client on 192.168.1.75.
      
      The images also work on the Asus RT-AC65P models as tested by Gabor.
      Signed-off-by: default avatarBirger Koblitz <mail@birger-koblitz.de>
      Tested-by: default avatarGabor Varga <vargagab@gmail.com>
      [fixed Asus -> ASUS in DTS]
      Signed-off-by: default avatarPetr Štetiar <ynezz@true.cz>
      fde8e2e0
  8. 31 Aug, 2019 1 commit
  9. 22 Jul, 2019 1 commit
  10. 17 Jul, 2019 1 commit
  11. 16 Jul, 2019 1 commit
    • Rafał Miłecki's avatar
      ramips: get rid of platform_pre_upgrade() · d9593b08
      Rafał Miłecki authored
      
      
      The only step between platform_pre_upgrade() and platform_do_upgrade()
      is switching to ramdisk. It should be fine to "mtd erase firmware" from
      the later callback and get rid of the first one.
      
      This change wasn't tested on affected target but identical code logic
      was verified to work as expected on brcm47xx with initramfs firmware.
      Signed-off-by: default avatarRafał Miłecki <rafal@milecki.pl>
      d9593b08
  12. 10 Jul, 2019 2 commits
  13. 20 Mar, 2019 1 commit
  14. 13 Mar, 2019 1 commit
    • Ozgur Can Leonard's avatar
      ramips: add support for Xiaomi Mi Router 3 Pro · d0090339
      Ozgur Can Leonard authored
      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: default avatarOzgur Can Leonard <ozgurcan@gmail.com>
      Signed-off-by: default avatarChristian Lamparter <chunkeey@gmail.com>
      [02_network remaps, Added link to notes]
      d0090339
  15. 26 Jan, 2019 1 commit
    • David Bauer's avatar
      ramips: add support for Archer C50 v4 · 01dcd574
      David Bauer authored
      
      
      This adds support for the TP-Link Archer C50 v4.
      It uses the same hardware as the v3 variant, sharing the same FCC-ID.
      
      CPU:   MediaTek MT7628 (580MHz)
      RAM:   64M DDR2
      FLASH: 8M SPI
      WiFi:  2.4GHz 2x2 MT7628 b/g/n integrated
      WiFI:  5GHz 2x2 MT7612 a/n/ac
      ETH:   1x WAN 4x LAN
      LED:   Power, WiFi2, WiFi5, LAN, WAN, WPS
      BTN:   WPS/WiFi, RESET
      UART:  Near ETH ports, 115200 8n1, TP-Link pinout
      
      Create Factory image
      --------------------
      As all installation methods require a U-Boot to be integrated into the
      Image (and we do not ship one with the image) we are not able to create
      an image in the OpenWRT build-process.
      
      Download a TP-Link image from their Wesite and a OpenWRT sysupgrade
      image for the device and build yourself a factory image like following:
      
      TP-Link image:             tpl.bin
      OpenWRT sysupgrade image:  owrt.bin
      
       > dd if=tpl.bin of=boot.bin bs=131584 count=1
       > cat owrt.bin >> boot.bin
      
      Installing via Web-UI
      ---------------------
      Upload the boot.bin via TP-Links firmware upgrade tool in the
      web-interface.
      
      Installing via Recovery
      -----------------------
      Activate Web-Recovery by beginning the upgrade Process with a
      Firmware-Image from TP-Link. After starting the Firmware Upgrade,
      wait ~3 seconds (When update status is switching to 0%), then
      disconnect the power supply from the device. Upgrade flag (which
      activates Web-Recovery) is written before the OS-image is touched and
      removed after write is succesfull, so this procedure should be safe.
      
      Plug the power back in. It will come up in Recovery-Mode on 192.168.0.1.
      When active, all LEDs but the WPS LED are off.
      Remeber to assign yourself a static IP-address as DHCP is not active in
      this mode.
      
      The boot.bin can now be uploaded and flashed using the web-recovery.
      
      Installing via TFTP
      -------------------
      Prepare an image like following (Filenames from factory image steps
      apply here)
      
       > dd if=/dev/zero of=tp_recovery.bin bs=196608 count=1
       > dd if=tpl.bin of=tmp.bin bs=131584 count=1
       > dd if=tmp.bin of=boot.bin bs=512 skip=1
       > cat boot.bin >> tp_recovery.bin
       > cat owrt.bin >> tp_recovery.bin
      
      Place tp_recovery.bin in root directory of TFTP server and listen on
      192.168.0.66/24.
      
      Connect router LAN ports with your computer and power up the router
      while pressing the reset button. The router will download the image via
      tftp and after ~1 Minute reboot into OpenWRT.
      
      U-Boot CLI
      ----------
      U-Boot CLI can be activated by holding down '4' on bootup.
      
      Dual U-Boot
      -----------
      This is the first TP-Link MediaTek device to feature a split-uboot
      design. The first (factory-uboot) provides recovery via TFTP and HTTP,
      jumping straight into the second (firmware-uboot) if no recovery needs
      to be performed. The firmware-uboot unpacks and executed the kernel.
      
      Web-Recovery
      ------------
      TP-Link integrated a new Web-Recovery like the one on the Archer C7v4 /
      TL-WR1043v5. Stock-firmware sets a flag in the "romfile" partition
      before beginning to write and removes it afterwards. If the router boots
      with this flag set, bootloader will automatically start Web-recovery and
      listens on 192.168.0.1. This way, the vendor-firmware or an OpenWRT
      factory image can be written.
      
      By doing the same while performing sysupgrade, we can take advantage of
      the Web-recovery in OpenWRT.
      
      It is important to note that Web-Recovery is only based on this flag. It
      can't detect e.g. a crashing kernel or other means. Once activated it
      won't boot the OS before a recovery action (either via TFTP or HTTP) is
      performed. This recovery-mode is indicated by an illuminated WPS-LED on
      boot.
      Signed-off-by: default avatarDavid Bauer <mail@david-bauer.net>
      01dcd574
  16. 05 Jan, 2019 1 commit
  17. 16 Dec, 2018 1 commit
    • NOGUCHI Hiroshi's avatar
      ramips: add support for Netgear R6350 · 83a97c53
      NOGUCHI Hiroshi authored
      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: default avatarNOGUCHI Hiroshi <drvlabo@gmail.com>
      [apply latest ramips changes and document the on flash partition map
      issues]
      Signed-off-by: default avatarMathias Kresin <dev@kresin.me>
      83a97c53
  18. 12 Dec, 2018 3 commits
  19. 03 Dec, 2018 1 commit
    • Pawel Dembicki's avatar
      ramips: add support for D-Link DWR-118-A1 · e9a9b7d1
      Pawel Dembicki authored
      
      
      The DWR-118-A1 Wireless Router is based on the MT7620A SoC.
      
      Specification:
      
      - MediaTek MT7620A (580 Mhz)
      - 64 MB of RAM
      - 16 MB of FLASH
      - 1x 802.11bgn radio
      - 1x 802.11ac radio (MT7610EN)
      - 3x 10/100 Mbps Ethernet (3 LAN)
      - 2x 10/100/1000 Mbps ICPlus IP1001 Ethernet PHY (1 WAN AND 1 LAN)
      - 1x internal, non-detachable antenna
      - 2x external, non-detachable antennas
      - 1x USB 2.0
      - UART (J1) header on PCB (57600 8n1)
      - 7x LED (5x GPIO-controlled), 2x button
      - JBOOT bootloader
      
      Known issues:
      - WIFI 5G LED not working
      - flash is very slow
      
      The status led has been assigned to the dwr-118-a1:green:internet led.
      At the end of the boot it is switched off and is available for other
      operation. Work correctly also during sysupgrade operation.
      
      Installation:
      Apply factory image via http web-gui or JBOOT recovery page
      
      How to revert to OEM firmware:
      - push the reset button and turn on the power. Wait until LED start
        blinking (~10sec.)
      - upload original factory image via JBOOT http (IP: 192.168.123.254)
      Signed-off-by: default avatarPawel Dembicki <paweldembicki@gmail.com>
      e9a9b7d1
  20. 29 Nov, 2018 1 commit
    • Valentín Kivachuk's avatar
      ramips: add support for MTC Wireless Router WR1201 · 30a7ab8f
      Valentín Kivachuk authored
      
      
      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: default avatarValentín Kivachuk <vk18496@gmail.com>
      30a7ab8f
  21. 28 Nov, 2018 1 commit
    • Nishant Sharma's avatar
      ramips: add support for UniElec U7621-06-512M-64M variant · df3e0b58
      Nishant Sharma authored
      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 46ab81e4
      
       ("ramips add support for
      UniElec U7621-06")
      Signed-off-by: default avatarNishant 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: default avatarMathias Kresin <dev@kresin.me>
      df3e0b58
  22. 27 Nov, 2018 2 commits
    • Mathias Kresin's avatar
      ramips: use generic board detection for Unielec u7621-06 · 509d02a3
      Mathias Kresin authored
      
      
      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: default avatarMathias Kresin <dev@kresin.me>
      509d02a3
    • Thomas Vincent-Cross's avatar
      ramips: add support for Wavlink WL-WN570HA1 · a160f50d
      Thomas Vincent-Cross authored
      
      
      This commit adds support for the Wavlink WL-WN570HA1, a dual-band PoE
      wireless router with the following specifications:
      
       - CPU: MediaTek MT7688AN 580MHz
       - Flash: 8MB
       - RAM: 64MB
       - Ethernet: 1x 10/100Mbps
       - 2.4 GHz: 802.11b/g/n SoC, 1T1R, 27 dBm
       - 5 GHz: 802.11a/n/ac MT7610E, 1T1R, 25 dBm
       - Antennas: 2x external (1 per radio), detachable
       - LEDs: 3 programmable + Wi-Fi, WAN/LAN, Power
       - Buttons: Reset
      
      Flashing instructions:
      
      Factory U-boot launches a TFTP client if reset button is pressed during power-on.
      Rename the sysupgrade file and configure TFTP as follows:
      
       - Client (WL-WN570HA1) IP: 192.168.10.101
       - Server IP: 192.168.10.100
       - Filename: firmware.bin
      Signed-off-by: default avatarThomas Vincent-Cross <me@tvc.id.au>
      [use generic board detection, add firmware partition compatible]
      Signed-off-by: default avatarMathias Kresin <dev@kresin.me>
      a160f50d
  23. 26 Nov, 2018 5 commits
    • Mathias Kresin's avatar
      ramips: improve BDCOM WAP2100-SK support · e4d9217f
      Mathias Kresin authored
      Use the generic board detection instead of the target specific one as
      all recent additions are doing.
      
      Setup the USB led via devicetree (a5853577) and include the required
      driver by default. Merge the led userspace setting with an existing
      identical case.
      
      Use the wps led for boot status indication.
      
      Move the partitions into a partition table node (6031ab34) and drop
      needless labels. Drop misplaced cells properties (53624c17
      
      ).
      
      Cleanup the pinmux and only switch pins to gpio functions which a
      referenced as gpio in the dts.
      
      Match the maximum image size with the size of the firmware partition.
      Signed-off-by: default avatarMathias Kresin <dev@kresin.me>
      e4d9217f
    • Mathias Kresin's avatar
      ramips: improve Skylab SKW92A support · 8ec1a66c
      Mathias Kresin authored
      
      
      Use the generic board detection instead of the target specific one as
      all recent additions are doing.
      
      Add the wireless led according the gpio number from the datasheet.
      Rename the board part of the leds to match the name used for the
      compatible string. Finally, do not hijack the wps led for boot status
      indication longer than necessary.
      
      Merge userspace config into existing cases.
      
      Include the manufacture Name in the dts model string.
      Signed-off-by: default avatarMathias Kresin <dev@kresin.me>
      8ec1a66c
    • Pawel Dembicki's avatar
      ramips: add support for Lava LR-25G001 · 20b09a21
      Pawel Dembicki authored
      
      
      The Lava LR-25G001 Wireless Router is based on the MT7620A SoC.
      
      Specification:
      
      - MediaTek MT7620A (580 Mhz)
      - 64 MB of RAM
      - 16 MB of FLASH
      - 1x 802.11bgn radio
      - 1x 802.11ac radio (MT7610EN)
      - 5x 10/100/1000 Mbps AR8337 Switch (1 WAN AND 4 LAN)
      - 2x external, detachable antennas
      - 1x USB 2.0
      - UART (J3) header on PCB (57600 8n1)
      - 8x LED (3x GPIO-controlled), 2x button
      - JBOOT bootloader
      
      Known issues:
      - Work only three Gigabit ports (3/5, 1 WAN and 2LAN)
      
      Installation:
      Apply factory image via http web-gui or JBOOT recovery page
      
      How to revert to OEM firmware:
      - push the reset button and turn on the power. Wait until LED start
        blinking (~10sec.)
      - upload original factory image via JBOOT http (IP: 192.168.123.254)
      Signed-off-by: default avatarPawel Dembicki <paweldembicki@gmail.com>
      20b09a21
    • Petr Štetiar's avatar
      ramips: Add support for ZTE ZXECS EBG3130 aka BDCOM WAP2100-SK · 16b950c9
      Petr Štetiar authored
      On the bottom sticker it's branded as ZTE ZXECS EBG3130 device, but in factory
      OpenWrt image it's referenced as BDCOM WAP2100-SK device.
      
      Specifications:
      
      - SoC: MediaTek MT7620A
      - RAM: 128 MB
      - Flash: 16 MB
      - Ethernet: 5 FE ports
      - Wireless radio: 2T2R 2.4 GHz and 1T1R 5 GHz (MT7610EN, unsupported)
      - UART: 1 x UART on PCB marked as J2 (R=RX, T=TX, G=GND) with 115200 8N1 config
      - LEDs: Power, FE ports 1-5, WPS, USB, RF 2.4G, RF 5G
      - Other: USB port, SD card slot and 2x external antennas (non-detachable)
      
      Flashing instructions:
      
      A) The U-Boot has HTTP based firmware upgrade
      
        A1) Flashing notes
      
        We've identified so far two different batches of units, unfortunately
        each batch has different U-Boot bootloader flashed with different
        default environment variables, thus each batch has different IP address
        for accessing web based firmware updater.
      
        * First batch has web based bootloader IP address 1.1.1.1
        * Second batch has web based bootloader IP address 192.168.1.250
      
        In case you can't connect to either of those IPs, you can try to get
        the default IP address via two methods:
      
        A1.1) Serial console, then the IP address is visible during the boot
      
         ...
         HTTP server is starting at IP: 1.1.1.1
         raspi_read: from:40004 len:6
         HTTP server is ready!
         ...
      
        A1.2) Over telnet/SSH using this command:
      
         root@bdcom:/# grep ipaddr= /dev/mtd0
         ipaddr=1.1.1.1
      
        A2) Flashing with browser
      
        * Change IP address of PC to 1.1.1.2 with 255.255.255.0 netmask
        * Reboot the device and try to reach web based bootloader in the
          browser with the following URL http://1.1.1.1
      
        * Quickly select the firmware sysupgrade file and click on the
          `Update firmware` button, this all has to be done within 10 seconds,
          bootloader doesn't wait any longer
      
         If done correctly, the web page should show UPDATE IN PROGRESS page
         with progress indicator. Once the flashing completes (it takes roughly
         around 1 minute), the device will reboot to the OpenWrt firmware
      
        A3) Flashing with curl
      
         sudo ip addr add 1.1.1.2/24 dev eth0
         curl \
            --verbose \
            --retry 3 \
            --retry-delay 1 \
            --retry-max-time 30 \
            --connect-timeout 30 \
            --form "firmware=@openwrt-ramips-mt7620-BDCOM-WAP2100-SK-squashfs-sysupgrade.bin" \
            http://1.1.1.1
      
      
      
         Now power on the router.
      
      B) The U-boot is based on Ralink SDK so we can flash the firmware using UART.
      
         1. Configure PC with a static IP address and setup an TFTP server.
         2. Put the firmware into the tftp directory.
         3. Connect the UART line as described on the PCB (G=GND, R=RX, T=TX)
         4. Power up the device and press 2, follow the instruction to set device and
            tftp server IP address and input the firmware file name. U-boot will then load
            the firmware and write it into the flash.
      Signed-off-by: default avatarPetr Štetiar <ynezz@true.cz>
      16b950c9
    • Russell Senior's avatar
      ramips: add support for Skylab SKW92A in EVB · e42327aa
      Russell Senior authored
      Specifically, SKW92A_E16, described here:
      
        http://www.skylabmodule.com/wp-content/uploads/SkyLab_SKW92A_V1.04_datasheet.pdf
      
      Specification:
      - MediaTek MT7628N/N (580 Mhz)
      - 64 MB of RAM
      - 16 MB of FLASH
      - 2T2R 2.4 GHz
      - 5x 10/100 Mbps Ethernet
      - 2x u.FL
      - Power by micro-USB connector at USB1 on EVB
      - UART via micro-USB connector at USB3 on EVB (57600 8n1)
      - 5x Ethernet LEDs
      - 1x WLAN LEDs
      - 1x WPS LED connected by jumper wire from I2S_CK on J20 to WPS_LED pin hole next
        to daughter board on EVB
      - WPS/Reset button (S2 on EVB)
      - RESET button (S1 on EVB) is *not* connected to RST hole next to daughter board
      
      Flash instruction:
      
      >From Skylab firmware:
      
      1. Associate with SKYLAP_AP
      2. In a browser, load: http://10.10.10.254/
      
      
      3. Username/password: admin/admin
      4. In web admin interface: Administration / Upload Firmware, browse to
         sysupgrade image, apply, flash will fail with a message:
         Not a valid firmware. *** Warning: "/var/tmpFW" has corrupted data!
      5. Telnet to 10.10.10.254, drops you into a root shell with no credentials
      6. # cd /var
      7. # mtd_write -r write tmpFW mtd4
         Unlocking mtd4 ...
         Writing from tmpFW to mtd4 ... [e]
      8. When flash has completed, you will have booted into your firmware.
      
      >From U-boot via TFTP and initramfs:
      
      1. Place openwrt-ramips-mt76x8-skw92a-initramfs-kernel.bin on a TFTP server
      2. Connect to serial console at USB3 on EVB
      3. Connect ethernet between port 1 (not WAN) and your TFTP server (e.g.
         192.168.11.20)
      4. Start terminal software (e.g. screen /dev/ttyUSB0 57600) on PC
      5. Apply power to EVB
      6. Interrupt u-boot with keypress of "1"
      7. At u-boot prompts:
         Input device IP (10.10.10.123) ==:192.168.11.21
         Input server IP (10.10.10.3) ==:192.168.11.20
         Input Linux Kernel filename (root_uImage) ==:openwrt-ramips-mt76x8-skw92a-initramfs-kernel.bin
      8. Move ethernet to port 0 (WAN) on EVB
      9. At new OpenWrt console shell, fetch squashfs-sysupgrade image and flash
         with sysupgrade.
      
      >From U-boot via TFTP direct flash:
      
      1. Place openwrt-ramips-mt76x8-skw92a-squashfs-sysupgrade.bin on a TFTP server
      2. Connect to serial console at USB3 on EVB (57600 8N1)
      3. Connect ethernet between port 1 (not WAN) an your TFTP server (e.g.
         192.168.11.20)
      4. Start terminal software (e.g. screen /dev/ttyUSB0 57600) on PC
      5. Apply power to EVB
      6. Interrupt u-boot with keypress of "2"
      7. At u-boot prompts:
         Warning!! Erase Linux in Flash then burn new one. Are you sure?(Y/N) Y
         Input device IP (10.10.10.123) ==:192.168.11.21
         Input server IP (10.10.10.3) ==:192.168.11.20
         Input Linux Kernel filename (root_uImage) ==:openwrt-ramips-mt76x8-skw92a-squashfs-sysupgrade.bin
      8. When transfer is complete or as OpenWrt begins booting, move ethernet to
         port 0 (WAN).
      Signed-off-by: default avatarRussell Senior <russell@personaltelco.net>
      e42327aa
  24. 06 Sep, 2018 1 commit
    • Carlo Nel's avatar
      ramips: add support for TP-Link TL-MR3020 v3 · 6bbb2202
      Carlo Nel authored
      TP-Link TL-MR3020 v3 is a pocket-size router based on MediaTek MT7628N.
      
      This PR is based on the work of @meyergru[1], with his permission.
      
      Specification:
      - MediaTek MT7628N/N (575 Mhz)
      - 64 MB of RAM
      - 8 MB of FLASH
      - 2T2R 2.4 GHz
      - 1x 10/100 Mbps Ethernet
      
      Flash instruction:
      
      The only way to flash the image in TL-MR3020 v3 is to use
      tftp recovery mode in U-Boot:
      
      1. Configure PC with static IP 192.168.0.225/24 and tftp server.
      2. Rename "openwrt-ramips-mt76x8-tplink_tl-mr3020-v3-squashfs-tftp-recovery.bin"
         to "tp_recovery.bin" and place it in tftp server directory.
      3. Connect PC with the LAN port, press the reset button, power up
         the router and keep button pressed for around 6-7 seconds, until
         device starts downloading the file.
      4. Router will download file from server, write it to flash and reboot.
      
      [1] https://github.com/meyergru/lede-source/commits/TL-MR3020-V3
      
      Signed-off-by: default avatarCarlo Nel <carlojnel@gmail.com>
      6bbb2202
  25. 23 Aug, 2018 1 commit
    • NOGUCHI Hiroshi's avatar
      ramips: add support for ELECOM WRC-1900GST · ad10e71b
      NOGUCHI Hiroshi authored
      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: default avatarNOGUCHI Hiroshi <drvlabo@gmail.com>
      ad10e71b
  26. 16 Aug, 2018 1 commit
  27. 15 Aug, 2018 1 commit
    • Cezary Jackiewicz's avatar
      ramips: add support for D-Link DWR-118-A2 · 37af5965
      Cezary Jackiewicz authored
      
      
      The DWR-118-A2 Wireless Router is based on the MT7620A SoC.
      
      Specification:
      
      - MediaTek MT7620A (580 Mhz)
      - 128 MB of RAM
      - 16 MB of FLASH
      - 1x 802.11bgn radio
      - 1x 802.11ac radio (MT7612EN)
      - 4x 10/100 Mbps Ethernet (1 WAN and 3 LAN)
      - 1x 10/100/1000 Mbps Marvell Ethernet PHY (1 LAN)
      - 2x external, non-detachable antennas
      - 1x USB 2.0
      - UART (J1) header on PCB (57600 8n1)
      - 7x LED (5x GPIO-controlled), 2x button
      - JBOOT bootloader
      
      Known issues:
      - GELAN not working
      - flash is very slow
      
      The status led has been assigned to the dwr-118-a2:green:internet led.
      At the end of the boot it is switched off and is available for other
      operation. Work correctly also during sysupgrade operation.
      
      Installation:
      Apply factory image via http web-gui or JBOOT recovery page
      
      How to revert to OEM firmware:
      - push the reset button and turn on the power. Wait until LED start
        blinking (~10sec.)
      - upload original factory image via JBOOT http (IP: 192.168.123.254)
      Signed-off-by: default avatarCezary Jackiewicz <cezary@eko.one.pl>
      Signed-off-by: default avatarPawel Dembicki <paweldembicki@gmail.com>
      37af5965
  28. 14 Aug, 2018 1 commit
    • Deng Qingfang's avatar
      ramips: add support for HiWiFi HC5861B · d20f4fc6
      Deng Qingfang authored
      HiWiFi "Gee Enjoy1200" HC5861B is a dual-band router based on MediaTek MT7628AN
      https://www.hiwifi.com/enjoy-view
      
      
      
      Specifications:
      - MediaTek MT7628AN 580MHz
      - 128 MB DDR2 RAM
      - 16 MB SPI Flash
      - 2.4G MT7628AN 802.11bgn 2T2R 300Mbps
      - 5G MT7612EN 802.11ac 2T2R 867Mbps
      - 5x 10/100 Mbps Ethernet
      
      Flash instruction:
      1. Get SSH access to the router
      2. SSH to router with `ssh -p 1022 root@192.168.199.1`, The SSH password is the same as the webconfig one
      3. Upload OpenWrt sysupgrade firmware into the router's `/tmp` folder with SCP
      4. Run `mtd write /tmp/<filename> firmware`
      5. reboot
      
      Everything is working
      Signed-off-by: default avatarDeng Qingfang <dengqf6@mail2.sysu.edu.cn>
      d20f4fc6
  29. 13 Aug, 2018 1 commit