Raspberry Pi
Overview
Clea OS can be built for the Raspberry Pi 4.
The RaspberryPi image depends on the external layer meta-raspberrypi.
Features provided by meta-raspberrypi
Supported boards
At the time of writing, the official layer supports the following boards:
MACHINE | Board name |
---|---|
raspberrypi | RaspberryPi |
raspberrypi2 | RaspberryPi 2 |
raspberrypi3 | RaspberryPi 3 in 32 bits mode |
raspberrypi3-64 | RaspberryPi 3 in 64 bits mode |
raspberrypi4 | RaspberryPi 4 in 32 bits mode |
raspberrypi4-64 | RaspberryPi 4 in 64 bits mode |
raspberrypi-cm | RaspberryPi Compute Module (CM1) |
raspberrypi-cm3 | RaspberryPi Compute Module 3 (CM3) |
raspberrypi0 | RaspberryPi Zero |
raspberrypi0-wifi | RaspberryPi Zero WiFi |
raspberrypi0-2w | RaspberryPi0 2 Wifi in 32 bits mode |
raspberrypi0-2w-64 | RaspberryPi0 2 Wifi in 64 bits mode |
raspberrypi5 | RaspberryPi 5 |
Clea OS 1.5+ supports the machine raspberrypi4-64
.
Layer structure
Directory | Description |
---|---|
docs/ | Some documentation |
recipes-bsp/ |
|
recipes-kernel/ | Recipes for linux 5.10 and 5.15 (default=5.15) |
recipes-connectivity/ |
|
recipes-core/ |
|
recipes-devtools/ |
|
recipes-graphics/ | Mainly sets up the VC4 graphics driver for Broadcom GPUs |
recipes-multimedia/ |
|
recipes-sato/ | Sets up sato |
wic/ | WKS file (overridden by Clea OS) |
Clea OS on the Raspberry Pi
Building
Building Clea OS for the Raspberry Pi 4 works the same as for the other boards. Follow the instructions provided on Build Clea OS or on the seco-manifest.
Use one of the following commands to setup the project (the first for Clea OS Embedded, the second for Clea OS Things).
$ . seco-setup.sh -d raspberrypi4_64_clea-os_embedded
$ . seco-setup.sh -d raspberrypi4_64
Running
The UART on the Raspebrry Pi is on GPIO 14/15 and is enabled by default in Clea OS. You can use a UART-USB adapter to connect these pins to the PC.
To run it:
- flash the wic image to a micro-SD card using
dd
orbmaptool
as reported on the Installation page; - connect the UART adapter;
- connect a monitor and keyboard (optionally);
- insert the microSD and power on the board.
Bootloader
The RaspberryPi boards have their own bootloader, so U-boot is not required.
In Clea OS Things U-boot is always enabled because it handles the boot partition selection logic; in Clea OS Embedded, U-boot is disabled and the embedded bootloader loads the kernel directly.
The bootloader expects to find the following files in the first FAT32 partition of the SD card.
File | Description |
---|---|
bootcode.bin | binary blob of the second-stage bootloader (only on RaspberryPi versions < 4) |
start*.elf , fixup*.dat | firmware binary blobs and data |
*.dtb , overlays/*.dtbo | device tree blobs |
kernel*.img | various kernel/bootloader image files, used for the different Raspberry Pi models |
cmdline.txt | kernel command line passed in to the kernel when it boots |
config.txt | RaspberryPi configuration parameters (the initramfs is configured here) |
The bootloader is comprised of two stages: the first stage resides in the SoC, the second:
- for the RaspberryPi 4 resides in an SPI EEPROM and can be updated using dedicated utilities;
- for the previous models, it resides in the file bootcode.bin in the boot partition.