Cannot install OpenWrt on Xiaomi router 4A Gigabit edition

HI, I am fairly new with OpenWrt but trying to get it on my Xiaomi router 4A Gigabit edition.

I have updated the stock firmware to version 3.0.10 and then followed the guide on
After some time i connected my pc via USB to TTL on the board of the router to get some feedback out of the device.

I use the exploit as given pr the OpenWRTInvasion and i can start the flashing of the OpenWrt firmware.
I have tried the 21.0.1 both the sysupgrade and the xiaomi_mi-router-4a-gigabit-initramfs-kernel.bin (after each attempt I have "debricked" the router by putting the Xiaomi firmware back into the device.

This is part of the output I see on stdout after flashing the OpenWrt firmware (many errors related to SQUASHFS):

[  386.200000]  Link Status Changed: Port 4 linked Up.
router monitor is not running, exit.
[  740.350000] SQUASHFS error: xz_dec_run error, data probably corrupt
[  740.360000] SQUASHFS error: squashfs_read_data failed to read block 0x6d336
[  740.370000] SQUASHFS error: Unable to read fragment cache entry [6d336]
[  740.370000] SQUASHFS error: Unable to read page, block 6d336, size d5b4

Then it reboots and stops after starting kernel:

U-Boot 1.1.3 (Feb 28 2020 - 07:20:39)

Board: Ralink APSoC DRAM:  64 MB
Power on memory test. Memory size= 64 MB...OK!
relocate_code Pointer at: 83fb0000
RT2880_RSTSTAT_REG 0xc0030204
Software System Reset Occurred
flash manufacture id: ef, device id 40 18
find flash: W25Q128BV
env is right!
Ralink UBoot Version:
ASIC 7628_MP (Port5<->None)
DRAM component: 512 Mbits DDR, width 16
DRAM bus: 16 bit
Total memory: 64 MBytes
Flash component: SPI Flash
Date:Feb 28 2020  Time:07:20:39
icache: sets:512, ways:4, linesz:32 ,total:65536
dcache: sets:256, ways:4, linesz:32 ,total:32768

 ##### The CPU freq = 575 MHZ ####
 estimate memory size =64 Mbytes
RESET MT7628 PHY!!!!!!
Please choose the operation:
   1: Load system code to SDRAM via TFTP.
   2: Load system code then write to Flash via TFTP.
   3: Boot system code via Flash (default).
   4: Entr boot command line interface.
   9: Load Boot Loader code then write to Flash via TFTP.

   n3: System Boot system code via Flash.
Booting System 1
Erasing SPI Flash...
raspi_erase: offs:20000 len:10000
Writing to SPI Flash...
## Booting image at bc260000 ...
   Image Name:   MIPS OpenWrt Linux-5.4.154
   Image Type:   MIPS Linux Kernel Image (uncompressed)
   Data Size:    4942436 Bytes =  4.7 MB
   Load Address: 80001000
   Entry Point:  80001000
   Verifying Checksum ... OK
Erasing SPI Flash...
raspi_erase: offs:20000 len:10000
Writing to SPI Flash...
commandline uart_en=0 factory_mode=0 mem=64m root=/dev/mtdblock8
No initrd
## Transferring control to Linux (at address 80001000) ...
## Giving linux memsize in MB, 64

Starting kernel ...

Nothing seems to happen after that :frowning:

Do you have some good advice to what I should try to do? is there are problem with the flash memory on my device? something else?

Thanks in advance

Try following the guide shown here on the OpenWrt site, and download the official OpenWrt builds directly from OpenWrt's download page.

The logs show 64 MB RAM and MT7628 CPU, which means you likely actually have a 4A 100 Mb. The 4A Gb is 128 M and MT7621, which is completely different.


@mk24 Good spotted Mike - i was wrong it is the 100M version I have.
Thank you for the quick support :+1:
Now it is running OpenWrt:

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