How can I restore my spim-nand.bin backup?

Hi!

In openwrt21 thru luci interface I backed up my mtd partitions, so I have some .bin files with HiLink.mtd0-spi0.0.bin being 134mb.

Since I upgraded to mt7981-rfb-spim-nand I had to update my preloader and fib to make the mt7981 23.05.3 sysupgrade.itb work on my router.
(according to this guide: MediaTek MT7981 RFB Replace openwrt snapshot 21.02 with newer snapshot or stable version of openwrt - #5 by daniel)

However, since my router is running 23.05.3 I have nothing but troubles. It can't reach internet, but it can ping my tplink vdsl router ip adress and the devices connected to it.
With iperf3 installed on the router I can perform iperf3 tests from openwrt router towards any device I installed iperf3 on. But my openwrt router refuses to use my tplink vdsl 192.168.1.254 router as default gateway. So I have no internet.

Long story short, I would like to revert to my old bootloaders I had before and re-install openwrt 21.02 that worked fine on my rm65 mt7981 device.

Is there are a way I can restore my:
HiLink.mtd1-BL2.bin
HiLink.mtd2-u-boot-env.bin
HiLink.mtd3-Factory.bin
HiLink.mtd4-FIP.bin
HiLink.mtd5-ubi.bin
Or maybe all in 1 go: HiLink.mtd0-spi0.0.bin (134mb)
back to my flash rom so that I have my old situation back where my router runs openwrt 21.02 fine?
Maybe with mtd-rw?

Thanks a ton!

The truth is that this router is a not MT7981 RFB (the reference board for MT7981 given to developers by MediaTek). It's apparently a HiLink device and in order to run OpenWrt on it you will have to read out the device tree and figure out all the hardware and software changes HiLink has made.

If done so, I'm sure the device can work perfectly fine with OpenWrt, probably even better than with the stock firmware.

However, I see how you ended up in what seems to me like a big misunderstanding, assuming the device is identical to MT7981 RFB, probably because HiLink didn't change the board name string in U-Boot or Linux/OpenWrt when carrying out the needed modifications.

That seems a bit strange for a 128MiB flash device. Are you sure about the size? It should be exactly 134217728 bytes (or 130023424 bytes when NMBM is used with 64 reserved blocks).

As OpenWrt doesn't offer access to the whole flash chip but only to partitions, the best way would be to write back the original firmware using U-Boot: ubi detach, then use tftpboot to load the HiLink.mtd0-spi0.0.bin file to RAM and then use mtd write ... to write it to the flash.

1 Like