How to Install OpenWrt on the Redmi AX6000
{{<notice “danger”>}} WARNING: These procedures are not for beginners. Proceeding means accepting the risk; I am not responsible for damage, although I will try to help if problems occur.
-
There are two procedures for two different OpenWrt layouts:
- Version 1 uses the stock bootloader.
- Version 2 uses U-Boot Mod. {{}}
-
Requirements:
- A router with SSH enabled (guide).
- Basic command-line skills.
- Careful attention to every command and its order.
-
Prepare:
- An Ethernet cable between the PC and router. See this Cat6 cable on Shopee if a separate recovery cable is needed.
- WinSCP for Windows, available here.
- OpenWrt firmware from the official downloads.
I. Install the stock-bootloader OpenWrt version
Download these files from OpenWrt:
xiaomi_redmi-router-ax6000-stock-initramfs-factory.ubixiaomi_redmi-router-ax6000-stock-squashfs-sysupgrade.bin
Open WinSCP:
- File Protocol: SCP
- Hostname: normally
192.168.31.1, port22 - Username: root
- Password: generate the root password from the router SN.
Click Copy to copy the generated password.
{{< collapse “SCP login screenshot” >}}
{{< /collapse >}}
In SCP, double-click the tmp directory on the right and upload openwrt-mediatek-filogic-xiaomi_redmi-router-ax6000-stock-initramfs-factory.ubi.
Log in over SSH and run the commands below in the correct order. Run only the block matching the value returned by cat /proc/cmdline (firmware=1 or firmware=0).
{{
After reboot, the router address is 192.168.1.1. Log in over SCP at 192.168.1.1:22 (no password), open tmp, and upload openwrt-mediatek-filogic-xiaomi_redmi-router-ax6000-stock-squashfs-sysupgrade.bin.
Log in over SSH and run:
{{
The stock-bootloader OpenWrt installation is complete.
II. Install the U-Boot Mod OpenWrt version
{{<notice “danger”>}} The router must already be running OpenWrt with the stock bootloader. Incorrect U-Boot steps or a corrupted download can brick it. Verify the network, PC, and file integrity before proceeding. {{}}
Prepare:
- xiaomi_redmi-router-ax6000-ubootmod-bl31-uboot.fip
- xiaomi_redmi-router-ax6000-ubootmod-preloader.bin
- xiaomi_redmi-router-ax6000-ubootmod-initramfs-factory.ubi
- xiaomi_redmi-router-ax6000-ubootmod-squashfs-sysupgrade.itb
{{<notice “tip”>}} These links use OpenWrt 23.05.2. Find newer versions at OpenWrt.org. {{}}
II.1 Back up the stock-bootloader installation
Log in over SSH and run:
{{
Use WinSCP to download these files from tmp to the PC.
II.2 Install U-Boot Mod
II.2.1 Flash initramfs
Upload xiaomi_redmi-router-ax6000-ubootmod-initramfs-factory.ubi to /tmp, then run:
{{
After reboot, check the partition table:
cat /proc/mtd
The ubi partition must be mtd5.
II.2.2 Unlock the bootloader partition
Official OpenWrt locks the bootloader partition. Install and load kmod-mtd-rw:
{{
Clear persistent logs so OpenWrt does not automatically boot into recovery:
rm -f /sys/fs/pstore/*
II.2.3 Format UBI and create U-Boot environment volumes
ubidetach -p /dev/mtd5; ubiformat /dev/mtd5 -y; ubiattach -p /dev/mtd5ubimkvol /dev/ubi0 -n 0 -N ubootenv -s 128KiBubimkvol /dev/ubi0 -n 1 -N ubootenv2 -s 128KiB
II.2.4 Flash U-Boot Mod
Upload these files to /tmp:
xiaomi_redmi-router-ax6000-ubootmod-bl31-uboot.fipxiaomi_redmi-router-ax6000-ubootmod-preloader.binxiaomi_redmi-router-ax6000-ubootmod-squashfs-sysupgrade.itb
mtd write /tmp/xiaomi_redmi-router-ax6000-ubootmod-preloader.bin BL2mtd write /tmp/xiaomi_redmi-router-ax6000-ubootmod-bl31-uboot.fip FIP
II.2.5 Install U-Boot Mod OpenWrt
sysupgrade -n xiaomi_redmi-router-ax6000-ubootmod-squashfs-sysupgrade.itb
The U-Boot Mod OpenWrt installation is complete.
Comments & Discussion
Share your thoughts, ask questions and feedback