Adding OpenWrt support for Xiaomi "Redmi Router AX6S"/"Xiaomi Router AX3200"

Just did it over oem 1.08 firmware, tried both telnet, UART TFTP flash, same error as before...

telnet flash:

[    1.821853] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
[    1.830108] SMP: stopping secondary CPUs
[    1.834024] Kernel Offset: disabled
[    1.837503] CPU features: 0x00000002,04002004
[    1.841849] Memory Limit: none
[    1.848057] Rebooting in 1 seconds..

UART TFTPBoot flash

## Loading kernel from FIT Image at 4007ff28 ...
Bad FIT kernel image format!
ERROR: can't get kernel image!

insist i had the same problem

Thank you, I did factory reset countless times, Power+Button+TFTP serve OEM image from 192.168.31.100, XiaoMi UI restore factory. before proceed to the Telnet or TFTP flash.

Its been a week already, and the only success is with the ImmortalWrt which is Chinese version, and I didn't want to keep it as all of my other routers (ASUS RT-AC56U) are running Openwrt.

As I mentioned before, ImmortalWrt firmware is about 22MB in size, but all the Openwrt factory firmwares I've tried were about 11MB. Doesn't it appear to be the parition fitting issue?

are you doing tftp flash with dnsmasq?

No, I am doing tftpd server on Windows, I can switch to Linux and try dnsmasq also.

just try, you never know

Did you solved same boot issue with your AX3200?

I used dnsmasq, but I can't say that is the solution. i remember i had the same kernel size problem as you. I've tried so many times that I can't say which was the winning weapon
but i did that with uart

hahaha, looks like 1 week is not yet enough.

but you succeeded with uart flash method with openwrt 22.03.2 version?

Just wanna know so I can limit my scope for trial & error. thank you for spent time to help btw.

not sure i can't remember, but you can try older versio too like 22.03.0 rc6
yes uart flash

It really doesn't matter how you serve the firmware as long as the image is correct and put under /tmp. For me the python -m http.server was the fastest way, but could be any http server, maybe already running on your pc as long as you can "wget" the file from.

yes, it shouldn't matter. I just tried serve the images using dnsmasq and flashed sysupgrade.bin under linux, still booting error. its really driving me crazy.

## Loading kernel from FIT Image at 4007ff28 ...
Bad FIT kernel image format!
ERROR: can't get kernel image!
1 Like

https://github.com/MeIsReallyBa/immortalwrtmt7622

https://forum.openwrt.org/t/adding-openwrt-support-for-xiaomi-redmi-router-ax6s-xiaomi-router-ax3200/111085/840?u=hck

1 Like

i can compile for you openwrt 22.03.2 and it will boot, i need touch the dts,but if you do not find a way to flash openwrt with original dts ,you will not be able to flash new version of openwrt.
are you able to compile an image yourself? if you can do that i can help.

I've found only this recently posted partition issue (including a workaround):

but if you do not find a way to flash openwrt with original dts ,you will not be able to flash new version of openwrt.

I've tried various version of openwrt, including 22.03.0 rc6 you suggested, all without success.

I don't have much experience in compile things in linux, but I think I can manage to compile it. I noticed people mention "single partition image, offset" something, but not much info regard about it, do you think it has to do with my flash issue?

thanks for pointed it out.
I am in a different scenario. My router came with telnet disabled, I first tried use Uart method to do sysupgrade without success, then I did netmode 4 hack that enabled telnet of OEM firmware, and attempt mtd write factory.bin to firmware partition, openwrt repeat booting itself.

Thanks, really appreciate your sharing of knowledges.

[Edit]

From the looks of 7622 Makefile, it seems it's only for Kernel 5.10?, any chances for upgrading into Kernel 5.15?

I've narrowed down the possible issue with boot openwrt after flash the firmware.

It seems that the rootfs cannot be mounted to mtd(10) block, see the line marked with ****.

anyone has insight about this? or possible fix?

[    1.656000] ubi0: attaching mtd10
[    1.660025] ubi0: scanning is finished
[    1.666168] ubi0 error: 0xffffffc010526c3c: too large reserved_pebs 41, good PEBs 1
[***1.673827] ubi0 error: 0xffffffc010526a74: volume table check failed: record 0, error 9
[    1.681912] Volume table record 0 dump:
[    1.685737]  reserved_pebs   41
[    1.688870]  alignment       1
[    1.691914]  data_pad        0
[    1.694957]  vol_type        1
[    1.698005]  upd_marker      0
[    1.701048]  name_len        6
[    1.704092]  name            rootfs
[    1.707573]  crc             0x30d21135
[***1.711407]  ubi0 error: 0xffffffc01052b12c: failed to attach mtd10, error -22
[    1.718544] UBI error: cannot attach mtd10
[    1.723425] /dev/root: Can't open blockdev
[***1.727528] VFS: Cannot open root device "(null)" or unknown-block(0,0): error -6
[    1.734999] Please append a correct "root=" boot option; here are the available partitions:
[    1.743354] 1f00             512 mtdblock0
[    1.743357]  (driver?)
[    1.749884] 1f04             256 mtdblock1
[    1.749886]  (driver?)
[    1.756408] 1f08             512 mtdblock2
[    1.756410]  (driver?)
[    1.762937] 1f0c             256 mtdblock3
[    1.762939]  (driver?)
[    1.769465] 1f10             256 mtdblock4
[    1.769466]  (driver?)
[    1.775988] 1f14             512 mtdblock5
[    1.775990]  (driver?)
[    1.782516] 1f18             256 mtdblock6
[    1.782517]  (driver?)
[    1.789047] 1f1c             256 mtdblock7
[    1.789049]  (driver?)
[    1.795571] 1f20            4096 mtdblock8
[    1.795573]  (driver?)
[    1.802100] 1f24            3712 mtdblock9
[    1.802101]  (driver?)
[    1.808628] 1f28             128 mtdblock10
[    1.808629]  (driver?)
[    1.815239] 1f2c          113664 mtdblock11
[    1.815241]  (driver?)
[***1.821853] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
[    1.830108] SMP: stopping secondary CPUs
[    1.834024] Kernel Offset: disabled
[    1.837503] CPU features: 0x00000002,04002004
[    1.841849] Memory Limit: none
[    1.848057] Rebooting in 1 seconds..