How to Change Boot Order on Libre Computer Boards

Please take a moment to read the boot design documentation.

BootROMs programmed into each SoC behave differently. BootROMs usually can boot from SPI NOR flash or MMC-based devices such as SD card or eMMC.

For boards designed before 2018 such as Le Potato, Tritium, and Renegade, booting from block storage devices are only possible from MicroSD or eMMC. There’s additional boot methods that are out of scope since they are proprietary methods not involving block storage devices.

For boards designed in or after 2018, we have software that abstracts the non-standard boot elements and pre-load it on SPI NOR on the boards so they can boot directly to a standard UEFI-boot-capable firmware much like the BIOS in PCs.

This firmware will attempt to read the file boot.ini from a FAT or EXT partition on the eMMC to override it’s own pre-defined variables in order to change boot behavior. For boards designed before 2018, the image must provide the firmware so they will read boot.ini from whichever device the board was booted from including SD cards.

The last stage of board firmware is u-boot which is an advanced bootloader with environment variables and a basic shell. u-boot scans all block media and attempts to boot the UEFI application it finds. The scanning is controlled by the environment variable boot_targets. We can override this variable with boot.ini to set the OS boot device. Please note that the OS boot device can be different from the device that the BootROM loaded the firmware from.

The standard value for boot_targets is usually mmc0 mmc1 usb.

  • mmc0 is the eMMC
  • mmc1 is the SD card
  • usb is USB block storage devices

For example, we can change the order by creating a boot.ini file with the following content:

boot_targets=usb mmc1 mmc0

This will change the boot scan order to USB first, then SD card, and finally eMMC.

2 Likes