[Tutorial] Odroid C4 rootfs on USB drive [deprecated as of kernel 6.6]

I find the easiest way to do USB boot is to create a small VFAT partition on an SDCARD, flash mainline u-boot to it and place the following boot script on the partition.

boot.cmd

setenv bootlabel "USB Boot"
usb start; if usb dev ${devnum}; then devtype=usb; run scan_dev_for_boot_part; fi

mkimage -C none -A arm -T script -d boot.cmd boot.scr

Flash an odroidc4 img to a USB drive, insert both the SD and USB into the device and power on. Depending on the board, you may need to use a specific USB port for it to work. I’ve tested this on Amlogic and Allwinner. There are other methods that can be used, but unless you have an SPI flash or Eeprom on the board, you would still need an SD or eMMC attached for it to work.