Lab 1
First boot
Get your board running from an image you have verified, and record everything it prints from the moment power reaches it. The log you capture today is the one you explain line by line in labs 3, 4 and 5, so keep it exactly as the board printed it.
Modules this lab uses
- Module 0: First boot
- Your bench: your board, the console wiring and the rules that keep it alive
What you need
- Your station's Das Frite, its USB Type-C power supply and a USB flash drive for the OS
- A 3.3 V USB-to-UART adapter for the serial console
- An Android phone with the Libre Computer app and a USB cable to the board's USB Type-C port, or the bench PC with a desktop imager
- The bench PC, or your own computer, with a serial terminal program
What you need
- Your station's Solitude, its USB Type-C power supply and a microSD card for the OS
- A 3.3 V USB-to-UART adapter for the serial console
- An Android phone with the Libre Computer app and a USB cable to the board's USB Type-C port, or the bench PC with a desktop imager
- The bench PC, or your own computer, with a serial terminal program
Before you start
Read the rules that keep the board alive. Every wiring change in this lab is made with the board's power unplugged.
Steps
- Write the course's image, the one your instructor chose for the term, to the USB flash drive, as your bench describes: with the Libre Computer app, put the drive in the board's USB Type-A port, connect your phone to the board's USB Type-C port and pick that image in the app; with a desktop imager, use the image file on the bench PC and connect the drive to the bench PC. Das Frite has no card slot: its UEFI firmware in SPI flash boots the OS from the USB drive.
- Check the image's SHA-256 against the value your instructor recorded, which is the one published with it on libre.computer downloads. If you used a desktop imager, compute it yourself (for example with
sha256sumon Linux). - With the board unplugged, connect the USB-to-UART adapter to the 40-pin header: the adapter's ground to pin 6, the adapter's receive to the board's transmit on pin 5, and the adapter's transmit to the board's receive on pin 3. Never connect the adapter's power pin.
- Plug the USB drive into the board's USB Type-A port, if it is not there already.
- Connect the board's Ethernet port to the lab network switch with the station's Ethernet cable.
- Open the serial terminal at 115200 baud, 8 data bits, no parity, 1 stop bit, and start saving its output to a file before you apply power.
- Plug in the USB Type-C power supply and let the board boot to its login prompt. Save everything it prints.
- Log in on the serial console with the image's default login, which your TA gives you. Find the board's network address (for example with
ip addr). - From the bench PC on the lab network, log in again over SSH.
- Install the course tools: copy all the packages your TA put on the bench PC into one directory on the board with
scp, and install them together from that directory withsudo apt install ./*.deb(one command, so apt can match the packages that depend on each other with no internet) (libretech-wiring-tool,memtesterand any others your TA staged). - Keep the raw log file unedited. Make a copy if you want to mark it up.
Steps
- Write the course's image, the one your instructor chose for the term, to the microSD card, as your bench describes: with the Libre Computer app, put the card in the board's slot, connect your phone to the board's USB Type-C port and pick that image in the app; with a desktop imager, use the image file on the bench PC and put the card in the bench PC's reader.
- Check the image's SHA-256 against the value your instructor recorded, which is the one published with it on libre.computer downloads. If you used a desktop imager, compute it yourself (for example with
sha256sumon Linux). - With the board unplugged, connect the USB-to-UART adapter to the board's 3-pin UART header: ground to pin 1, the adapter's receive to the board's transmit on pin 2, and the adapter's transmit to the board's receive on pin 3. Never connect the adapter's power pin.
- Put the microSD card in the board's card slot, if it is not there already.
- Connect the board's Ethernet port to the lab network switch with the station's Ethernet cable.
- Open the serial terminal at 115200 baud, 8 data bits, no parity, 1 stop bit, and start saving its output to a file before you apply power.
- Plug in the USB Type-C power supply and let the board boot to its login prompt. Save everything it prints.
- Log in on the serial console with the image's default login, which your TA gives you. Find the board's network address (for example with
ip addr). - From the bench PC on the lab network, log in again over SSH.
- Install the course tools: copy all the packages your TA put on the bench PC into one directory on the board with
scp, and install them together from that directory withsudo apt install ./*.deb(one command, so apt can match the packages that depend on each other with no internet) (libretech-wiring-tool,memtesterand any others your TA staged). - Keep the raw log file unedited. Make a copy if you want to mark it up.
What to measure
- The SHA-256 of the image you wrote, and the published value it must match.
- Whether your log really starts at power-on: the first lines come from code inside the chip, before anything is read from the SPI flash or the boot media. If your log starts later, the terminal was opened too late; capture it again.
The annotated boot log
An annotated boot log for each board, explaining every line from power-on to the login prompt, is in preparation. Until it is published, the modules explain each stage's lines as you reach them.
What you hand in
- The image's SHA-256 and where the image came from.
- The raw boot log, unedited. You annotate it in labs 3, 4 and 5.
- Your own short report: what you did, what you measured, and one problem you met and how you solved it.
If it goes wrong
No output at all usually means the serial lines are not crossed, or the terminal is not at 115200 baud. If the board does not boot, work down when it will not boot on your bench page.