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:
- Build the project you proposed and show one working subsystem at the checkpoint.
- 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.
- Write the recovery up as a runbook another student could follow, then demonstrate the finished project in lab 10.
Resources
| Resource | Use in this module |
|---|---|
| Board firmware update images | Restoring a board's firmware |
| libretech-flash-tool | Writing a bootloader or an image to boot media from Linux |
| eMMC flashing steps from Linux with pyamlboot | Recovery over USB from a PC |
| La Frite eMMC flashing steps from Linux | Writing an eMMC module on Das Frite's chip family |
| Buildroot for Libre Computer boards | Building a whole image |
| Board performance tests and data | What to expect under load |