Mi 4a Gigabit Edition – unsuccessful installation

Hey there!

Today I purchased Mi 4a Gigabit International Edition (production date 05/2021) and tried to install OpenWrt with no success.

I immediately thought it was because of the new chip, but... strangly it's GigaDevice GD25Q128C, which should be supported.

# dmesg | grep GD25

[    0.430000] GD25Q128C(c8 40180000) (16384 Kbytes)

# dmesg | grep flash

[    0.430000] flash manufacture id: c8, device id 40 18

The bootlog is almost identical to https://openwrt.org/inbox/toh/xiaomi/xiaomi_mi_router_4a_gigabit_edition#oem_bootlog

My flashing steps as follows:

  1. Exploit 4a with OpenWRTInvasion
  2. Download firmware: https://downloads.openwrt.org/releases/21.02.3/targets/ramips/mt7621/openwrt-21.02.3-ramips-mt7621-xiaomi_mi-router-4a-gigabit-squashfs-sysupgrade.bin
  3. Put OpenWRT firmware with ftp to /tmp.
  4. Flash with mtd -e OS1 -r write openwrt.bin OS1

After unlocking/flashing/rebooting, 4a just rarely blinks orange. Unbricking with TinyPXE4AINT works fine.

Thanks in advance!

I've resolved the issue and the reason was quite strange.

So, as I've described, I was using ftp to transfer the OpenWRT firmware to 4a. Comparing sha256 of local and transferred files resulted with two different checksums. After multiple tries to transfer OpenWRT (with different devices), I can conclude that there's something wrong with ftp server, configured by OpenWRTInvasion: https://github.com/acecilia/OpenWRTInvasion/blob/master/script.sh#L52 (although configuration is fine, maybe there's a bug with busybox build?).

To overcome this I've started local http server in the directory with firmware:
$ python3 -m http.server

and downloaded OpenWRT with:
# curl -O http://$http_ip/$your_openwrt_firmware

This time, shecksums was identical and everything went smoothly.

Cheers.

1 Like

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