This commit adds support for OpenWrt U-Boot variant of Nokia XG-040G-MF XG-PON ONU. Notes ----- 1. A simple installation without serial console is also possible using a fork of @dangowrt's UBI Installer Link: https://github.com/dangowrt/owrt-ubi-installer Installation / recovery ----------------------- 1. Make sure that you have 'bosa' and 'ri' partitions mtd backups before you start 2. Place OpenWrt images on the tftp server (IP: 192.168.1.254): openwrt-airoha-an7583-nokia_xg-040g-mf-ubi-bl31-uboot.fip openwrt-airoha-an7583-nokia_xg-040g-mf-ubi-initramfs-recovery.itb openwrt-airoha-an7583-nokia_xg-040g-mf-ubi-preloader.bin 3. Attach serial console and start terminal with XMODEM support: picocom -b 115200 --send-cmd "sx -vvX" /dev/ttyUSB0 4. Push reset button and power on the router 5. Press 'x', then 'Ctrl + A' and 'Ctrl + S' 6. Paste full path to the bl2 image: 'openwrt-airoha-an7583-nokia_xg-040g-mf-ubi-preloader.bin' 7. Wait until the file is downloaded and the following prompt appears: Press x to load BL31 + U-Boot FIP 8. Press 'x', then 'Ctrl + A' and 'Ctrl + S' 9. Paste full path to the fip image: 'openwrt-airoha-an7583-nokia_xg-040g-mf-ubi-bl31-uboot.fip' 10. Wait until the file is downloaded, u-boot will prepare ubi partition automatically 11. Wait for U-Boot menu 12. Run 'Load BL31+U-Boot FIP via TFTP then write to NAND' 13. Run 'Load BL2 preloader via TFTP then write to NAND' 14. Run 'Boot system via TFTP' 15. Once in OpenWrt perform standard sysupgrade 16. Once in OpenWrt upload 'bosa' and 'ri' partitions mtd backups to the /tmp dir using scp protocol 17. Check ID of the UBI volumes: ubinfo -d 0 -N bosa | grep "Volume ID" ubinfo -d 0 -N ri | grep "Volume ID" 18. Write backups according to the volume ID: ubiupdatevol /dev/ubi0_2 /tmp/bosa.bin ubiupdatevol /dev/ubi0_3 /tmp/ri.bin 19. Reboot: reboot UART ---- A view from the back side of the PCB: ------------------------ | GND RX TX | X X X Connection parameters: 115200, 8N1, 3.3V Signed-off-by: Mikhail Zhilkin <csharper2005@gmail.com> Link: https://github.com/openwrt/openwrt/pull/24654 Signed-off-by: Robert Marko <robimarko@gmail.com>
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.8+ rsync subversion unzip which
Quickstart
-
Run
./scripts/feeds update -ato obtain all the latest package definitions defined in feeds.conf / feeds.conf.default -
Run
./scripts/feeds install -ato install symlinks for all obtained packages into package/feeds/ -
Run
make menuconfigto select your preferred configuration for the toolchain, target system & firmware packages. -
Run
maketo 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
#openwrton oftc.net.
Developer Community
- Bug Reports: Report bugs in OpenWrt
- Dev Mailing List: Send patches
- Dev Chat: Channel
#openwrt-develon oftc.net.
License
OpenWrt is licensed under GPL-2.0
