Xiaomi 4A Gigabit - howto update to current firmware?

Hi,
I have installed Version OpenWrt 19.07-SNAPSHOT and want to update to 21.02.1.
I know that I cannot save my settings, but that would not be a problem. It is described that update should be done like a complete firmware update. The link seems the same for sysgrade and full update.
Can I do it via Lucy and ignore the warnings or should I do it somehow via ssh?

The description for full upgrade had been:

curl -L https://downloads.openwrt.org/releases/21.02.1/targets/r
amips/mt7621/openwrt-21.02.1-ramips-mt7621-xiaomi_mi-router-4a-gigabit-squashfs-
sysupgrade.bin --output firmware.bin

sha256sum firmware.bin

mtd -e OS1 -r write firmware.bin OS1

But the last command didn't work in ssh.

yeah, you need to install and load the kmod-mtd-rw with writing enabled - i_want_a_brick=1

or run sysupgrade firmware.bin

it's always a good idea to post the actual error message, instead of a it didn't work, people aren't mind readers.

1 Like

For completeness: here are my commands started from ssh with the error message at the end:

root@OpenWrt:~# curl -L https://downloads.openwrt.org/releases/21.02.1/targets/r
amips/mt7621/openwrt-21.02.1-ramips-mt7621-xiaomi_mi-router-4a-gigabit-squashfs-
sysupgrade.bin  --output firmware.bin
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 5632k  100 5632k    0     0   179k      0  0:00:31  0:00:31 --:--:--  187k
root@OpenWrt:~# sha256sum firmware.bin
71f031952c83fee2d2afaef418908264fd1fdb1e62b08c95635dbf0f1c7f6644  firmware.bin
root@OpenWrt:~# mtd -e OS1 -r write firmware.bin OS1
Could not open mtd device: OS1
Can't open device for writing!

and that ist the "error" from sysupgrade:

root@OpenWrt:/tmp# sysupgrade firmware.bin
Device xiaomi,mir3g-v2 not supported by this image
Supported devices: xiaomi,mi-router-4a-gigabit - Image version mismatch: image 1.1, device 1.0. Please wipe config during upgrade (force required) or reinstall. Reason: Config cannot be migrated from swconfig to DSA
Image check failed.
root@OpenWrt:/tmp#

and a similar message occurs via luci firmware upgrade. Is "force upgrade" the correct way?

Assuming it's the correct image, then yes.

Don't forget to apply the reset config switch, it's a must when going between 19 and 21.

fwiw, you must have installed a custom 19.07 snapshot build, because there was no such official snapshot build for the mir3gv2 (or almost identical R4AG)

https://downloads.openwrt.org/releases/19.07-SNAPSHOT/targets/ramips/mt7621/

That's perhaps why sysupgrade is complaining about image version mismatch.

It worked. Thanks.
Yes, during my first installation I followed the suggestions in a Blog that OpenWrt works on this device with that specific custom build.

1 Like

Please mark as solved.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.