Skip to content
Libre Computer
Platform

Lab setup

Stations, bench and recovery

What each station and bench needs, what to check before the term, and how to bring back a board a student could not.

Each student station

Shared by one pair of students. The lab numbers refer to the students' labs page.

ItemQuantityUsed in labs
Das Frite or Solitude1All
Bench PC (Linux) with a USB card and drive reader: a serial terminal, the desktop imager, the Libre Computer app (its Linux package also installs the lc command), libretech-builder-simple, and the logic analyser's capture and decode software (such as PulseView) with its I2C, SPI and UART decoders. Students' own laptops can run the terminal1All
5 V USB Type-C power supply rated for the board (Das Frite: 2 A; Solitude: 3 A)1All
Boot media for the OS. Das Frite: a 32 GB USB flash drive. Solitude: a 32 GB microSD card, class A1 or better2 (one holds a spare image)All
USB cable from the bench PC to the board's USB Type-C port13, 4, 9
3.3 V USB-to-UART adapter for the serial console11, 3–10
Ethernet cables to the lab network switch, one for the board and one for the bench PC2All
Inline USB Type-C power meter (voltage and current)12
Breadboard, female-to-male jumper wires, LEDs, resistors, two push buttons and a 10 kΩ potentiometer1 set6–9
Motor set: a logic-level N-channel MOSFET fully on at a 2.5 V gate (such as an AO3400 on a breakout board), a 1N5819 Schottky diode, 100 Ω and 10 kΩ resistors, and a small 5 V DC motor drawing under 200 mA1 set6, 9
SSD1306 128 × 64 OLED display (I2C)17, 9
DS3231 real-time clock module (I2C)16, 7, 9
MCP3008 8-channel ADC (SPI)17, 8, 9
One analog sensor, such as a thermistor or a light sensor, with a 10 kΩ resistor to wire it as a voltage divider17, 9
Heatsink1All

No lab needs a phone: the bench PC writes images with the desktop imager and starts a board over USB with the Libre Computer app. Final-project parts are extra and chosen by each pair.

Shared bench equipment

One set for every four to six stations.

ItemUsed for
USB logic analyser, 8 channels, 24 MHz classTiming and bus decoding in labs 6–8
MultimeterMeasuring rails in lab 2 and the LED current in lab 6, and checking supplies and wiring
Ethernet switch on an isolated lab network, with a small router on it serving DHCP (its internet uplink left unplugged)SSH and network access to the boards
Oscilloscope (optional for the term, needed once before it)Capturing the power-up traces every bench gets in lab 2, and showing a live power-up
Microcontroller development board (semester only)The real-time comparison in the semester's GPIO lab

Setting up the lab

  • Pre-test every board. Boot each one from known-good boot media, check that Ethernet links and the I2C and SPI overlays apply, and label it with its station number. The Libre Computer app's Test the board runs the board checks (USB link, partitions, bootloader, storage read, memory, SPI flash, Ethernet and eMMC health); run it on each board as part of the pre-test. At each board's U-Boot prompt, check that lc bootrom print answers, which lab 3 needs; if it does not, write the current boot firmware to SPI flash with the app's Firmware page.
  • Choose one image for the term from libre.computer downloads. Record its checksum and how students first log in (its default login, or, on an image with none, the root password it asks for on the console at first boot and the user students then create for SSH), write two USB drives (Das Frite) or microSD cards (Solitude) per station, and keep the image file on the bench PCs so no lab waits on a download.
  • Capture the power-up traces. Until published traces are on the materials page, probe the 5 V input, the rails and reset on one board per platform with a multi-channel oscilloscope, capture one power-up, and copy the capture to every bench PC for lab 2. A borrowed scope is enough: it is needed once.
  • Prepare the build. Build the open boot chain for your platform with libretech-builder-simple on the bench PCs once per term, and test starting a board over USB with it, and with a changed memory clock, before Lab 3.
  • Confirm kernel headers. The kernel-module part of the driver lab needs headers that match the chosen image; stage them with the course tools.
  • Keep the boot files on the bench PCs. The published first stage and boot files from boot.libre.computer for starting a board over USB (lab 3 and recovery). A board's boot firmware in SPI flash is restored with the Libre Computer app's Firmware page, on both boards.
  • Choose the section's stock distribution for lab 5. Pick one generic arm64 distribution from module 7's resources, and keep its image and published checksum on the bench PCs beside the course image. Record its default login, or how its first-boot setup creates one, for students.
  • Stage the course tools. The lab network has no internet, so put the packages of libretech-wiring-tool and memtester that match the term image on the bench PCs, together with any of these the image lacks: dtc (lab 6), libgpiod with its C and Python bindings and its command-line tools, gpiodetect, gpioinfo, gpioset, gpioget and gpiomon (lab 6), i2c-tools (lab 7), a C and C++ compiler with make (labs 6 to 8, and the lab 8 kernel module), the Python spidev and smbus2 modules (labs 7 and 8) and the kernel headers matching the image (lab 8). On the bench PCs themselves, install the logic analyser's capture and decode software with its I2C, SPI and UART decoders (labs 6 to 8). Students install them at the end of lab 1.
  • Keep the boards on a lab network. Use an isolated switch, with a small router on it serving DHCP and its uplink left unplugged (or a DHCP service on one bench PC), and connect each station's board and bench PC to it, so students can log in to the board and copy files to it from the bench PC. Put no board on the campus network without your school's approval.
  • Give students a way to read. The labs open online references: the GPIO, layout and power viewers, the boards' schematics, part datasheets, the kernel's documentation and hub guides. Students read them on their own laptops or phones on the campus network, or give each bench PC a second, campus connection kept apart from the lab switch. Put the station parts' datasheets as files on every bench PC as well, and print each platform's 40-pin header map from the GPIO pinout for every station: the practical midterm allows datasheets, man pages and --help output, and the printed header map, and no other notes. Their bench page tells students where the datasheets and the header map are; tell them the midterm's allowed references yourself.
  • Post the safety rules. Print the station sheet for your board and post it at every station; its rules match the students' bench page.
  • Install the USB boot tool. Put the Libre Computer app on the bench PCs: its window starts a board over USB with the published boot files (labs 3 and 9), and its lc boot command, given the board's port (from lc list), its target and --art with the builder's out directory, sends students' own builds (labs 3 and 4).
  • Run each lab first. A TA runs the week's lab on a spare station before the section meets.

When a board will not boot

Students work through their own list on their bench first: watch the console, swap and re-write the boot media, then hand the board to you. When a board reaches you:

StepActionWhat it fixes
1Check the console log the student captured, and which of their steps they ranMost cases: a step skipped or done on the wrong media
2Start the board over USB and restore the boot firmware in SPI flash with the Libre Computer app's Firmware pageBoot firmware that was overwritten or no longer starts
3Swap in a spare board and set the faulty one asideHardware damage, most often 5 V on a GPIO pin; keep about 10% spare boards and supplies

Students never write a kit board's bootloader to its storage. Their own first-stage builds are loaded into SRAM over USB and write nothing, and the boot-breaking exercise in Lab 9 changes only spare boot media, after the TA has tested the recovery path.