Nama sama tidak semestinya perkakasan sama. Sahkan semakan, media dan kapasiti kilat sebelum membeli atau memasang. Keserasian dan pautan diimport belum disemak semula secara bebas.
Penyenaraian ToH rasmi ialah asas kemasukan katalog. Keluaran semasa, snapshot dan syarat pemasangan direkod berasingan; EOL atau semakan belum lengkap tidak menyembunyikan peranti.
Tarikh semakan binaan semasa: 2026-11-07
Syarat pemasangan · Cara pemasangan belum disahkan
Binaan rasmi tidak bermakna ia boleh dipasang terus daripada perisian tegar asal semasa. Semak revisi perkakasan, pemuat but dan prasyarat sebelum membeli atau memasang.
Petikan disimpan secara setempat. Sumber yang boleh dibaca tidak membuktikan laluan pemasangan telah disahkan; maklumat model tidak terpakai kepada setiap semakan perkakasan.
Sebahagian sumber dikumpulkan; pengesahan belum lengkap · Tarikh semakan: 2026-11-11
mediatek: filogic: switch to fitblk for Xiaomi Redmi AX6000
Use the new fitblk driver.
Run-tested: filogic/mt7986a-xiaomi-redmi-router-ax6000-ubootmod
Signed-off-by: Furong Xu <[email protected]>
mediatek: add alternative stock layout for Xiaomi Redmi Router AX6000
In this implementation, the flash partition layout is adjusted to avoid
modifying the uboot environment of mtdparts. This ensures that the 30M
ubi_kernel partition remains aligned with the stock ubi partition, and
the kernel volume is placed in it. This allows the stock uboot to boot
from it without changing the mtdparts, which is useful for reverting back
to the stock firmware using Xiaomi Firmware Tools. In actual testing,
modifying mtdparts has been found to break Xiaomi Firmware Tools.
1. use ARTIFACTS to generate initramfs-factory.ubi for easy installation.
2. The NAND flash layout is changed to allow for reverting back to the
stock firmware.
3. Before performing sysupgrade, do some cleanup in platform_pre_upgrade
to ensure a clean installation of OpenWRT.
4. Setup the uboot env to ensure that the system always boot, which can
be helpful for users who may forget to do this before sysupgrade in
the initramfs.
New flash instructions:
1. Gain ssh access. Please refer to:
https://openwrt.org/toh/xiaomi/redmi_ax6000#installation)
2. Check which system current u-boot is loading from:
COMMAND: `cat /proc/cmdline`
sample OUTPUT: `console=ttyS0,115200n1 loglevel=8 firmware=1 uart_en=1`
if firmware=1, current system is ubi1
if firmware=0, current system is ubi0
3. Setup nvram and write the firmware:
If the current system is ubi1, please set it up so that the next time
it will boot from ubi, and write the firmware to ubi:
```
nvram set boot_wait=on
nvram set uart_en=1
nvram set flag_boot_rootfs=0
nvram set flag_last_success=0
nvram set flag_boot_success=1
nvram set flag_try_sys1_failed=0
nvram set flag_try_sys2_failed=0
nvram commit
ubiformat /dev/mtd8 -y -f /tmp/initramfs-factory.ubi
```
If the current system is ubi, please set it up so that the next time
it will boot from ubi1, and write the firmware to ubi1:
```
nvram set boot_wait=on
nvram set uart_en=1
nvram set flag_boot_rootfs=1
nvram set flag_last_success=1
nvram set flag_boot_success=1
nvram set flag_try_sys1_failed=0
nvram set flag_try_sys2_failed=0
nvram commit
ubiformat /dev/mtd9 -y -f /tmp/initramfs-factory.ubi
```
4. After rebooting, the system should now boot into the openwrt initramfs.
Flash the squashfs-sysupgrade.bin via using ssh or luci.
```
sysupgrade -n /tmp/squashfs-sysupgrade.bin
```
Done.
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
```
2. 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
```
Signed-off-by: Chen Minqiang <[email protected]>
Signed-off-by: Chuanhong Guo <[email protected]>
mediatek: add new layout for Xiaomi Redmi Router AX6000 for OpenWrt U-Boot
This new layout is only bootable with OpenWrt U-Boot. It reuses the
two crash partions and expands the ubi partion to the end of whole flash.
Do not use this layout with stock U-Boot!
Signed-off-by: Furong Xu <[email protected]>
小米官网 | 小米商城 | 小米澎湃OS | 小米汽车 | 云服务 | IoT | 有品 | 小爱开放平台 | 资质证照 | 协议规则 | 下载app 小米商城APP | Select Location
购物车
购物车中还没有商品,赶紧选购吧!
登录 | 注册
小米官网
全部商品分类
手机
Xiaomi 数字旗舰
Xiaomi MIX系列
Xiaomi Civi系列
REDMI K系列
REDMI Turbo系列
REDMI Note系列
REDMI 数字系列
电视
S Pro RGB-Mini LED
X RGB-Mini LED
S Mini LED 2026
小米电视SPro MiniLED2026
旗舰系列-S Pro Mini LED
巨幕影院-REDMI MAX
游戏高刷-REDMI 电视 X 2026
性价比爆款-REDMI A Pro
性价比爆款-REDMI A 2025
家电
壁挂空调
立式空调
中央空调Pro
冰箱
电暖器
除湿机
洗地机
净水器
微蒸烤
烟灶
洗碗机
扫地机器人
吸尘器
加湿器
空气净化器
电饭煲
电磁炉
水壶
风扇
投影仪
灯具
除螨仪
料理机
洗衣机
笔记本 平板 显示器
REDMI Book 14 2027
REDMI Book 16 2027
Xiaomi Book Pro 14
REDMIBookPro 14 2026
REDMIBookPro 16 2026
REDMI Book 14 2026
REDMI Book 16 2026
REDMI Book Pro 14
Xiaomi Pad 9 Pro
Xiaomi Pad 9
Xiaomi Pad 9 Pro Max
REDMI Pad 2 Pro
REDMI Pad 2 SE
REDMI Pad 2
Xiaomi Pad 8
Xiaomi Pad 8 Pro
REDMI K Pad
REDMI K Pad 2
Xiaomi Pad 7S Pro
Xiaomi Pad 7 Ultra
Xiaomi Pad 7 Pro
Xiaomi Pad 7
显示器 A27U 20
[…]
生活 箱包
小背包
双肩包
胸包
旅行箱
眼镜
床垫
枕头
螺丝刀
水杯
笔
智能 路由器
MIJIA K歌麦克风
打印机
路由器
智能家庭
对讲机
摄像机
智能门锁
门铃/猫眼
智能音箱
家庭屏
电源 配件
插座插排
移动电源
数据线
穿戴配件
平板配件
充电器
电池
自拍杆
手机壳
手机贴膜
无线充电器
其他配件
Xiaomi手机
Xiaomi 18 Pro Max
6999元起
Xiaomi 18 Pro
5999元起
Xiaomi 18 Fold
10999元起
Xiaomi 17T Pro
4299元起
Xiaomi 17T
3499元起
Xiaomi 17 Max
4799元起
REDMI手机
REDMI K100
3499元起
REDMI Note 17 Pro 焕新版
1599元起
REDMI K100 Pro Max
4499元起
REDMI K100 Pro
3999元起
REDMI 17 5G
999元起
REDMI Note 17 Pro
1599元起
电视
小米电视S Pro RGB-Mini LED 2027系列
9299元起
REDMI电视X RGB-Mini LED 2027
3799元起
小米电视S Mini LED 2026
4199元起
小米电视S Pro Mini LED 2026
6499元起
巨幕影院-REDMI MAX
5999元起
REDMI 电视 X 2026
2999元起
笔记本
REDMI Book 16 2027
6999元起
REDMI Book 14 2027
6799元起
Xiaomi Book Pro 14
9499元起
REDMI Book Pro 14 2025
5899元起
REDMI Book Pro 16 2026
7899元起
REDMI Book Pro 14 2026
7699元起
平板
Xiaomi Pad 9 Pro
3799元起
Xiaomi Pad 9
2999元起
Xiaomi Pad 9 Pro Max
4799元起
REDMI K Pad 2
3599元起
REDMI Pad 2 SE
OpenWrt Wiki
Tools
User Tools
Log In
Site Tools
Recent Changes
Media Manager
Sitemap
Page Tools
Show pagesource
Old revisions
Backlinks
Back to top
Translations of this page
Translations of this page ?
English (en)
|العربية (ar)
Česky (cs)
Deutsch (de)
Español (es)
Français (fr)
Magyar (hu)
Italiano (it)
日本語 (ja)
한국어 (ko)
Polski (pl)
Português (pt)
Português (pt-br)
Русский (ru)
Türkçe (tr)
Українська (uk)
Tiếng Việt (vi)
中文 (zh)
繁體中文 (zh-tw)
Log In
You are here
Home
Table of Hardware
Xiaomi
Xiaomi Redmi AX6000
Learn about OpenWrt
Learn about OpenWrt
Supported devices
Packages
Downloads
Documentation
Quick start guide
User guide
Developer guide
Security
FAQ
Forum
Contributing
Submitting patches
Reporting bugs
Contributing to wiki
Project
About OpenWrt
Rules
Infrastructure
Mirrors
Donate
Merchandise
Website
Trademark policy
License
Contacts
Privacy policy
Show pagesource
Old revisions
Backlinks
Back to top
×
Table of Contents
Xiaomi Redmi AX6000
Supported Versions
Hardware Highlights
Installation
Install Vulnerable Version
Getting stok {token}
Rooting
Installing OpenWrt (stock layout)
Installing OpenWrt (U-Boot layout)
Flash Layout
OEM easy installation
OEM installation using the TFTP method
Upgrading OpenWrt
LuCI Web Upgrade Process
Terminal Upgrade Process
Debricking
TFTP instructions for the stock layout
Xiaomi Recovery Tool for the stock layout
Failsafe mode
Basic configuration
Specific Configuration
Network interfaces
Switch Ports (for VLANs)
Buttons
Changing LED colors
Hardware
Info
Photos
Opening the case
Serial
JTAG
Bootloader mods
Hardware mods
Bootlogs
OEM bootlog
OpenWrt bootlog
Notes
Tags
Xiaomi Redmi AX6000
The Xiaomi Redmi AX6000 router supports 4 802.11ax streams on both 2.4GHz @40MHz and 5GHz @160MHz for a combined 6000Mbps wireless speed. It is based on the MediaTek MT7986A SoC
Support Forums https://forum.openwrt.org/t/add-openwrt-support-for-xiaomi-redmi-ax6000/125008
In-depth review https://www.acwifi.net/19676.html
Supported Versions
Hardware Highlights
Installation
There are currently two potential layouts for this device that are supported.
Stock layout: this option retains vendor's partition scheme and ability to restore vendor firmware. On the down side, there is a bit of wasted space.
U-boot mod layout: this option uses OpenWRT U-Boot with automatic TFTP recovery and optional NAND recovery options. It is also a more efficient use of available space vs the stock option. Users will not be able to revert back to the vendor firmware using this.
It should be noted that in order to use the U-Boot layout, users must first install the stock layout version of OpenWrt. The instructions for both install methods are provided below.
This exploits a vulnerability in Xiaomi's set_sys_time function. Credit to forum user @remittor. Following this may result in a bricked device if you don't know what you're doing!
Install Vulnerable Version
First, you'll need to grab a vulnerable software version. The table below shows known vulnerable versions. It is recommended to install version 1.0.48.
Firmware Version Vulnerable? Download
1.0.67 YES
1.0.60 YES https://cdn.cnbj1.fds.api.mi-img.com/xiaoqiang/rom/rb06/miwifi_rb06_firmware_7ddeb_1.0.60.bin
1.0.48 (recommended) YES https://cdn.cnbj1.fds.api.mi-img.com/xiaoqiang/rom/rb06/miwifi_rb06_firmware_847e9_1.0.48.bin
To downgrade: navigate to the upload firmware page and select the appropriate software version. It will complain about the downgrade. Edit the url and change the <html>0</html> at the end to a <html>1</html> and press enter. Or change to <html>2</html> if there is already <html>1</html> (seen on v1.0.64). The downgrade will proceed.
Getting stok {token}
You'll see references to a {token} variable in many of the following commands. To get it, sign into the web UI of your router and look for stok=<some hex value> in the URL. This is the token. It will change after each reboot so you will need to get it after each one.
OEM UI is only in Chinese. A quick startup (tested in verion 1.0.48) would be:
From direct connected LAN port (address will be assigned by AX6000 using DHCP), access http://192.168.31.1/ portal and follow these steps (one per page):
Remove second tick and click blue button
Click last hyperlink below blue button
Select DHCP arrow
Type WiFi password (8 chars min). It'll be used for login, so make it simple. Uncheck middle tick and click blue button
Go to the web UI at http://192.168.31.1/
Type WiFi password (as above) in box for access.
Now you can find stok= token in URL. Repeat last two steps after each reboot to get the new one.
Rooting
A computer (preferably Linux) must be connected to the router via an ethernet LAN port (one of the 3 ports in the middle).
Enable Development/Debug Mode
Xiaomi devices contain a partition called “crash”. When \xa5\x5a\x00\x00 is loaded into the partition, the router enters a “debug” or “development” mode, which allows persistent overwriting of bdata partition. This partition determines whether telnet, uart and ssh are enabled.
http://192.168.31.1/cgi-bin/luci/;stok={token}/api/misystem/set_sys_time?timezone=%20%27%20%3B%20echo%20pVoAAA%3D%3D%20%7C%20base64%20-d%20%7C%20mtd%20write%20-%20crash%20%3B%20 writes the magic bytes to the crash partition. The command being run on the router is echo pVoAAA== | base64 -d | mtd write - crash.
http://192.168.31.1/cgi-bin/luci/;stok={token}/api/misystem/set_sys_time?timezone=%20%27%20%3b%20reboot%20%3b%20 reboots the device.
Set Bdata
Changing the telnet_en, ssh_en and uart_en in bdata will allow persistent access to the device.
http://192.168.31.1/cgi-bin/luci/;stok={token}/api/misystem/set_sys_time?timezone=%20%27%20%3B%20bdata%20set%20telnet_en%3D1%20%3B%20bdata%20set%20ssh_en%3D1%20%3B%20bdata%20commit%20%3B%20 sets telnet, ssh and uart to enabled (you should now see the full bootlog on the uart console if you have it connected). It runs bdata set telnet_en=1 ; bdata set ssh_en=1 ; bdata commit on the router.
http://192.168.31.1/cgi-bin/luci/;stok={token}/api/misystem/set_sys_time?timezone=%20%27%20%3b%20reboot%20%3b%20 reboots the device.
Disable Development/Debug Mode
Sometimes features break if development/debug mode is left on. Let's disable it (access will still be permitted).
http://192.168.31.1/cgi-bin/luci/;stok={token}/api/misystem/set_sys_time?timezone=%20%27%20%3b%20mtd%20erase%20crash%20%3b%20 erases the crash partition by running mtd erase crash on the router.
Now you can telnet into your device!
In case if you find the telnet session is password-protected, you may use the Xmir Patcher tool by forum user @remittor to obtain SSH access. The tool option to choose is first 2, then 6, then 0 to exit when finished. Note that this tool is not supported by OpenWRT developers so please check the forum post for any question about it.
Enable ssh access
Booting to the recommended version of Xiaomi firmware leaves ssh (via dropbear) broken. To fix, telnet into the device, then edit /etc/init.d/dropbear deleting the three lines:
if [ "$flg_ssh" != "1" -o "$channel" = "release" ]; then
return 0
fi
If you want, you can directly paste this command in the connected terminal without the need of editing:
cd /etc/init.d/ && rm -rf dropbear && curl https://gist.githubusercontent.com/AmirulAndalib/4046f133f66b100d9bf2156dfd84afe8/raw/dropbear >> dropbear && chmod +x dropbear && cd ~
Gist revision: https://gist.github.com/AmirulAndalib/4046f133f66b100d9bf2156dfd84afe8/revisions#diff-17d1edd22e2221c5ceeb5641c97a8725222084d4f3d784f17d1c19638b7cc871L135-L137
Now start the daemon: /etc/init.d/dropbear start
If needed (by default it's empty), root password can be changed typing passwd
A note about recent ssh clients
Recent ssh clients will not be able to connect due to the old version dropbear using deprecated keys. To work around this, on the device connecting to the AX6000, edit ~/.ssh/config adding:
Host 192.168.31.1
HostKeyAlgorithms=+ssh-rsa
PubkeyAcceptedAlgorithms=+ssh-rsa
It should also be noted that users of a modern ssh package will need to append the -O flag to invocations of scp in order to get it to use the legacy protocol.
% scp -O openwrt-{version}-mediatek-filogic-xiaomi_redmi-router-ax6000-stock-initramfs-factory.ubi [email protected]:/tmp
Installing OpenWrt (stock layout)
1. Once you've gained access to OEM system, check current stock system
cat /proc/cmdline
Sample OUTPUT:
console=ttyS0,115200n1 loglevel=8 firmware=1 uart_en=1
if firmware=1, current system is ubi1
if firmware=0, current system is ubi0
2. Setup nvram if current system is ubi1, please setup: next time it would boot from ubi
nvram set boot_wait=on
nvram set uart_en=1
nvram set flag_boot_rootfs=0
nvram set flag_last_success=0
nvram set flag_boot_success=1
nvram set flag_try_sys1_failed=0
nvram set flag_try_sys2_failed=0
nvram commit
else if current system is ubi, please setup: next time it would boot from ubi1
nvram set boot_wait=on
nvram set uart_en=1
nvram set flag_boot_rootfs=1
nvram set flag_last_success=1
nvram set flag_boot_success=1
nvram set flag_try_sys1_failed=0
nvram set flag_try_sys2_failed=0
nvram commit
3. Flash flash initramfs-factory.ubi if firmware=1, current system is ubi1, flash to ubi:
ubiformat /dev/mtd8 -y -f /tmp/openwrt-{version}-mediatek-filogic-xiaomi_redmi-router-ax6000-stock-initramfs-factory.ubi
if firmware=0, current system is ubi, flash to ubi1:
ubiformat /dev/mtd9 -y -f /tmp/openwrt-{version}-mediatek-filogic-xiaomi_redmi-router-ax6000-stock-initramfs-factory.ubi
NOTE: If you want to go directly to the U-Boot layout and you know what you're doing (high risk of bricking) you can use ubootmod initramfs version here and jump directly to step 4 of U-Boot layout installation instructions below. Backup of system partitions (step 2 below) is always recommended.
NOTE: Firmware could be found at https://downloads.openwrt.org/releases/{version}/targets/mediatek/filogic/openwrt-{version}-mediatek-filogic-xiaomi_redmi-router-ax6000-stock-initramfs-factory.ubi
4. Reboot and setup uboot-env
reboot
NOTE: If you find that your router is always rebooting to Xiaomi OEM firmware, it might have been flashed with a custom bootloader.
It should boot to the openwrt initramfs system now. Note that the IP address may change from 192.168.31.1 to 192.168.1.1 login ssh and setup:
fw_setenv boot_wait on
fw_setenv uart_en 1
fw_setenv flag_boot_rootfs 0
fw_setenv flag_last_success 1
fw_setenv flag_boot_success 1
fw_setenv flag_try_sys1_failed 8
fw_setenv flag_try_sys2_failed 8
fw_setenv mtdparts "nmbm0:1024k(bl2),256k(Nvram),256k(Bdata),2048k(factory),2048k(fip),256k(crash),256k(crash_log),30720k(ubi),30720k(ubi1),51200k(overlay)"
here set flag_last_success=1 and flag_try_sys1_failed >= 6 and flag_try_sys1_failed >=6, to make it always boot from system 0
5. Flash sysupgrade.bin via sysupgrade:
From the host
% scp -O openwrt-{version}-mediatek-filogic-xiaomi_redmi-router-ax6000-stock-squashfs-sysupgrade.bin [email protected]:/tmp
sysupgrade -n /tmp/openwrt-{version}-mediatek-filogic-xiaomi_redmi-router-ax6000-stock-squashfs-sysupgrade.bin
The device will reboot. OpenWrt (stock layout) will be ready.
If you want to stay in this layout, then you're done. If you want to move to U-Boot layout, follow the directions below.
Installing OpenWrt (U-Boot layout)
1. Your device should already running OpenWrt (stock layout) as per above instructions.
2. Backup BL2, Nvram, Bdata, Factory, and FIP in case you break something or you want to go back to stock firmware one day.
cat /dev/mtdblock0 > /tmp/BL2.bin
cat /dev/mtdblock1 > /tmp/Nvram.bin
cat /dev/mtdblock2 > /tmp/Bdata.bin
cat /dev/mtdblock3 > /tmp/Factory.bin
cat /dev/mtdblock4 > /tmp/FIP.bin
Now save all whose bin files to somewhere safe.
Then backup your configurations, since ubiformat for entire mtd device is required to create new ubootenv volume for OpenWrt U-Boot.
3. Run the following cmd to boot into an initramfs with the new OpenWrt U-Boot layout that expand ubi partion to the end of flash:
ubiformat /dev/mtd7 -y -f /tmp/openwrt-{version}-mediatek-filogic-xiaomi_redmi-router-ax6000-ubootmod-initramfs-factory.ubi
NOTE: The firmware could be found at https://downloads.openwrt.org/releases/{version}/targets/mediatek/filogic/openwrt-{version}-mediatek-filogic-xiaomi_redmi-router-ax6000-ubootmod-initramfs-factory.ubi
4. Reboot. It'll boot into initramfs, check mtd partion info.
The ubi partion should be mtd5
root@OpenWrt:~# cat /proc/mtd
dev: size erasesize name
mtd0: 00100000 00020000 BL2
mtd1: 00040000 00020000 Nvram
mtd2: 00040000 00020000 Bdata
mtd3: 00200000 00020000 Factory
mtd4: 00200000 00020000 FIP
mtd5: 07a80000 00020000 ubi
5. Load kmod-mtd-rw to temporarily make the bootloader partitions writable.
The kmod-mtd-rw is from the feeds, it is not packed in initramfs-factory by default.
If you're building your own image, remember to add kmod-mtd-rw module in Kernel modules > Other modules
To install kmod-mtd-rw via opkg:
opkg update && opkg install kmod-mtd-rw
Alternatively, you can download it from https://downloads.openwrt.org/releases/{version}/targets/mediatek/filogic/packages/.
e.g. download for v23.05.5: https://downloads.openwrt.org/releases/23.05.5/targets/mediatek/filogic/packages/kmod-mtd-rw_5.15.167+git-20160214-2_aarch64_cortex-a53.ipk
In releases 25.12 and later, install via apk package manager:
apk update && apk add kmod-mtd-rw
Alternatively, you can download it from https://downloads.openwrt.org/releases/{version}/targets/mediatek/filogic/kmods.
e.g. download for v25.12.2: https://downloads.openwrt.org/releases/25.12.2/targets/mediatek/filogic/kmods/6.12.74-1-60d938adcb727697d3015e4285d4c290/kmod-mtd-rw-6.12.74.2021.02.28~e8776739-r1.apk
Select your OpenWrt release version and kernel version accordingly.
Load kmod-mtd-rw:
insmod /lib/modules/$(uname -r)/mtd-rw.ko i_want_a_brick=1
6. Run the following command to clean all pending crash dumps in pstore, or OpenWrt U-Boot may boot into NAND recovery or tftp recovery.
rm -f /sys/fs/pstore/*
7. Format ubi and create new ubootenv volume:
ubidetach -p /dev/mtd5; ubiformat /dev/mtd5 -y; ubiattach -p /dev/mtd5
ubimkvol /dev/ubi0 -n 0 -N ubootenv -s 128KiB
ubimkvol /dev/ubi0 -n 1 -N ubootenv2 -s 128KiB
8. This part is optional and you can skip this if you do not want to have a NAND recovery boot feature offered by OpenWrt U-Boot. Don't worry, you always have automatic tftp recovery feature enabled.
If your recovery image is larger than 10MiB, size the recovery partition accordingly to make it fit.
ubimkvol /dev/ubi0 -n 2 -N recovery -s 10MiB
ubiupdatevol /dev/ubi0_2 /tmp/ax6000-ubootmod-initramfs-recovery.itb
NOTE: The file could be found at https://downloads.openwrt.org/releases/{version}/targets/mediatek/filogic/openwrt-{version}-mediatek-filogic-xiaomi_redmi-router-ax6000-ubootmod-initramfs-recovery.itb
9. Now, flash new U-Boot. Bye-bye ugly stock U-Boot.
mtd write /tmp/ax6000-ubootmod-preloader.bin BL2
mtd write /tmp/ax6000-ubootmod-bl31-uboot.fip FIP
NOTE: The files could be found at https://downloads.openwrt.org/releases/{version}/targets/mediatek/filogic/openwrt-{version}-mediatek-filogic-xiaomi_redmi-router-ax6000-ubootmod-bl31-uboot.fip and https://downloads.openwrt.org/releases/{version}/targets/mediatek/filogic/openwrt-{version}-mediatek-filogic-xiaomi_redmi-router-ax6000-ubootmod-preloader.bin
10. Flash the squashfs-sysupgrade.bin as usual:
sysupgrade -n /tmp/openwrt-{version}-mediatek-filogic-xiaomi_redmi-router-ax6000-ubootmod-squashfs-sysupgrade.itb
NOTE: The file could be found at https://downloads.openwrt.org/releases/{version}/targets/mediatek/filogic/openwrt-{version}-mediatek-filogic-xiaomi_redmi-router-ax6000-ubootmod-squashfs-sysupgrade.itb
Flash Layout
Flash layout running OEM & OpenWrt stock Firmwares
dev start end size erasesize name size
mtd0 00000000 00100000 00100000 00020000 BL2 1MiB
mtd1 00100000 00140000 00040000 00020000 Nvram 256KiB
mtd2 00140000 00180000 00040000 00020000 Bdata 256KiB
mtd3 00180000 00380000 00200000 00020000 Factory 2MiB
mtd4 00380000 00580000 00200000 00020000 FIP 2MiB
mtd5 00580000 005c0000 00040000 00020000 crash 256KiB
mtd6 005c0000 00600000 00040000 00020000 crash_log 256KiB
mtd7 00600000 02400000 01E00000 00020000 ubi 30MiB
mtd8 02400000 04200000 01E00000 00020000 ubi1 30MiB
mtd9 04200000 07400000 03200000 00020000 overlay 50MiB
Flash layout running OpenWrt ubootmod Firmware
dev start end size erasesize name size
mtd0 00000000 00100000 00100000 00020000 BL2 1MiB
mtd1 00100000 00140000 00040000 00020000 Nvram 256KiB
mtd2 00140000 00180000 00040000 00020000 Bdata 256KiB
mtd3 00180000 00380000 00200000 00020000 Factory 2MiB
mtd4 00380000 00580000 00200000 00020000 FIP 2MiB
mtd5 00580000 08000000 07A80000 00020000 ubi 122MiB
OEM easy installation
The instructions below are for Broadcom devices and only serve as an example.
Remove / modify them if they do not apply to this particular device!
This section deals with
How you install OpenWrt from a device freshly opened
The steps required such as reset to factory defaults if the device has already been configured
Note: Reset router to factory defaults if it has been previously configured.
Browse to http://192.168.1.1/Upgrade.asp
Upload .bin file to router
Wait for it to reboot
Telnet to 192.168.1.1 and set a root password, or browse to http://192.168.1.1 if LuCI is installed.
OEM installation using the TFTP method
→ generic.flashing.tftp
Specific values needed for tftp
Enter values for “FILL-IN” below
Bootloader tftp server IPv4 address FILL-IN
Bootloader MAC address (special) FILL-IN
Firmware tftp image Latest OpenWrt release (NOTE: Name must contain “tftp”)
TFTP transfer window FILL-IN seconds
TFTP window start approximately FILL-IN seconds after power on
TFTP client required IP address FILL-IN
Upgrading OpenWrt
→ generic.sysupgrade
These are generic instructions. Update with your router's specifics.
LuCI Web Upgrade Process
Browse to http://192.168.1.1/cgi-bin/luci/mini/system/upgrade/ LuCI Upgrade URL
Upload image file for sysupgrade to LuCI
Wait for reboot
Terminal Upgrade Process
If you don't have a GUI (LuCI) available, you can alternatively upgrade via the command line. There are two command line methods for upgrading:
sysupgrade
mtd
Note: It is important that you put the firmware image into the ramdisk (/tmp) before you start flashing.
sysupgrade
Login as root via SSH on 192.168.1.1, then enter the following commands:
cd /tmp
wget https://downloads.openwrt.org/snapshots/targets/mediatek/filogic/openwrt-mediatek-filogic-xiaomi_redmi-router-ax6000-squashfs-sysupgrade.bin
sysupgrade /tmp/openwrt-mediatek-filogic-xiaomi_redmi-router-ax6000-squashfs-sysupgrade.bin
mtd
If sysupgrade does not support this router, use mtd.
Login as root via SSH on 192.168.1.1, then enter the following commands:
cd /tmp
wget http://downloads.openwrt.org/snapshots/trunk/XXX/xxx.abc
mtd write /tmp/xxx.abc linux && reboot
Debricking
→ generic.debrick
Assume that you have installed OpenWrt with stock layout, with original u-boot:
Connect to router via UART
Select Load Image in the u-boot
Set start address to 0x48000000, then set TFTP parameters to load the initramfs-kernel.bin.
Start the loaded kernel, then perform sysupgrade on OpenWrt.
If you have installed OpenWrt with u-boot mode layout, you can still use above UART recovery procedure, but u-boot will also look for a file called openwrt-mediatek-filogic-xiaomi_redmi-router-ax6000-ubootmod-initramfs-recovery.itb in a tftp server at IP address 192.168.1.254
If you provide that file in a tftp server, it'll be automatically loaded and run, so system can be recovered without using a UART connection.
TFTP instructions for the stock layout
Redmi AX6000 can be recovered from a soft-brick with TFTP. The flow is:
The router boots and asks for an IP address on the LAN ports via DHCP
The TFTP server assigns an IP address to the router
The router then connects to the TFTP server (where your DHCP server listen, e.g.: 192.168.31.100) and tries to download a file named with the IP address given by the DHCP server converted to hexadecimal.
Because of this quirk we will have to configure the tftp server to assign only one IP and we will set the file name to the only IP address it can receive.
For Windows you can use tftpd64 and on Linux you can use dnsmasq. These are the steps to do it for Linux (this can be adapted to the tftpd64's graphical interface very easily):
Create a folder somewhere to place your firmware for the tftp server and download the OEM firmware (the file name is a very important part; depending on the previously installed Xiaomi firmware version, you may need to adjust the name of the .img file to a different one. The router will be looking for a specific file name on the tftp server – if the requested file in the terminal does not match the one you have in the tmp folder, rename it accordingly and proceed again):
mkdir -p /tmp/tftp
wget https://cdn.cnbj1.fds.api.mi-img.com/xiaoqiang/rom/rb06/miwifi_rb06_firmware_847e9_1.0.48.bin -O /tmp/tftp/C0A81F02.img
To ensure that the TFTP server has access to the firmware, set the privileges:
sudo chmod -R 755 /tmp/tftp
sudo chown -R nobody:nogroup /tmp/tftp
Obtain the name of the ethernet adapter (to be used in further steps):
ip link
The result will loke something like (in this case, the name of the ethernet adapter is enp2s0):
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: enp2s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP mode DEFAULT group default qlen 1000
link/ether xx:xx:xx:xx:xx:xx brd ff:ff:ff:ff:ff:ff
3: wlp3s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP mode DORMANT group default qlen 1000
link/ether yy:yy:yy:yy:yy:yy brd ff:ff:ff:ff:ff:ff
Set a static address on your PC to serve the firmware from:
sudo ip address flush dev <adapter name>
sudo ip address add 192.168.31.100/24 dev <adapter name>
Run the server with the following command:
sudo dnsmasq --no-daemon --listen-address=192.168.31.100 --bind-interfaces --dhcp-range=192.168.31.2,192.168.31.254 --enable-tftp --tftp-root=/tmp/tftp --log-dhcp --log-facility=-
Unplug the power, press and hold the reset button, plug the power back while still holding the button.
Hold the reset button until the router's LED starts flashing orange.
then it goes solid orange again, release the button.
If in the terminal, you see that the router requests a different firmware file (different name), rename the .img file in the tmp folder accordingly and repeat the procedures from the IP flush again.
When the device finished loading the firmware, the led starts flashing with orange (amber) light. Wait for until blue led to goes solid!
It might take some time for the led to go solid blue
If the recovery doesn't accept the downloaded file the led switches to solid white - if this is the case, restart the recovery process with other file
If the led is blinking blue led it means the device was flashed successfully and can be restarted
Put your interface back to DHCP mode and start again with breaking your device
Xiaomi Recovery Tool for the stock layout
Using official Xiaomi Recovery Tool
Windows only
Automates the process of setting network interface, setting TFTP server
https://bigota.miwifi.com/xiaoqiang/tools/MIWIFIRepairTool.x86.zip
Youtube tutorial with AX6S in Chinese: https://www.youtube.com/watch?v=XBaR9t-UndI
Failsafe mode
→ failsafe_and_factory_reset
Basic configuration
→ Basic configuration After flashing, proceed with this.
Set up your Internet connection, configure wireless, configure USB port, etc.
Specific Configuration
Network interfaces
The default network configuration is:
Interface Name Description Default configuration
br-lan LAN & WiFi 192.168.1.1/24
lanX (eth0) LAN ports (2 to 4) None
wan (eth0) WAN port DHCP
phy0-ap0 WiFi 2.4G Disabled
phy1-ap0 WiFi 5G Disabled
Switch Ports (for VLANs)
Numbers 2-4 are Ports 1-3 as labeled on the unit, number 4 is the Internet (WAN) on the unit, 0 is the internal connection to the router itself.
Port Switch port
LAN 2 1
LAN 3 2
LAN 4 3
Internet (WAN) 4
Buttons
→ hardware.button on howto use and configure the hardware button(s). Here, we merely name the buttons, so we can use them in the above Howto.
The Xiaomi Redmi AX6000 has the following buttons:
BUTTON Event
Reset reset
Mesh BTN_9
Changing LED colors
There are several LED arrays whose colors can be customized using started RBG numbers, namely:
/sys/class/leds/rgb:network/multi_intensity
/sys/class/leds/rgb:status/multi_intensity
For example, setting the status to indigo:
# echo '75 0 130' > /sys/class/leds/rgb:status/multi_intensity
To keep modifications across reboots, simply append a line to <html>/etc/rc.local</html>
[[ -f /sys/class/leds/rgb:status/multi_intensity ]] && echo '75 0 130' > /sys/class/leds/rgb:status/multi_intensity
Hardware
Info
Photos
Front:
Insert photo of front of the casing
Back:
Insert photo of back of the casing
Backside label:
Insert photo of backside label
Opening the case
→ Warranty
Remove 4 rubber feet on the bottom of the device
Use a Phillips screwdriver to remove the 4 screws
A tiny flathead or plastic pry tool can be wedged in between the bottom case by the antennas. Gently push and slide it along the groove and it will pop open.
Main PCB:
Insert photo of PCB
Serial
→ port.serial general information about the serial port, serial port cable, etc.
Once the case has been removed, locate the serial port: with the antennae facing up, the headers are in the upper-right section of the board just above the heatsink
Serial connection parameters
for Xiaomi Redmi AX6000 115200, 8N1, 3.3V
JTAG
→ port.jtag general information about the JTAG port, JTAG cable, etc.
How to connect to the JTAG Port of this specific device:
Insert photo of PCB with markings for JTAG port
Bootloader mods
→ bootloader
uboot-mediatek: add support for Xiaomi Redmi Router AX6000 : Official OpenWrt U-Boot Mod
ATF and u-boot for many mt798x-based routers : Custom bl-mt798x bootloader by hanwckf
mt7986_redmi_ax6000-fip-fixed-parts.bin, or
mt7986_redmi_ax6000-fip-fixed-parts-multi-layout.bin
Important Notice on bl-mt798x bootloader
If you flash this bl-mt798x bootloader by hanwckf, there are two things to keep in mind:
1. This custom bootloader would always boot ubi partition (mtd8), and always ignoring the nvram instructions to boot ubi1 (mtd9). Hence you cannot use the above Wiki instructions to flash OpenWRT Stock layout initramfs-factory.ubi image. Even after flashing, it would always reboot to ubi (mtd8) as Xiaomi OEM firmware partition.
2. Both Xiaomi Recovery Tool for stock layout & TFTP recovery instructions in the above no longer work because this custom bootloader works differently
See bl-mt798x bootloader in the Technical Reference section for more information.
Hardware mods
None so far.
Bootlogs
The OEM bootlog provided below has been captured on a Bdata-modified device to enable UART and Telnet. An unmodified version will cut the bootlog short.
OEM bootlog
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 022F [010F] Jump to BL NOTICE: BL2: v2.6(release):2598dbc2a6-dirty NOTICE: BL2: Built : 13:34:54, Mar 12 2022 INFO: BL2: Doing platform setup NOTICE: WDT: disabled NOTICE: CPU: MT7986 (2000MHz) NOTICE: EMI: Using DDR4 settings before ctrl3 = 0x0 clear request & ack after ctrl3 = 0x0 DVFSRC_SUCCESS 0 dump drm registers data: 1001d000 | 00000000 00000000 00000000 00000000 1001d010 | 00000000 00000000 00000000 00000000 1001d020 | 00000000 00000000 00000000 00000000 1001d030 | 00a083f1 000003ff 00100000 00000000 1001d040 | 00000000 00000000 00020303 000000ff 1001d050 | 00000000 00000000 00000000 00000000 1001d060 | 00000002 00000000 00000000 00000000 drm: 500 = 0x8 toprgu: 80 = 0x0 [DDR Reserve] ddr reserve mode not be enabled yet Save DRM_DEBUG_CTL(0xa083f1) DRM_LATCH_CTL : 0x27e71 DRM_LATCH_CTL2: 0x200a0 drm_update_reg: 1, bits: 0x8000, addr: 0x1001d030, val: 0xa083f1 drm_update_reg: 0, bits: 0x80000, addr: 0x1001d030, val: 0xa083f1 drm_update_reg: 0, bits: 0x200, addr: 0x1001d034, val: 0x1ff drm_update_reg: 0, bits: 0x200000, addr: 0x1001d034, val: 0x1ff drm_update_reg: 0, bits: 0x100, addr: 0x1001d034, val: 0xff MTK_DRM_DEBUG_CTL : 0xa083f1 MTK_DRM_DEBUG_CTL2: 0xff drm_update_reg: 0, bits: 0x4000, addr: 0x1001d030, val: 0xa083f1 DRM DDR reserve mode FAIL! a083f1 DDR RESERVE Success 0 drm_update_reg: 0, bits: 0x2000, addr: 0x1001d030, val: 0xa083f1 drm_update_reg: 0, bits: 0x1000, addr: 0x1001d030, val: 0xa083f1 [DRAM] into mt_set_emi [EMI] ComboMCP not ready, using default setting Init_DRAM:2139: init PCDDR4 dram Start [MD32_INIT] in c code >>>>>> [MD32_INIT] 3 [MD32_INIT] 4 [MD32_INIT] 5 [MD32_INIT] 6 [MD32_INIT] V22 add 1 [MD32_INIT] V22 add 1 end [MD32_INIT] 7 [MD32_INIT] 8 [MD32_INIT] 9 [MD32_INIT] 10 [MD32_INIT] 11 [MD32_INIT] 12 [MD32_INIT] 13 [MD32_INIT] 14 [MD32_INIT] 15 [MD32_INIT] 16 [MD32_INIT] 17 [MD32_INIT] 18 [MD32_INIT] 19 [MD32_INIT] 20 [MD32_INIT] 21 [MD32_INIT] 22 [MD32_INIT] 23 [MD32_INIT] 28 [MD32_INIT] 29 [MD32_INIT] 30 for RTMRW, if have [MD32_INIT] in c code <<<<<< [Set_DRAM_Pinmux_Sel] DRAMPinmux = 0 [Bian_co] ETT version 0.0.0.1 dram_type 4, R0 cbt_mode 0, R1 cbt_mode 0 VENDOR=136 Read voltage for 1600, 0 Vio18 = 0 Vcore = 0 Vdram = 0 Vddq = 0 Vmddr = 0 == DRAMC_CTX_T == support_channel_num: 1 channel: 0 support_rank_num: 1 rank: 0 freq_sel: 22 shu_type: 0 dram_type: 4 dram_fsp: 0 odt_onoff: 1 DBI_R_onoff: 0, 0 DBI_W_onoff: 0, 0 data_width: 16 test2_1: 0x55000000 test2_2: 0xaa000100 frequency: 16
uboot-mediatek: add support for Xiaomi Redmi Router AX6000
U-Boot flash instructions:
0. OpenWrt U-Boot does not support stock layout, it comes with recovery
boot support, automatic tftp recovery and never blocks UART.
A new flash layout is introduced, we call it OpenWrt U-Boot layout,
stock flash layout and the old OpenWrt layout are not supported.
During the whole flash procedure, please do not reboot or power off
unless requested explicitly, or you will break your device.
1. Your device should already running OpenWrt.
If not, follow the instructions to flash OpenWrt:
https://github.com/openwrt/openwrt/pull/11115
2. Backup BL2 Nvram Bdata Factory and FIP in case you break something or
in case you want to go back to stock firmware one day.
cat /dev/mtdblock0 > /tmp/BL2.bin
cat /dev/mtdblock1 > /tmp/Nvram.bin
cat /dev/mtdblock2 > /tmp/Bdata.bin
cat /dev/mtdblock3 > /tmp/Factory.bin
cat /dev/mtdblock4 > /tmp/FIP.bin
And save all whose bin files to somewhere safe.
Then backup your configurations, since ubiformat for entire mtd device is
required to create new ubootenv volume for OpenWrt U-Boot.
3. Run the following cmd to boot into an initramfs with the new OpenWrt
U-Boot layout that expand ubi partion to the end of flash:
ubiformat /dev/mtd7 -y -f /tmp/ax6000-ubootmod-initramfs-factory.ubi
4. After boot into initramfs, check mtd partion info.
The ubi partion should be mtd5
root@OpenWrt:~# cat /proc/mtd
dev: size erasesize name
mtd0: 00100000 00020000 BL2
mtd1: 00040000 00020000 Nvram
mtd2: 00040000 00020000 Bdata
mtd3: 00200000 00020000 Factory
mtd4: 00200000 00020000 FIP
mtd5: 07a80000 00020000 ubi
5. Load kmod-mtd-rw to temporarily make the bootloader partions writable.
The kmod-mtd-rw is from the feeds, it is not packed in initramfs-factory
by default.
To install kmod-mtd-rw via opkg:
opkg update && opkg install kmod-mtd-rw
Or, download kmod-mtd-rw.ipk from OpenWrt server and install it manually
e.g:
https://downloads.openwrt.org/snapshots/targets/mediatek/filogic/kmods/
Select your OpenWrt release version and kernel version accordingly.
Load kmod-mtd-rw:
insmod /lib/modules/$(uname -r)/mtd-rw.ko i_want_a_brick=1
6. Run the following cmd to clean all pending crash dumps in pstore,
or OpenWrt U-Boot may boot into NAND recovery or tftp recovery.
rm -f /sys/fs/pstore/*
7. Format ubi and create new ubootenv volume:
ubidetach -p /dev/mtd5; ubiformat /dev/mtd5 -y; ubiattach -p /dev/mtd5
ubimkvol /dev/ubi0 -n 0 -N ubootenv -s 128KiB
ubimkvol /dev/ubi0 -n 1 -N ubootenv2 -s 128KiB
8. This is optional. Skip this if you do not want to have NAND recovery
boot feature offered by OpenWrt U-Boot. Don't worry, you always have
automatic tftp recovery feature enabled.
ubimkvol /dev/ubi0 -n 2 -N recovery -s 10MiB
ubiupdatevol /dev/ubi0_2 /tmp/ax6000-ubootmod-initramfs-recovery.itb
9. Now, flash new U-Boot. Bye-bye ugly stock U-Boot.
mtd write /tmp/ax6000-ubootmod-preloader.bin BL2
mtd write /tmp/ax6000-ubootmod-bl31-uboot.fip FIP
10. Flash the squashfs-sysupgrade.bin as usual:
sysupgrade -n /tmp/ax6000-ubootmod-squashfs-sysupgrade.itb
Enjoy!
Signed-off-by: Furong Xu <[email protected]>
mediatek: add Xiaomi Redmi Router AX6000 support
Hardware specification:
SoC: MediaTek MT7986A 4x A53
Flash: ESMT F50L1G41LB 128 MB
RAM: K4A4G165WF-BCWE 512 MB
Ethernet: 4x 10/100/1000 Mbps
WiFi1: MT7976GN 2.4GHz ax 4x4
WiFi2: MT7976AN 5GHz ax 4x4
Button: Mesh, Reset
Flash instructions:
1. Gain ssh and serial port access, see the link below:
https://openwrt.org/toh/xiaomi/redmi_ax6000#installation
2. Use ssh or serial port to log in to the router, and
execute the following command:
nvram set boot_wait=on
nvram set flag_boot_rootfs=0
nvram set flag_boot_success=1
nvram set flag_last_success=1
nvram set flag_try_sys1_failed=8
nvram set flag_try_sys2_failed=8
nvram commit
3. Set a static ip on the ethernet interface of your computer
(e.g. default: ip 192.168.31.100, gateway 192.168.31.1)
4. Download the initramfs image, rename it to initramfs.bin,
and host it with the tftp server.
5. Interrupt U-Boot and run these commands:
setenv mtdparts nmbm0:1024k(bl2),256k(Nvram),256k(Bdata),2048k(factory),2048k(fip),256k(crash),256k(crash_log),112640k(ubi)
saveenv
tftpboot initramfs.bin
bootm
6. After openwrt boots up, use scp or luci web
to upload sysupgrade.bin to upgrade.
Revert to stock firmware:
Restore mtdparts back to default, then use the
vendor's recovery tool (Windows only).
Signed-off-by: Chukun Pan <[email protected]>
Redmi AX6000 · Padankan label sebelum memilih imej
Catat semakan dan rantau pada label, kemudian padankan jadual dengan halaman peranti rasmi. Profil mengenal pasti binaan. Firmware dan pemuat but sedia ada menentukan cara pemasangan pertama.
Jika label, susun atur flash atau cara pemulihan belum jelas, berhenti sebelum menulis. Imej sysupgrade dalam ruangan naik taraf sahaja belum membuktikan laluan daripada firmware kilang.
Komen