OpenWrt support for Xiaomi AX3000T

The recovery image has nothing to do with TFTP, as mentioned in the posts above by @RHBH and myself.
It's an image that will be booted automatically under these conditions:

  1. pstore check returned true. pstore check is unique to OpenWrt through this patch: https://github.com/openwrt/openwrt/blob/main/package/boot/uboot-mediatek/patches/230-cmd-add-pstore-check.patch , it means a kernel oops/panic was logged into persistent RAM and this log was then detected after the restart (note that there is no condition for handling this if there is no image within the recovery volume, the system will deadlock and require you to power off and then on again), see: https://docs.u-boot.org/en/latest/usage/cmd/pstore.html
  2. The production system in the fit volume (kernel) failed to load or the rootfs_data volume didn't exist and u-boot failed to create it.

TFTP will only be performed once booting of the recovery image fails.

Also, the reset button behavior mentioned by @RHBH, is only applied during first boot, when the environment is read from the u-boot image, rather than ubootenv/ubootenv2.
boot_first=if button reset ; then led $bootled_rec on ; run boot_tftp_recovery ; setenv flag_recover 1 ; run boot_default ; fi ; bootmenu
Also, only under this condition can TFTP write the retrieved image to volume recovery (and remove your previous rootfs_data volume), otherwise the image will remain in RAM only (and your rootfs_data volume will remain unchanged, keeping your packages and configs).
You can change these u-boot behaviors through fw_setenv, if you so desire.
Holding any button during a reboot will be handled once the OpenWrt kernel boots. The default behavior is to only mount /rom, starting OpenWrt in factory settings.

You only need a recovery image within the recovery volume, if you can't rely on TFTP.

  1. WiFi devices only.
  2. No switch drivers (this is a case for non-current snapshot/24.10.0 u-boot on AN8855).
  3. Nonfunctional switch.
2 Likes