mirror of
https://github.com/openwrt/openwrt.git
synced 2026-10-14 00:07:09 +04:00
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>