Constant reflashing. Help!

Here is the translation of your message into English:


Hello, I have a Xiaomi AX6S router, and I installed OpenWrt firmware versions 23.05.4 and 23.05.3. In both cases, everything works fine, but sometimes when I reboot, the router stops loading and the yellow light blinks for a long time. I have to do a factory reset from Xiaomi, then reinstall OpenWrt again. This cycle has become frequent, and I'm wondering, does this happen with all routers, or is it just mine? What could be the cause?

Normally routers are not rebooted "sometimes"
No, they should reboot just fine every time.
First upgrade to 23.05.5 , if you have something else permanently on try to collect system logs from router leading to failed reboot.

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

I changed my mind.
It's better not to do that.