Skip to main content

Learn how to build a production-ready Linux system for the Raspberry Pi Compute Module 5 (CM5)

Featuring custom images, A/B updates, and automated provisioning.

Learn how to build a production-ready Linux system for the Raspberry Pi Compute Module 5 (CM5) — featuring custom images, A/B updates, and automated provisioning.

The Raspberry Pi Compute Module 5 delivers serious embedded performance — PCIe, NVMe, LPDDR4X, and a solid BSP foundation. However, moving from a development board to a maintainable, production-grade Linux environment introduces new challenges: image customization, provisioning, and reliable over-the-air (OTA) updates.

Compute Module 5 IO Board

In this series, we’ll explore how to create a lean, reproducible Linux system for the CM5 without using Yocto. Instead of building an entire distribution from scratch, we’ll use practical tools and workflows — showing how rpi-image-gen can generate custom images, how A/B rootfs layouts enable safe updates, how rpi-sb-provisioner automates device setup, and how SWUpdate manages firmware delivery in the field.

Each article provides a technical overview of the essential components — not a finished product, but a map of the ecosystem. You’ll learn where each tool fits, what problems it solves, and how to combine them into a flexible build and update pipeline for your own CM5-based projects.

By the end of the series, you’ll understand how to evolve from a stock Raspberry Pi OS image to a controlled, upgradeable embedded platform — without the complexity of Yocto or Buildroot.

Introduction — From Stock OS to Production Platform

Discover why Yocto isn’t always the best choice, especially for small teams or fast-paced product cycles. We’ll introduce a practical, modular approach built on the familiar Raspberry Pi OS foundation.

Key points:

  • Why “production-ready” means more than just booting
  • Challenges of using Yocto for Pi-based products
  • Overview of the alternative stack: Raspberry Pi OS, rpi-image-gen, dual-rootfs (A/B), provisioning, and SWUpdate
  • The end goal: a reproducible and maintainable system pipeline

See: From Stock OS to Production Platform

Image Generation — Customizing Raspberry Pi OS with rpi-image-gen

Learn how to build reproducible system images without relying on a full Yocto or Buildroot setup. This post introduces rpi-image-gen, a minimal, scriptable image builder for tailoring Raspberry Pi OS to your hardware and application needs.

Key points:

  • Anatomy of a Raspberry Pi image (boot, rootfs, config)
  • Using rpi-image-gen to assemble and customize images
  • Adding custom files, services, and kernel modules
  • Automating builds for CI/CD environments

See: Customizing Raspberry Pi OS with rpi-image-gen

System Robustness — Designing an A/B Root Filesystem Layout

A/B partitioning is the backbone of safe system updates and rollbacks. This article explains how to configure and manage two root partitions, switch between them on boot, and prepare for reliable OTA mechanisms.

Key points:

  • Partition scheme for A/B rootfs on CM5
  • Bootloader and kernel command-line configuration
  • Managing active/inactive slots and state tracking
  • Integrating update logic with systemd and SWUpdate

See: System Robustness — Designing an A/B Root Filesystem Layout

Provisioning — Automating First Boot with rpi-sb-provisioner

Provisioning is where software meets hardware. We’ll explore rpi-sb-provisioner as a lightweight tool for initializing new devices, injecting configuration, and securely registering them with backend services.

Key points:

  • The role of provisioning in embedded systems
  • Using rpi-sb-provisioner to set up device identities and parameters
  • Example automation scripts for first boot
  • Concepts of device identity, certificates, and configuration injection

See: Provisioning — Automating First Boot with rpi-sb-provisioner

OTA and Lifecycle — Software Updates with SWUpdate

A/B updates come to life with SWUpdate, a robust open-source framework for safely delivering software to devices in the field. This post shows how SWUpdate integrates with your image and partition layout to ensure updates are atomic and recoverable.

Key points:

  • Overview of SWUpdate architecture (handlers, updater, web interface)
  • Creating and signing update bundles
  • Integrating with the A/B system
  • Example update and rollback flow

See: OTA and Lifecycle — Software Updates with SWUpdate