Add OpenWrt support for Xiaomi "Redmi AX6000"

https://openwrt.org/toh/xiaomi/redmi_ax6000#installing_openwrt_ubootmod_layout

You should follow this part...

If you are not sure which uboot to use, use the 23.05.2 uboot files.

  1. The router's flash drive is in read-only mode.
  2. I don't want to go back to stock firmware, even if it were possible.
    If this is an isolated case, then I will solve the problem myself. If this is a snapshot problem, then it needs to be addressed by the community.

I have OpenWrt U-Boot, I'll wait a little longer before using TFTP.

it sounds like tftp is the only way you're going to recover your device

OK. The device works, but is not updated, although packages can be installed. When there is an urgent need, I will flash it via TFTP

Did you get any success fixing the issue with hanging 5ghz? It appears I have the same issue it works for few days, and then suddenly hangs.

I'm running 23.05.2 with U-Boot mod layout.

Hey, I'm getting an issue saying when install a kmod package there's a kernel mismatch, with required 6.1.81-1-17e241e4c96847ca455a427420189289 and installed 6.1.81-1-6f9f83f1. As I installed the latest snapshot I'm guessing I either have to wait for a new release or downgrade to stable?

Hey, I'm facing difficulties in fixing my router. I'm trying to use medo with TFTP but I'm not succeeding. I could be doing everything wrong, especially because I'm new.

Info from serial port:



F0: 102B 0000

FA: 1040 0000

FA: 1040 0000 [0200]

F9: 0000 0000

V0: 0000 0000 [0001]

00: 0000 0000

BP: 2400 0041 [0000]

G0: 1190 0000

EC: 0000 0000 [1000]

T0: 0000 020D [010F]

Jump to BL


NOTICE:  BL2: v2.9(release):OpenWrt v2023-07-24-00ac6db3-1 (mt7986-spim-nand-ddr4)
NOTICE:  BL2: Built : 21:11:51, Sep  3 2023
NOTICE:  WDT: Cold boot
NOTICE:  WDT: disabled
NOTICE:  CPU: MT7986 (1998MHz)
NOTICE:  EMI: Using DDR4 settings
NOTICE:  EMI: Detected DRAM size: 512MB
NOTICE:  EMI: complex R/W mem test passed
NOTICE:  SPI_NAND parses attributes from parameter page.
NOTICE:  SPI_NAND Detected ID 0xc8
NOTICE:  Page size 2048, Block size 131072, size 134217728
NOTICE:  BL2: Booting BL31
NOTICE:  BL31: v2.9(release):OpenWrt v2023-07-24-00ac6db3-1 (mt7986-spim-nand-ddr4)
NOTICE:  BL31: Built : 21:11:51, Sep  3 2023


U-Boot 2023.07.02-OpenWrt-r23880-8554a4a7e3 (Sep 03 2023 - 21:11:51 +0000)

CPU:   MediaTek MT7986
Model: Xiaomi Redmi AX6000
DRAM:  512 MiB
Core:  28 devices, 12 uclasses, devicetree: embed
Loading Environment from UBI... spi-nand: spi_nand spi_nand@0: GigaDevice SPI NAND was found.
spi-nand: spi_nand spi_nand@0: 128 MiB, block size: 128 KiB, page size: 2048, OOB size: 64
Read 126976 bytes from volume ubootenv to 000000005f7c1c80
Read 126976 bytes from volume ubootenv2 to 000000005f7e0cc0
OK
In:    serial@11002000
Out:   serial@11002000
Err:   serial@11002000
reset button found
Loading Environment from UBI... UBI partition 'ubi' already selected
Read 126976 bytes from volume ubootenv to 000000005f7c1c80
Read 126976 bytes from volume ubootenv2 to 000000005f7e0cc0
OK
Net:   eth0: ethernet@15100000
e[?25le[2Je[1;1He[1;1He[2Ke[2;3H      e[0;34m( ( ( e[1;39mOpenWrte[0;34m ) ) )       e[33mU-Boot 2023.07.02-OpenWrt-r23880-8554a4a7e3 (Sep 03 2023 - 21:11:51 +0000)e[0me[0Ke[3;1He[2Ke[16;1He[2Ke[17;3HPress UP/DOWN to move, ENTER to select, ESC to quite[0Ke[18;1He[2Ke[4;7He[7m1. Run default boot command.e[0me[5;7H2. Boot system via TFTP.e[6;7H3. Boot production system from NAND.e[7;7H4. Boot recovery system from NAND.e[8;7H5. Load production system via TFTP then write to NAND.e[9;7H6. Load recovery system via TFTP then write to NAND.e[10;7H7. e[31mLoad BL31+U-Boot FIP via TFTP then write to NAND.e[0me[11;7H8. e[31mLoad BL2 preloader via TFTP then write to NAND.e[0me[12;7H9. Reboot.e[13;7Ha. Reset all settings to factory defaults.e[14;7H0. U-Boot consolee[16;3HHit any key to stop autoboot: 3 e[16;3HHit any key to stop autoboot: 2 e[16;3HHit any key to stop autoboot: 1 e[16;1He[2Ke[?25he[2Je[1;1HVolume fit not found!
Using ethernet@15100000 device
TFTP from server 192.168.1.254; our IP address is 192.168.1.1
Filename 'openwrt-mediatek-filogic-xiaomi_redmi-router-ax6000-ubootmod-initramfs-recovery.itb'.
Load address: 0x46000000
Loading: *
ARP Retry count exceeded; starting again
Wrong Image Format for bootm command
ERROR: can't get kernel image!
Using ethernet@15100000 device
TFTP from server 192.168.1.254; our IP address is 192.168.1.1
Filename 'openwrt-mediatek-filogic-xiaomi_redmi-router-ax6000-ubootmod-initramfs-recovery.itb'.
Load address: 0x46000000
Loading: *
ARP Retry count exceeded; starting again
Wrong Image Format for bootm command
ERROR: can't get kernel image!
Using ethernet@15100000 device
TFTP from server 192.168.1.254; our IP address is 192.168.1.1
Filename 'openwrt-mediatek-filogic-xiaomi_redmi-router-ax6000-ubootmod-initramfs-recovery.itb'.
Load address: 0x46000000
Loading: *

My server TFTP:

Screenshot_1

I don't know what I'm doing wrong, I might not even be able to unbrick with this method.

The problem you can encounter should be something we've encountered before. https://forum.openwrt.org/t/add-openwrt-support-for-xiaomi-redmi-ax6000/125008/1027.
If I remember correctly, the U-Boot 2023.07 you're using right now is having problems when in recovery mode.

In order to fix it, you can try to load the latest U-Boot via UART. https://github.com/981213/mtk_uartboot

Did you figure it out? Mine happen every 15 mins and didn't experience any problems, just annoying :slight_smile:

I currently have the same issue, stuck on r25589 which is the latest snapshot. I was on r25383 and upgrading apparently worked since i'm now stuck on the latest snapshot.

I can perform a reset but cannot change firmware versions.

If anyone is curious, i use the following on the firmware-selector site:

base-files busybox ca-bundle dnsmasq dropbear firewall4 fstools kmod-crypto-hw-safexcel kmod-gpio-button-hotplug kmod-leds-gpio kmod-leds-ws2812b kmod-mt7915e kmod-mt7986-firmware kmod-nft-offload libc libgcc libustream-mbedtls logd mt7986-wo-firmware mtd netifd nftables odhcp6c odhcpd-ipv6only opkg ppp ppp-mod-pppoe procd procd-seccomp procd-ujail uboot-envtools uci uclient-fetch urandom-seed urngd wpad-basic-mbedtls luci ddns-scripts luci-app-ddns mwan3 luci-app-mwan3 wget curl nano rsync luci-mod-rpc irqbalance ethtool openssh-sftp-server bash wireguard-tools kmod-wireguard luci-proto-wireguard openvpn

yeah I decided to stick with stock format on my one, I figured with the router not having a USB port there's not a need for a great deal of space anyway with fileservers or anything

Hello, I'm new and want to install OpenWRT using the easiest way, which is through "XMIR PATCHER." I'm not sure which "factory" file to use: stock or ubootmod. I don’t want comeback to Xiaomi firmware. Also, which version is the most stable and problem-free? I've read that 23.05.2 has issues with 5GHz. Any help would be appreciated. Additionally, if anyone has time, could you suggest the best settings? I'll be using it as a regular router connected to the WAN.
It’s I would ask that you use simple, step-by-step language, so that this help can be useful for others who might need it later on.

Thank you, I managed to update U-Boot, and now I can access the u-boot panel. One more step on the way, but I still haven't managed to get out of here. I tried again to update "initramfs-recovery.itb" via TFTP but without success. I tried using the "tftpboot" command from the u-boot console but without success.

Completely lost in this new world :face_with_spiral_eyes:

Greetings!
Do You know whether this stuff is going to be fixed officially in snapshot builds? Seen a huge chat on that commit.

Nope. If u changed the U-Boot successfully. It will not showing OpenWrt U-Boot 2023.07 again.

Fixed already on snapshot builds.

1 Like

ubi format has many advantages, would suggest going with that.

Also, which version is the most stable and problem-free? I've read that 23.05.2 has issues with 5GHz. Any help would be appreciated.

Yeah, 23.05.2 does have this: [Solved] 802.11ax worse than 802.11ac with mt76 driver?

You could: wait to use openwrt until 23.05.3, or live with it for now, or turn off 802.11ax.

But if you just want stable and problem free you definitely want a 23.05.x

Additionally, if anyone has time, could you suggest the best settings? I'll be using it as a regular router connected to the WAN.
It’s I would ask that you use simple, step-by-step language, so that this help can be useful for others who might need it later on.

  • Install release
  • Login, change password
  • Set wifi radios to your desired channels
  • Set WPA2/WPA3 mixed or WPA3-only encryption on both radios
  • Turn on radios
  • Enjoy
2 Likes

Same situation, stuck on r25442. Cannot update to r25595, nor via LuCi, nor via sysupgrade cmd. After reboot I stay on prev image. To be said, /etc dir is modifiable.
Still no solution? :c

Mb use mtd?

UPD:
Same issue:

I couldn't get TFTP to work, perhaps my button sequence/setup isn't correct. I ended up getting into recovery via UART, then downgrading with sysupgrade -n <older.itb>. That seems to have stuck and I'm now on r24404. This is my first time connecting up UART but all works well.

For those with more experience, would the following work on ubootmod if there was no way to get sysupgrade working? https://github.com/openwrt/openwrt/commit/18bea173a646518a64ca05ea26f87eab0540feb9

For existing users of the Redmi AX6000 running OpenWrt, here are the steps to
switch to this new layout:

  1. Flash initramfs-factory.ubi
mtd -r -e ubi write /tmp/initramfs-factory.ubi ubi
  1. After rebooting, the system will boot into the new openwrt-initramfs.
    Log in and perform a sysupgrade to complete the process.
sysupgrade -n /tmp/squashfs-sysupgrade.bin

Edit: i was going to use mtd but I wanted to make sure there was a way back in in case it didn't work so connected up UART first.

1 Like