Nokia EA0326GMP: How can I upgrade the custom uboot to openwrt official uboot

Hello,

I have a Nokia EA0326GMP router with custom uboot and openwrt installed. I'd like to install the official openwrt firmware via uboot. The issue is, the custom uboot only accept .bin file and won't allow me to install the firmware of https://downloads.openwrt.org/snapshots//targets/mediatek/filogic/openwrt-mediatek-filogic-nokia_ea0326gmp-squashfs-sysupgrade.itb. I assume I need to upgrade the custom uboot (version: U-Boot 2023.07, see the attached screenshot) to official uboot first(https://downloads.openwrt.org/snapshots//targets/mediatek/filogic/openwrt-mediatek-filogic-nokia_ea0326gmp-bl31-uboot.fip). Can I do the uboot upgrade via the web of http://192.168.1.1/uboot.html? If not, what command is used to do the upgrade after I ssh into the router? Thank you very much!

Advice for your device can be found in

Flashing seems rather complicated, as you need to modify OEM config to get SSH access.

But the commit also links to a modified one config file, which eases the process.

minimum configuration which enabled SSH access is also provided
to simplify the process:
https://firmware.download.immortalwrt.eu.org/cnsztl/mediatek/filogic/openwrt-mediatek-mt7981-nokia-ea0326gmp-enable-ssh.tar.gz

Thank you very much for your reply.

The instruction says,
Flash instructions:

  1. SSH to EA0326GMP, backup everything, especially 'Factory' part.
  2. Write new BL2:
    mtd write openwrt-mediatek-filogic-nokia_ea0326gmp-preloader.bin BL2
  3. Write new FIP:
    mtd write openwrt-mediatek-filogic-nokia_ea0326gmp-bl31-uboot.fip FIP
  4. Set static IP on your PC:
    IP 192.168.1.254/24, GW 192.168.1.1
  5. Serve OpenWrt initramfs image using TFTP server.
  6. Cut off the power and re-engage, wait for TFTP recovery to complete.
  7. After OpenWrt has booted, perform sysupgrade.

My router already has a custom uboot and a custom openwrt installed. I also can ssh to the router. Below is the partition information. For the above step# 1- 7, what step(s) that I can skip to get the official bl31-uboot.fip installed on the router? Can I only perform the step#7 in OpenWrt instead of in uboot?Thank you.

root@OpenWrt:~# cat /proc/mtd
dev:    size   erasesize  name
mtd0: 00100000 00020000 "BL2"
mtd1: 00080000 00020000 "u-boot-env"
mtd2: 00200000 00020000 "Factory"
mtd3: 00200000 00020000 "FIP"
mtd4: 00200000 00020000 "Config"
mtd5: 00200000 00020000 "Config2"
mtd6: 00c00000 00020000 "Aos-net"
mtd7: 00c00000 00020000 "bvasPlugin"
mtd8: 05680000 00020000 "ubi"
root@OpenWrt:~#

Coming from openwrt.org ?

Everything before 1 and after 7.

Only if you like broken stuff.

We have no idea what your current Chinese(?) custom u-boot & firmware actually does, so everything below is pure guess. The best advice you could get from people who from whom you have got the custom u-boot and firmware. Possibly @1715173329 , but might be somebody else.

As early bootloader is BL2 and actual u-boot is FIP, you need at least step 3 and likely also step 2 to be done from OpenWrt. Those are are actual u-boot flashing steps there.

Then you can use the TFTP recovery feature in the OpenWrt u-boot to get the proper OpenWrt flashed. (steps 4-7)

Ps.
And if those partitions BL2 and FIP are write-protected (like normally), you may also need to install kmod-mtd-rw first. Hopefully your custom firmware provider also provides that. (You can't install kmods from other download sources, so it needs to come from your custom firmware provider.

Normal way would be:

opkg update
opkg install kmod-mtd-rw

insmod mtd-rw.ko i_want_a_brick=1

Can I only perform the step#7 in OpenWrt instead of in uboot?

Do these steps as-is, otherwise you will just get a brick.
Such 3rd-party U-Boot (and firmware) is not supported by OpenWrt.

The best advice you could get from people who from whom you have got the custom u-boot and firmware.

I guess the firmware is from coolsnowwolf/lede, for u-boot, I have no idea.

And if those partitions BL2 and FIP are write-protected (like normally), you may also need to install kmod-mtd-rw first. Hopefully your custom firmware provider also provides that. (You can't install kmods from other download sources, so it needs to come from your custom firmware provider.

And yes they're locked. So @roberthuang you have to compile a new firmware from souce and make sure you have kmod-mtd-rw included (or simply remove read-only properties from the dts).

cc @coolsnowwolf

Thank you all for you reply.

One last question, once I have the official uboot and openwrt firmware installed on my router, for the future openwrt firmware sysupgrade, do I perform it in uboot or in openwrt?

Normally (with most routers that have internal flash), you use the OpenWrt sysupgrade routine to flash a new sysugrade image to get into new OpenWrt version.
Likely so also with your router.