Mi Router 4A Gigabit Edition stuck in initramfs mode

I see two solution only:

  1. serial access to your router, and
    • boot an OpenWrt SNAPSHOT or 22.03.03 of initramfs.bin through TFTP
    • do a simple sysupgrade with the same version of OpenWrt but now with a sysupgrade.bin
    • changing bootloader to a third party bootloader (at least for temporary)
    • flashing the correct version of OpenWrt
    • (optional) rollback to current bootloader
    • (if you mess up something you only way is #2)
  2. reprogramming your flash with an SPI programmer

Ok, there could be a third solution, but it depends on the bootloader your device has:
If it does support your CF EON flash chip you could use it's recovery function:

  • OEM booloader (an U-Boot) supports TFTP recovery, but accepts only stock firmwares
    • I have no access to a stock firmware which contains an U-Boot which supports this new chip and it's TFTP recovery isn't bugged! :see_no_evil:
  • BREED bootloader (third party BL, use the breed-mt7621-pbr-m1.bin edition) has nice HTTP GUI for recovery
    • newer versions support your flash chip
  • updated U-Boot by @db260179 (you should self-build it for now), it also has a nice HTTP GUI for recovery
    • the support was committed to the repository but no new release was made