Skip to content
Libre Computer
Platform

Module 3 · Lab 3

The boot ROM

When reset is released, the CPU starts at a fixed address inside the system-on-chip, in code written at the factory. That code cannot be changed or erased, which is why a board with broken firmware or boot media can always be brought back.

Where this stage sits

The boot chain: each stage loads the nextBoot ROMfixed in the chipmodule 3First stageclocks, consolemodule 4Memory bring-uptimings, trainingmodule 5Secure monitorTF-A, stays residentmodule 6U-Bootstorage, USB, networkmodule 6UEFIstandard interfacemodule 7Linux kerneldrivers, rootmodule 8initsystemd, servicesmodule 8runs from On-chip ROMruns from On-chip SRAMruns from DRAMPower and reset come first (module 2); I/O, drivers and your project run on the finished system (modules 9 to 12).
Where this module sits in the boot chain.

Key ideas

  • The boot ROM (also called the mask ROM) is part of the silicon. Its whole job is to find the first stage of the bootloader and start it.
  • It tries boot sources in a fixed order, such as SPI flash, eMMC and the SD card. Both course boards have a boot select switch that changes which source is tried first; the schematic's boot page shows how.
  • From the first source that holds a valid image, it reads a small first stage, checks its header (and on a secured device, its signature, against keys held in fuses), copies it into on-chip SRAM and jumps to it.
  • If no source holds a valid image, it waits in USB boot mode for a computer to send the first stage over USB. The Libre Computer app and the recovery tools use this. To get there at power-on, hold Solitude's USB boot button; on Das Frite, set the boot select switch to its USB position, which skips the SPI flash, with no eMMC module carrying a bootloader.
  • A running bootloader can ask for USB boot mode too. At the course boards' U-Boot prompt, lc bootrom check prints bootrom: available, then lc bootrom reset prints bootrom: forced and the board restarts in USB boot mode, with no button or switch. The power-on way in (the button, or Das Frite's switch) stays the way when U-Boot does not start.
  • U-Boot can also show what the boot ROM was set to do: lc bootrom print prints the boot ROM's order (bootrom_order=), the boot straps and the boot-relevant fuses, read from the chip, and printenv bootsource names the medium this boot came from. (Firmware from before 28 November 2026 has lc bootsettings print instead.)

On the bench

In short, what you do in lab 3, where the steps are given in full:

  1. In the Lab 1 log, mark the lines printed before any code from the SPI flash or the boot media ran.
  2. Flip the boot select switch and power on: watch the boot ROM try its sources in a different order, and write down what you observe; compare it with what lc bootrom print reports at the U-Boot prompt. In the position that skips the SPI flash, boot media with no bootloader of its own (Das Frite's boot ROM does not read a USB drive at all) leaves the board in USB boot mode, so read that position at the prompt of a USB start.
  3. Put the board in USB boot mode at power-on (Solitude: hold the USB boot button; Das Frite: the boot select switch at USB) and connect a PC running the Libre Computer app to the USB Type-C port; let it send the first stage, and see the board start without its own firmware.

Resources

ResourceUse in this module
Troubleshooting boot issues on Amlogic boardsWhat an Amlogic board prints, and where boots stop
boot.libre.computerThe published boot files the app sends to a board in USB boot mode
The Libre Computer appUSB boot from a PC; on Linux its lc boot command also sends your own build