This PR adds support for netis NX31 router. Specification ------------- - SoC : MediaTek MT7981BA dual-core ARM Cortex-A53 1.3 GHz - RAM : 256 MiB DDR3 - Flash : SPI-NAND 128 MiB (ESMT) - WLAN : MediaTek MT7976CN dual-band WiFi 6 - 2.4 GHz : b/g/n/ax, MIMO 2x2 - 5 GHz : a/n/ac/ax, MIMO 2x2 - Ethernet : 10/100/1000 Mbps x3 (LAN, MediaTek MT7531AE) 10/100/1000 Mbps x1 (WAN, SoC internal phy) - USB : No - Buttons : Mesh, Reset - LEDs : 1x Power (blue), unmanaged 1x Status (blue), gpio-controlled 1x WiFi 2.4 GHz (blue), gpio-controlled 1x WiFi 5 GHz (blue), gpio-controlled 3x LAN activity (blue), switch-controlled 1x WAN activity (blue), gpio-controlled - Power : 12 VDC, 1 A Installation ------------ 1. Connect to the router using ssh (user: admin, pass: web interface password) 2. Make mtd backup: cat /dev/mtd0 | gzip -1 -c > /tmp/mtd0_spi0.0.bin.gz cat /dev/mtd1 | gzip -1 -c > /tmp/mtd1_BL2.bin.gz cat /dev/mtd2 | gzip -1 -c > /tmp/mtd2_u-boot-env.bin.gz cat /dev/mtd3 | gzip -1 -c > /tmp/mtd3_Factory.bin.gz cat /dev/mtd4 | gzip -1 -c > /tmp/mtd4_FIP.bin.gz cat /dev/mtd5 | gzip -1 -c > /tmp/mtd5_ubi.bin.gz 3. Download mtd backup from the /tmp dir of the router to your PC using scp protocol 4. Upload OpenWrt 'bl31-uboot.fip', 'preloader.bin' images to the /tmp dir of the router using scp protocol 5. Write FIP and BL2 (replace bootloader): mtd write /tmp/openwrt-mediatek-filogic-netis_nx31-bl31-uboot.fip FIP mtd write /tmp/openwrt-mediatek-filogic-netis_nx31-preloader.bin BL2 6. Place OpenWrt 'openwrt-mediatek-filogic-netis_nx31-initramfs-recovery.itb' image on the tftp server (IP: 192.168.1.254) 7. Erase 'ubi' partition and reboot the router: mtd erase ubi reboot 8. U-Boot automatically boot OpenWrt recovery image from tftp server to the RAM 9. Upload OpenWrt 'sysupgrade.itb' image to the /tmp dir of the router (IP: 192.168.1.1) using scp protocol 10. Connect to the router using ssh and run: sysupgrade -n openwrt-mediatek-filogic-netis_nx31-squashfs-sysupgrade.itb Return to stock --------------- 1. Unpack stock BL2 and FIP partitions backup 2. Upload stock BL2 and FIP partitions backup to the /tmp dir of the router using scp protocol 3. Connect to the router using ssh and run: apk update && apk add kmod-mtd-rw insmod mtd-rw i_want_a_brick=1 mtd unlock BL2 mtd unlock FIP 4. Restore backup: mtd write /tmp/mtd4_FIP.bin FIP mtd write /tmp/mtd1_BL2.bin BL2 5. Erase ubi and reboot: mtd erase ubi reboot 6. Power off the router 7. Press Reset button and power on the router. Release the button after ~10 sec 8. Navigate to U-Boot recovery web server (http://192.168.1.1/) and upload the OEM firmware Recovery -------- 1. Place OpenWrt 'openwrt-mediatek-filogic-netis_nx31-initramfs-recovery.itb' image on the tftp server (IP: 192.168.1.254) 2. Press “Reset” button and power on the router. After ~10 sec release the button. 3. Use OpenWrt initramfs system for recovery MAC addresses ------------- +---------+-------------------+-----------+ | | MAC | Algorithm | +---------+-------------------+-----------+ | LAN | dc:xx:xx:d1:xx:18 | label | | WAN | dc:xx:xx:d1:xx:1a | label+2 | | WLAN 2g | de:xx:xx:11:xx:19 | | | WLAN 5g | de:xx:xx:71:xx:19 | | +---------+-------------------+-----------+ The LAN MAC was found in 'Factory', 0x1fef20 The WAN MAC was found in 'Factory', 0x1fef26 The WLAN 2g/5g MAC prototype was found in 'Factory', 0x4 Signed-off-by: Mikhail Zhilkin <csharper2005@gmail.com> Link: https://github.com/openwrt/openwrt/pull/18324 (cherry picked from commit d8002cb627edcbef27dedf9768a45ab0435ac55e) Signed-off-by: Mikhail Zhilkin <csharper2005@gmail.com> Link: https://github.com/openwrt/openwrt/pull/18438 Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
OpenWrt Project is a Linux operating system targeting embedded devices. Instead of trying to create a single, static firmware, OpenWrt provides a fully writable filesystem with package management. This frees you from the application selection and configuration provided by the vendor and allows you to customize the device through the use of packages to suit any application. For developers, OpenWrt is the framework to build an application without having to build a complete firmware around it; for users this means the ability for full customization, to use the device in ways never envisioned.
Sunshine!
Download
Built firmware images are available for many architectures and come with a package selection to be used as WiFi home router. To quickly find a factory image usable to migrate from a vendor stock firmware to OpenWrt, try the Firmware Selector.
If your device is supported, please follow the Info link to see install instructions or consult the support resources listed below.
An advanced user may require additional or specific package. (Toolchain, SDK, ...) For everything else than simple firmware download, try the wiki download page:
Development
To build your own firmware you need a GNU/Linux, BSD or macOS system (case sensitive filesystem required). Cygwin is unsupported because of the lack of a case sensitive file system.
Requirements
You need the following tools to compile OpenWrt, the package names vary between distributions. A complete list with distribution specific packages is found in the Build System Setup documentation.
binutils bzip2 diff find flex gawk gcc-6+ getopt grep install libc-dev libz-dev
make4.1+ perl python3.7+ rsync subversion unzip which
Quickstart
-
Run
./scripts/feeds update -a
to obtain all the latest package definitions defined in feeds.conf / feeds.conf.default -
Run
./scripts/feeds install -a
to install symlinks for all obtained packages into package/feeds/ -
Run
make menuconfig
to select your preferred configuration for the toolchain, target system & firmware packages. -
Run
make
to build your firmware. This will download all sources, build the cross-compile toolchain and then cross-compile the GNU/Linux kernel & all chosen applications for your target system.
Related Repositories
The main repository uses multiple sub-repositories to manage packages of
different categories. All packages are installed via the OpenWrt package
manager called opkg
. If you're looking to develop the web interface or port
packages to OpenWrt, please find the fitting repository below.
-
LuCI Web Interface: Modern and modular interface to control the device via a web browser.
-
OpenWrt Packages: Community repository of ported packages.
-
OpenWrt Routing: Packages specifically focused on (mesh) routing.
-
OpenWrt Video: Packages specifically focused on display servers and clients (Xorg and Wayland).
Support Information
For a list of supported devices see the OpenWrt Hardware Database
Documentation
Support Community
- Forum: For usage, projects, discussions and hardware advise.
- Support Chat: Channel
#openwrt
on oftc.net.
Developer Community
- Bug Reports: Report bugs in OpenWrt
- Dev Mailing List: Send patches
- Dev Chat: Channel
#openwrt-devel
on oftc.net.
License
OpenWrt is licensed under GPL-2.0