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.
| Item | Quantity | Used in labs |
|---|---|---|
| Das Frite or Solitude | 1 | All |
| Bench PC (Linux) with a USB card and drive reader: a serial terminal, the desktop imager, libretech-builder-simple, the Amlogic USB boot tool, 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 terminal | 1 | All |
| 5 V USB Type-C power supply rated for the board (Das Frite: 2 A; Solitude: 3 A) | 1 | All |
| Boot media for the OS. Das Frite: a 32 GB USB flash drive. Solitude: a 32 GB microSD card, class A1 or better | 2 (one holds a spare image) | All |
| USB cable to the board's USB Type-C port, from a phone or the bench PC | 1 | 1, 3, 4, 9 |
| 3.3 V USB-to-UART adapter for the serial console | 1 | 1, 3–10 |
| Ethernet cables to the lab network switch, one for the board and one for the bench PC | 2 | All |
| Inline USB Type-C power meter (voltage and current) | 1 | 2 |
| Breadboard, female-to-male jumper wires, LEDs, resistors, two push buttons and a 10 kΩ potentiometer | 1 set | 6–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 mA | 1 set | 6, 9 |
| SSD1306 128 × 64 OLED display (I2C) | 1 | 7, 9 |
| DS3231 real-time clock module (I2C) | 1 | 6, 7, 9 |
| MCP3008 8-channel ADC (SPI) | 1 | 7, 8, 9 |
| One analog sensor, such as a thermistor or a light sensor, with a 10 kΩ resistor to wire it as a voltage divider | 1 | 7, 9 |
| Heatsink | 1 | All |
| Android phone for the Libre Computer app | 1 per pair | 1, 3, 9 |
Students can use their own phones. The bench PC replaces the phone in every lab, with a desktop imager for writing images and the Amlogic USB boot tool for starting a board over USB, so students without an Android phone are never blocked. Final-project parts are extra and chosen by each pair.
Shared bench equipment
One set for every four to six stations.
| Item | Used for |
|---|---|
| USB logic analyser, 8 channels, 24 MHz class | Timing and bus decoding in labs 6–8 |
| Multimeter | Measuring 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.
- Choose one image for the term from the libre.computer catalogue, so the app and the desktop imager write the same image. Record its checksum and its default login, 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), and each board's firmware update image from the board firmware update images guide, for restoring SPI flash.
- 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
memtesterthat 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,gpiogetandgpiomon(lab 6),i2c-tools(lab 7), a C and C++ compiler withmake(labs 6 to 8, and the lab 8 kernel module), the Pythonspidevandsmbus2modules (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
--helpoutput, 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.
- Plan for phones. Ask the class who has an Android phone, and keep the desktop imager and the Amlogic USB boot tool on the bench PCs for everyone else.
- 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:
| Step | Action | What it fixes |
|---|---|---|
| 1 | Check the console log the student captured, and which of their steps they ran | Most cases: a step skipped or done on the wrong media |
| 2 | Start the board over USB and restore the boot firmware in SPI flash | Boot firmware that was overwritten or no longer starts |
| 3 | Swap in a spare board and set the faulty one aside | Hardware 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.