Skip to main content

Raspberry Pi 5

This guide walks you through building and deploying Avocado OS to a Raspberry Pi 5 using an SD card.

Prerequisites

  • Raspberry Pi 5
  • microSD card (8 GB+)
  • SD card reader connected to your host machine
  • macOS 10.12+ or Linux (Ubuntu 22.04+, Fedora 39+)
  • Docker Desktop installed and running
  • The latest version of the Avocado CLI
  • 8 GB available disk space
  • A TTY serial console USB adapter (this or similar) — must be set to 3.3V

If you have a serial console adapter connected, use a terminal program like tio:

tio -b 115200 /dev/ttyUSB0

Replace /dev/ttyUSB0 with the appropriate device path for your adapter.

Linux Auto-mounting

Some Linux operating systems, like Ubuntu, will attempt to auto-mount mass storage devices. This can interfere with Avocado's ability to finalize provisioning a device.

Before provisioning, disable auto-mounting. The following example is for Ubuntu (GNOME desktop); the same commands apply to other GNOME-based distributions such as Fedora Workstation.

Ubuntu (GNOME desktop)
gsettings set org.gnome.desktop.media-handling automount false
gsettings set org.gnome.desktop.media-handling automount-open false

Initialize

Create a new project targeting the Raspberry Pi 5.

avocado init --target raspberrypi5 raspberrypi5
cd raspberrypi5

Install

Install the SDK toolchain, extension dependencies, and runtime packages.

avocado install -f

Build

Build the system image.

avocado build

Provision

Insert your SD card and provision the dev runtime. The sd profile writes the image directly to the SD card.

avocado provision -r dev --profile sd

The CLI will detect available block devices and prompt you to select the SD card. Verify you select the correct device — this operation will overwrite the target disk.

Run

  1. Insert the SD card into the Raspberry Pi 5
  2. Apply power to the device

The device will boot from the SD card with the provisioned system. Log in as root with an empty password.

SSH access

Once booted, you can SSH into the device if you know its IP address:

ssh root@<device-ip>

The dev runtime includes an SSH server with passwordless root login for development purposes.