Come on, there's 2000+ posts on this thread and recent posts are still debating best practices. I've made these notes - are they correct, or not?
Use the XMIR Patcher to perform the standard install. Apparently it may be required to sidegrade to a beta version of the stock firmware to enable Telnet which will allow the XMIR patcher to function
Once you have installed 24.10 factory, run the following command:
Run the following commands via SSH:
1. uci set system.@system[0].compat_version="2.0"
2. nvram set ssh_en=1
3. nvram set uart_en=1
4. nvram set boot_wait=on
5. nvram set flag_boot_success=1
6. nvram set flag_try_sys1_failed=8
7. nvram set flag_try_sys2_failed=8
8. nvram commit
OK, I finally got around to testing this last night. 20+ reboots and no issues. Here are my install notes:
Assuming you are using a vulnerable stock firmware (such as 1.0.57), you can use the XMIR Patcher to perform the standard install. Simply add the OpenWrt factory install bin file to the “firmware” folder and run the .bat file. All you need to do is connect to the router and install firmware via XMIR Patcher, the other options are not needed.
Once you have installed the OpenWrt factory install image, log in and ensure you have a working WAN connection (e.g. via WAN ethernet or Wi-Fi client)
IMPORTANT: Connect to your router via SSH and run the following commands. These ensure that the router will not brick itself after 6 reboots:
uci set system.@system[0].compat_version="2.0" && opkg update && opkg install kmod-mtd-rw
Once rebooted, you should be done. Feel free to check your flags via the "fw_printenv", and make sure that “flag_try_sys1_failed=8”. This will ensure that your router will not brick itself. Done!
Thank you for the help, worked great and it already had "option compat_version '2.0'" set. Not sure why I can't get 5Ghz/radio1 working, will keep trying.
Edit:
Nevermind, had to set the country code it looks like.
I have "OpenWrt SNAPSHOT, r28821-9fb44638ba" and I have no idea what release it is, what main version is this or whatever, I got it like this.
does not work for me:
root@konnichiwa:~# cd /tmp
root@konnichiwa:/tmp# wget -O factory.bin https://downloads.openwrt.org/snapshots/targets/mediatek/mt7622/openwrt-mediat
ek-mt7622-xiaomi_redmi-router-ax6s-factory.bin
--2025-05-04 18:02:19-- https://downloads.openwrt.org/snapshots/targets/mediatek/mt7622/openwrt-mediatek-mt7622-xiaomi_redmi-router-ax6s-factory.bin
Resolving downloads.openwrt.org... 2a04:4e42::644, 2a04:4e42:600::644, 2a04:4e42:200::644, ...
Connecting to downloads.openwrt.org|2a04:4e42::644|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 12582912 (12M) [application/octet-stream]
Saving to: 'factory.bin'
factory.bin 100%[=================================================>] 12.00M 12.8MB/s in 0.9s
2025-05-04 18:02:21 (12.8 MB/s) - 'factory.bin' saved [12582912/12582912]
root@konnichiwa:/tmp# mount -o remount,ro /
root@konnichiwa:/tmp# mount -o remount,ro /overlay
root@konnichiwa:/tmp# dd if=factory.bin bs=1M count=4 | mtd write - kernel
Could not open mtd device: kernel
Can't open device for writing!
Update: I couldn't find a way to check if the partition layout is already corrected or not. mtd failed every time I tried flashing as described. I found a post somewhere with a similar snapshot version/commit/whatever to mine that indicated it should be 24.10 so I just manually modified compat version to 2.0 from 1.0 then flashed sysupgrade file and now it works.