FEL/USBBoot

On allwinner SoCs it is possible to boot over USB. This requires an especially built u-boot, but needs no further changes compared to the build steps in the manual build howto.

By booting over USB, it is possible to forgo the SD-Card entirely, and it is especially useful for devices where no UART can be found, or where the UART is multiplexed with the SD-Card. You can then use a micro-SD breakout adapter to access the serial port.

= Preparing U-Boot =

U-boot needs to be built specifically for booting over USB. This is called FEL mode, and enabling this disables the full SD card (for u-boot, script.bin and the kernel might re-enable it later on).

Just follow the guide to compile u-boot, but  select a target whose name has _FEL.

= Booting over USB =

Boot the device in FEL mode
Please refer to the FEL howto for information on how to boot to FEL mode. Device pages should mention the button which triggers FEL mode as well.

Using the fel utility
There is a utility in the sunxi-tools repository called fel. It talks to your device over USB, so attach the USB cable after having booted into FEL mode.

If you run: ./fel version

and it returns something like: AWUSBFEX soc=00162500(A13) 00000001 ver=0001 44 08 scratchpad=00007e00 00000000 00000000

Then you have successfully booted into fel mode.

Manual loading
While the script from the next section is perhaps better, you can now choose to load u-boot manually:

fel write 0x2000 ../u-boot/spl/u-boot-spl.bin fel exe 0x2000 fel write 0x4a000000 ../u-boot/u-boot.bin fel exe 0x4a000000

usb-boot script
There is a script in the sunxi-tools repository called  usb-boot. You can use it as follows:

Usage: ./usb-boot u-boot-spl.bin u-boot.bin [boot.scr] [kernel script.bin [initramfs]]

u-boot-spl.bin and u-boot.bin are the u-boot binaries which are FEL enabled.

boot.scr is the u-boot script. If you do not specify a file ending with .scr the default is used.

uImage is your compiled kernel image.

script.bin is your hw configuration converted to binary from .fex.

initramfs is an optional initramfs/initrd image in u-boot mkimage format.

Known issues
When using the default usb-boot settings, initramfs images over 1 MB will not be loaded by the kernel and the kernel will panic on mounting the rootfs. = See also =


 * FEL
 * miniroot