Skip to content
Libre Computer
Platform

Module 12 · Labs 9–10

A whole system

The final project is a small product: it starts on its own, survives having its power pulled, and can be rebuilt by someone else. And because you know every stage of the boot, a board that will not start is a problem you can solve.

Key ideas

  • Start on boot: the application is a systemd service, with a restart policy and logs.
  • Survive a power cut: a read-only root filesystem with a small writable area, careful writes and journaling keep boot media from being corrupted.
  • Watchdogs restart a system that hangs; thermals decide whether the board keeps its clock speed under load.
  • Security basics: no default passwords, SSH keys, and a plan for updates.
  • Recovery: the boot ROM can always be reached over USB, so a broken bootloader or boot media is fixed by starting the board over USB and re-writing its storage.
  • Where next: building a whole image with Buildroot or Yocto, real-time Linux, and contributing upstream.

On the bench

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

  1. Build the project you proposed and show one working subsystem at the checkpoint.
  2. On spare boot media, break the boot configuration on purpose, then recover: read the console to see where it stops, start the board over USB from the phone or a PC, and restore it.
  3. Write the recovery up as a runbook another student could follow, then demonstrate the finished project in lab 10.

Resources

ResourceUse in this module
Board firmware update imagesRestoring a board's firmware
libretech-flash-toolWriting a bootloader or an image to boot media from Linux
eMMC flashing steps from Linux with pyamlbootRecovery over USB from a PC
La Frite eMMC flashing steps from LinuxWriting an eMMC module on Das Frite's chip family
Buildroot for Libre Computer boardsBuilding a whole image
Board performance tests and dataWhat to expect under load