Skip to content
Libre Computer
Platform

Embedded Linux, from power-on up

Learn how a computer boots, on a board on your desk

You will take a single-board computer from the moment power reaches it to a finished project: its parts and power rails, the code inside the chip that runs first, the memory, the bootloader, UEFI and Linux, then real parts wired to the 40-pin header.

Every step happens on your own board. In the first lab you capture everything it prints while it starts; by the end you can explain every line of it.

  • 13 modules
  • 10 labs
  • Das Frite or Solitude
  • Work in pairs
123444456789101112131S805X system-on-chip2DDR4 memory3SPI NOR flash (underside)4Buck regulators5Linear regulator624 MHz crystal7Boot select switch840-pin header9USB Type-C10HDMI11Ethernet12USB 2.013Composite video
123444456789101112131415161617171S905D3 system-on-chip2LPDDR4 memory3SPI NOR flash4Buck regulators5Linear regulator6Crystal7Boot select switch8microSD (underside)9Gigabit Ethernet PHY10USB 3.0 hub1140-pin header12Serial console header13USB Type-C14HDMI15Ethernet16USB 3.017Camera and display

Pick your board

Your class uses Das Frite or Solitude. Choose it with the Platform switch at the top of the page; every module then shows that board's parts, power rails, pins and wiring. Not sure which one you have? The model number is printed on the board: AML-S805X-AC-V2 is Das Frite, AML-S905D3-CC is Solitude.

Before you start you should be able to program in C, C++ or Python and know basic circuits: voltage, current, pull-ups. You do not need to know Linux; module 0 starts with the shell.

The path

Each module is one stage of what the board does after power-on, and needs only the ones before it.

Modules 0–2

Meet the board

Boot it and capture its log, find its parts, and measure its power rails.

Modules 3–5

The first microseconds

The boot ROM, the first stage in on-chip SRAM, and bringing up memory.

Modules 6–8

Up to Linux

The bootloader, UEFI, and the kernel's boot to a login prompt.

Modules 9–12

Make it do something

The device tree, GPIO, I2C, SPI and UART, drivers, and a whole system as your final project.

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).
Every stage runs from the only memory that works at that moment, and its last job is to load the next one. The modules take them in this order.

What you need

Questions

Do I need to know Linux already?

No. Module 0 starts with the shell and the Linux tools the labs use. You do need one programming course in C, C++ or Python and basic circuits.

Do I need an Android phone?

No. The labs use the Libre Computer app for Android where it helps, and every lab also works with the bench PC instead: a desktop imager writes images (your bench), and the Amlogic USB boot tool starts the board over USB (module 3, lab 3).

What if I break my board?

Usually nothing that spare boot media cannot fix, and recovering a board is part of the course: the code that runs first is fixed in the chip, so a board can always be started again over USB. See when it will not boot. The one real danger is 5 V on a GPIO pin: the header's GPIO pins are 3.3 V only. Power sensors and modules from a 3.3 V pin. The 5 V pin powers only a load switched through a MOSFET that draws under about 200 mA, such as lab 6's motor or a relay coil; anything larger gets its own supply, sharing only ground with the board. A servo runs from its own 5 V supply, sharing only ground with the board; only its control signal comes from a pin. Your bench has the rules.

Where do I get help?

Your instructor and TA first. For the boards themselves, the Libre Computer Hub has guides and answers for every board.