You probably need to write the settings mentioned here: Adding OpenWrt support for Xiaomi "Redmi Router AX6S"/"Xiaomi Router AX3200" - #1688 by remittor
On new Xiaomi bootloaders, the `flag_try_sysX_failed` counter increases with each reboot. The stock firmware resets the `flag_try_sysX_failed` counter to 0 after a successful boot.
It probably makes sense to do the same in OpenWRT firmware.
Example of a similar task: [https://github.com/openwrt/openwrt/blob/ced3fbcda18e200315cb077f7e2b362ae52ee065/target/linux/ramips/mt76x8/base-files/etc/init.d/bootcount#L11-L14 ](https://github.com/openwrt/openwrt/blob/ced3fbcda18e200315cb077f7e2b362ae52ee065/target/linux/ramips/mt76x8/base-files/etc/init.d/bootcount#L11-L14)
Official installation manual: [https://openwrt.org/toh/xiaomi/ax3200 ](https://openwrt.org/toh/xiaomi/ax3200)
[quote]
5. Execute the following commands to prepare device for OpenWrt flashing:
nvram set ssh_en=1
nvram set uart_en=1
nvram set boot_wait=on
nvram set flag_boot_success=1
nvram set flag_try_sys1_failed=0
nvram set flag_try_sys2_failed=0
nvram commit
[/quote]
For the 2022 bootloader, this option is incorrect!
For a new bootloader you should do this:
nvram set boot_fw1="run boot_rd_img;bootm”
nvram set flag_try_sys1_failed=8
nvram set flag_try_sys2_failed=8
nvram set flag_boot_rootfs=0
nvram set flag_boot_success=1
nvram set flag_last_success=1
nvram commit