In the previous post, we saw how to compile u-boot image from the mainline source, for our Orange Pi Zero 2 development board. If we want to boot u-boot on the board, one obvious way is to prepare a minimal SD card where the u-boot image goes. However, this approach does not scale well, because every time you re-compile u-boot, you need to plug out the SD card from the board, insert into the host machine, copy the new u-boot image and plug the SD card back to the development board. This takes a lot of time, and more than that, there are chances of damaging the board due to repeated SD card insertions/removals.
In this post, we are going to learn about a new boot method supported by almost all AllWinner SOCs called FEL boot mode, or USB boot mode. In this mode, the Orange Pi Zero 2 development board presents itself as a USB OTG device on the development machine. Once the device is in USB mode, you can point it to boot the u-boot image (or any binary, in fact), from the development host machine directly.
The first step is to get the Orange Pi Zero 2 board detected as a USB OTG device on the host development machine. There are various ways to get this done and you can read about them here. However, the easiest way is by having no valid bootable image. If the ROM code does not find a valid bootable image, it falls back to the FEL mode.