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
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 checkprintsbootrom: available, thenlc bootrom resetprintsbootrom: forcedand 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 printprints the boot ROM's order (bootrom_order=), the boot straps and the boot-relevant fuses, read from the chip, andprintenv bootsourcenames the medium this boot came from. (Firmware from before 28 November 2026 haslc bootsettings printinstead.)
On the bench
In short, what you do in lab 3, where the steps are given in full:
- In the Lab 1 log, mark the lines printed before any code from the SPI flash or the boot media ran.
- 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 printreports 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. - 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
| Resource | Use in this module |
|---|---|
| Troubleshooting boot issues on Amlogic boards | What an Amlogic board prints, and where boots stop |
| boot.libre.computer | The published boot files the app sends to a board in USB boot mode |
| The Libre Computer app | USB boot from a PC; on Linux its lc boot command also sends your own build |