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.
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.

Jean-Luc started CNX Software in 2010 as a part-time endeavor, before quitting his job as a software engineering manager, and starting to write daily news, and reviews full time later in 2011.
Support CNX Software! Donate via cryptocurrencies, become a Patron on Patreon, or purchase goods on Amazon or Aliexpress