rpi-image-gen build system creates custom images for Raspberry Pi boards

Raspberry Pi has just released the rpi-image-gen build system to generate custom Raspberry Pi images designed for a specific application and based on packages from the Debian and Raspberry Pi OS repositories

I was initially surprised by this announcement, as there are already build tools like the Yocto Project or buildroot designed for this purpose. They are however somewhat complex to use and there’s a steep learning curve, so maybe Raspberry Pi made something easier to use. Let’s have a look.

rpi-image-gen

The build is mostly defined by a configuration file which defines the profile and image layout. The company explains the main reasons for creating yet another build system. First, the images are quick to build with the rpi-image-gen build system since you don’t have to build the whole project from source, contrary to something like the Yocto Project which can take hours (for the first build at least). That’s because it relies on packages from Raspberry Pi OS and Debian that also offer the benefit of not inserting security vulnerabilities at the cost of less flexibility.

Developers can configure their filesystem with only the packages needed and optionally use the rpi-sb-provisioner to automatically setup and enable signed boot and encrypted filesystems. rpi-image-gen also outputs a software bill of materials (SBOM) and generates a list of CVEs identified from the SBOM to list potential security vulnerabilities.

The easiest way to get started is to build a minimal Debian image with four commands on the build machine:


The image can be found in work/deb12-arm64-min/artefacts/deb12-arm64-min.img

You can now flash the image with the Raspberry Pi Imager using the GUI (select “Use Custom”) or from the command line:


Other examples can be found on the GitHub repo including “slim” to create a lightweight image and “webkiosk” to create an image that boots to the Chromium web browser in kiosk mode. The official announcement on the Raspberry Pi website and the GitHub repo have more details.

Share this:
FacebookTwitterHacker NewsSlashdotRedditLinkedInPinterestFlipboardMeWeLineEmailShare

Support CNX Software! Donate via cryptocurrencies, become a Patron on Patreon, or purchase goods on Amazon or Aliexpress

Radxa Orion O6 Armv9 mini-ITX motherboard

11 Replies to “rpi-image-gen build system creates custom images for Raspberry Pi boards”

    1. > This is the type of things we will never see Radxa or OrangePi do.

      You’re so funny. Radxa started with something like this back in 2021 and has now the 3rd iteration of an automated build system called rsdk. And OrangePi went the cheap route and simply forked Armbian a few years ago which does the job for over a decade now.

      The only new/unique thing with this RPi approach is them caring for compliance BS by spitting out a Software Bill of Materials (SBOM) with every generated image.

  1. This has been done by a lot of people a long time ago, and just because it’s a “raspberry pi”, oh! it’s yet another groundbreaking feature from the one and truly Raspberrypi.

  2. “to generate custom Raspberry Pi images”.

    Nice … images of Raspberry Pi! Using ChatGPT?

    Oh, wait, I should read it as “to generate custom Raspberry Pi OS images”.

Leave a Reply

Your email address will not be published. Required fields are marked *

Boardcon CM3588 Rockchip RK3588 System-on-Module designed for AI and IoT applications
Boardcon CM3588 Rockchip RK3588 System-on-Module designed for AI and IoT applications