Cannot flash OpenWRT on Mi Router 4A 100M (Chinese version) firmware 2.28.62 #176
Description
Hi there,
I have the Chinese version of the R4A router with stock Xiaomi firmware 2.28.62.
From a Mac, I was able to successfully run OpenWRTInvasion and get a root shell (Python has to be installed first of course). I ignored the instructions to build an image using Docker since I didn't find it made much sense to install a heavy app just to build an image that's already compiled. I also connected a serial console though I haven't found yet how to pause the scrolling.
Since the flashing instructions didn't appear right, I adapted them to my needs, mostly following OpenWRT's wiki page. The original instructions in this project call for mir3G firmware, which is obviously incorrect. Adapted instructions are:
cd /tmp curl https://downloads.openwrt.org/releases/22.03.5/targets/ramips/mt76x8/openwrt-22.03.5-ramips-mt76x8-xiaomi_mi-router-4a-100m-squashfs-sysupgrade.bin # Put here the URL you want to use to download the firmware ./busybox sha256sum firmware.bin # Verify the firmware checksum before flashing, very important to avoid bricking your device! mtd -e OS1 -r write firmware.bin OS1 # Install OpenWrt
(many times using curl results in a failure to reach the host using IPv6. I don't know the reason of this failure since I never had any IPv6 connectivity, so I just used a FTP client to upload the firmware to the router)
Upon successfully checking SHA256 and rebooting, the router is stuck in an infinite rebooting loop. The serial console always shows a LZMA error (non-specific) just before rebooting.
I then restored the Xiaomi-provided firmware using Hoddys Debrick Tools and a Win 7 virtual machine, which installed version 2.28.62, twice (two failed attempts).
What would be the correct way to flash this router?
- Follow wiki's instructions: first flash an older version of the firmware (2.18.28) by TFTP (same as debrick method), then run OpenWRTInvasion, then flash current (22.03.5) sysupgrade image in OS1 mtd partition?
- Ignore wiki's instructions: first use OpenWRTInvasion on 2.28.62 firmware as it appears to work anyway, then flash 22.03.5 version of kernel image in OS1 partition, then use SSH access to re-flash sysupgrade image in OS1?
- Something else?