v2.9.02026-10-23
This release reorganises how layers ship their content around a per-layer <stem>.d/ directory and drop-ins. It also improves reproducible build support, adds signed boot images and a minimal RAM only boot base. Custom layers will probably need updating.
What's new
Layers and engine
- Per-layer work directories: ${WORKDIR} in metadata, $LAYER_WORKDIR in hooks.
- Late hooks (hooks/late/), which run after every layer's normal hooks for the same phase.
- Drop-ins for other layers: <stem>.d/for/<layer>[@major]/<dir>/, via foreach_dropin.
- New placeholders: ${DOTD}, ${NAME}, ${VERSION}, ${UUID} (stable across builds) and ${WORKDIR}.
- Layers can ship executables for the build host, either for the whole build (<stem>.d/host/bin, <stem>.d/<DEBBUILDGNU_TYPE>/bin) or for their own hooks only (under <stem>.d/self/).
- A pathlist variable type.
- A boot:slotted trait.
Reproducible builds
- SOURCEDATEEPOCH is set during the build and published with its outputs.
- Build metadata, boot.img and the erofs verity salt are reproducible.
- The project's revision is recorded as BUILD_ID.
Boot and security
- Signed boot.img support (bin/bootimg), wired into image-rota.
- cryptroot locks HMAC key access after unlocking (needs rpi-eeprom 2026-06-17 or later).
Images, bases and examples
- microboot: a minimal busybox base that boots entirely from RAM, with a mass-storage gadget example.
- image-rpios gains a devid_scheme option to use PARTUUIDs, as pi-gen images do.
- device-user-admin can create a second, non-sudo account (user2).
- StaticPath= for image-owned files inside slot-shared paths.
- New examples
Notable fixes
- cm5-jig-growfs never expanded the root filesystem on by-slot images.
- The IDP archive now bundles only the sparse images it references.
- The size validator now accepts only the unit suffixes genimage understands.
- console-setup.service no longer fails on a read-only /etc.
- initramfs-tools waits for the root device, and the cryptroot partprobe now runs in local-block.
- runenv strips only the wrapping quotes from values.
- Layer hooks no longer inherit the plan on stdin.
- XDGRUNTIMEDIR is passed through to sanitised commands.
- Raspberry Pi kernels are ordered after the distribution base layer.
- The Raspbian suite and archive keyring have been updated.
Breaking changes
- Hook phases renamed: pre-build/post-build/pre-image/post-image are now prebuild/postbuild/preimage/postimage.
- Layer content lives only in <layer-stem>.d/, eg hooks/, hooks/late/, <phase>.overlay/,device/. The old fixed name scripts (pre-image.sh, post-image.sh) and the device/rootfs-overlay, <stem>.rootfs-overlay/ and bdebstrap/ directories are no longer used, and nothing reports that.
- scripts/ moved to builtin/.
- IGconfdeployhook removed: use deploy* hooks instead.
- Output artefacts renamed to a single base name from the image name and version.
- config.txt and cmdline.txt are generated from layer fragments. A directly installed config.txt is overwritten, the boot-firmware templates are gone, and boot firmware packages now come from layer rpi-boot-bsp.
- AfterProvider only orders now: add RequiresProvider where presence is required.
- Tools and hooks no longer inherit variables from the calling shell.
### Upgrade notes
- Move all hooks to the new format, eg pre-image.sh -> preimage*
- Layer content moves to <layer-stem>.d/. Hooks (hooks/, hooks/late/), phase-named overlays (<phase>.overlay/) and generator content (dracut/initramfs-tools) are now found by walking the build plan, not through fixed tables or assetdir lookups. Shared scripts and hooks have moved under builtin/.
- X-Env-Layer-AfterProvider now only orders. It no longer fails the build when the provider is missing. Add the provider to RequiresProvider if you relied on that check.
- Boot configuration is assembled from fragments:
- config.txt is built from config.txt.d/ drop-ins provided by layers
- kernel command line fragments now live in for/linux-base/cmdline.d/
- the templates/rpi/boot-firmware templates and rpi-image-base have been removed
- Hooks and tools run with a sanitised environment. Layers that relied on variables inherited from the calling shell must declare them.
- IDP generation is opt-in through IGconfimageidp_enable. It's switched on automatically for Raspberry Pi devices.
- Deployed artefacts all share one base name, taken from the image name and version. This fixes doubled versions, an unnamed OTA bundle, and the IDP bundle missing from the manifest.
- slot-shared no longer overwrites shared files at boot. Use the new StaticPath= for content the image should own.
- The EEPROM auto-updater is off by default on slotted (A/B) boots, such as image-rota.
- erofs-utils is now 1.9.4. Images built with it differ from 2.8.0 builds of the same content.
What's Changed
* CM5 Jig Refinements by @tdewey-rpi in https://github.com/raspberrypi/rpi-image-gen/pull/312
* contrib: add sample cloud-init skeleton by @danielfdickinson in https://github.com/raspberrypi/rpi-image-gen/pull/309
* pkg: update util-linux url by @learmj in https://github.com/raspberrypi/rpi-image-gen/pull/315
* Unification of hooks and overlays around a layer-driven, per-layer .d/ convention by @learmj in https://github.com/raspberrypi/rpi-image-gen/pull/314
* per-layer work dir, doc improvements by @learmj in https://github.com/raspberrypi/rpi-image-gen/pull/317
* Documentation improvements by @learmj in https://github.com/raspberrypi/rpi-image-gen/pull/319
* Hook execution fix and doc updates by @learmj in https://github.com/raspberrypi/rpi-image-gen/pull/320
* Localised hook tidy ups: sbom, deploy & image-rota by @learmj in https://github.com/raspberrypi/rpi-image-gen/pull/321
* Unify build artefact basename, fix postimage by @learmj in https://github.com/raspberrypi/rpi-image-gen/pull/323
* Automatically enable IDP for Raspberry Pi device builds, opt-in for others by @learmj in https://github.com/raspberrypi/rpi-image-gen/pull/324
* webkiosk: Don't persist Chromium run-time data by @learmj in https://github.com/raspberrypi/rpi-image-gen/pull/325
* Add microboot image support by @learmj in https://github.com/raspberrypi/rpi-image-gen/pull/326
Deploy SOURCEDATE_EPOCH and make build metadata reproducible by @learmj in https://github.com/raspberrypi/rpi-image-gen/pull/327
* Add boot.img signing command support and reproducible generation by @learmj in https://github.com/raspberrypi/rpi-image-gen/pull/330
* doc: autogen by @learmj in https://github.com/raspberrypi/rpi-image-gen/pull/331
* image-rota: seed the erofs system slot verity salt by @learmj in https://github.com/raspberrypi/rpi-image-gen/pull/332
* Fix size validator suffix compatibility with genimage by @kvnloo in https://github.com/raspberrypi/rpi-image-gen/pull/333
* Declare fetch and xz unpack dependencies by @kvnloo in https://github.com/raspberrypi/rpi-image-gen/pull/334
* webkiosk: add seatd to packages by @learmj in https://github.com/raspberrypi/rpi-image-gen/pull/343
builtin: write SOURCEDATE_EPOCH in setup by @learmj in https://github.com/raspberrypi/rpi-image-gen/pull/344
* Add late hooks and fragment assembly by @learmj in https://github.com/raspberrypi/rpi-image-gen/pull/341
image-rpios: Add devidscheme for PARTUUID device identification by @XECDesign in https://github.com/raspberrypi/rpi-image-gen/pull/328
* examples: fix the SSH public key examples by @XECDesign in https://github.com/raspberrypi/rpi-image-gen/pull/350
* core: strip only the wrapping quotes in runenv by @XECDesign in https://github.com/raspberrypi/rpi-image-gen/pull/348
* device-user-admin: add multi-user account creation by @learmj in https://github.com/raspberrypi/rpi-image-gen/pull/351
* examples: Add mul
Traits2026-08-13
本次更新的重头戏是 trait(特性)体系:以 DEB822 元数据声明 hw:storage:nvme、hw:soc:bcm2712 一类语义标记,复用既有 `X-
v2.7.02026-06-26
本次更新为 rpi-image-gen v2.7.0。构建层面新增可复用的 apt 下载缓存,把主机目录挂进来后,已下载的软件包可在多次构建间留存,不再重复拉取。层机制开始为多版本支持铺路:注册表改用(名称,版本)重新索引,X-Env-Layer-Version 改为必填且须严格遵循 major.minor.patch 格式;新增 X-Env-Layer-AfterProvider 字段,强制能力提供方先于使用方构建,与原有的 X-Env-Layer-RequiresProvider 校验形成互补。X-Env-Var-*-Valid 新增 file、file-nzero、dir 三种路径校验器,X-Env-Layer-Provides 与 X-Env-Layer-Requires 允许冒号,便于使用带命名空间的能力标识。
层方面,rpi-user-credentials 更名为 device-user-admin,user1 的附加用户组不再写死,须通过 IGconfdeviceuser1groups 显式声明,sudo 组成员资格也做了收紧;同时加入 net-wireless/bluez 与 net-misc/network-manager 两个新层。修复了 AB 中 slot-shared-generator 直接写入 .wants 符号链接的问题,kiosk 示例改为依赖 network-online.target,避免 NTP 同步前过早启动。注意:沿用旧层名或依赖隐式用户组的现有配置需要同步调整。
v2.6.02026-05-22
Big thanks to @johanehnberg for contributing an independently authored 'getting started' guide. This doc demonstrates some good examples of what rpi-image-gen can support, such as custom hooks, environment variable injected controls, inherited configurations with different device builds sharing a common base. It sits well between the project readme and the technical documentation, and should hopefully help new users get onboard with the tool.
What's new?
- Wireless networking
- New wireless layer set: wireless-regulatory, wireless-utils, wireless-debug, and iwd (iNet wireless daemon with systemd-networkd integration)
- Wireless profiles can be baked into the build at image creation time, profiles persist across A/B slot rotations via the new slot-shared framework
- Wireless regulatory domain configurable via ieee80211.regdom
- Trixie minbase suite now includes wlan support, all downstream consumers gain wireless LAN out of the box
- Network interface configuration moved into rpi-device-base - Ethernet and Wifi interfaces auto-configured for all supported devices
- Networking layers
- Standalone systemd-resolved layer added
- systemd-timesyncd split into its own layer, chrony added as an alternative NTP client
- Locale
- Locale support has been refactored into three composable layers: locale-config (variables), locale-base (debconf/i18n), locale-gen (build-time generation) - eliminates duplication across all Debian and Raspbian base layers
- buildd bases now generate proper locale data for consistent build environment behaviour
- A/B and OTA
- slot-shared framework: layers declare filesystem paths to persist across slot rotations via bind mounts, OTA updates can push application data without a separate data partition update
- IDP
- expand-to-fit enabled on all PMAPs, including encrypted volumes
- Documentation
- New getting-started guide
- iwd layer companion documentation
- Layer category names now rendered verbatim, fixing display of hyphenated and lowercase names (eg, i18n)
- CI
- Additional build targets added to GitHub workflows
Misc new layers
- debian-trixie-arm64-multi-minbase: Trixie base for interactive systems with recommended packages and generated locale
- rpi-device-base: common Raspberry Pi device base layer, simplifying downstream layer inheritance
- rpi-device-secpolicy: common security policy base layer and overlay for all Raspberry Pi device builds
Engine Updates
- Layer trigger and conflict conditions migrated to Python expression syntax, improving readability and robustness, shared evaluator enables reuse across metadata fields
- Layer version now reported at load time and included in build plan output
- Layer overlay information surfaced in CLI output and generated documentation
Notable Bug fixes
- storage-binder: fix legacy firmware compatibility - partition 0 on pre-Pi4/5 hardware now treated as partition 1
- cryptroot: clean exit when no image is present
- user-credentials: group existence validated before user is added
- slim: missing coreutils dependency added
Breakages
- Consumers of systemd-net-min will have to add their time daemon of choice in custom config configurations, and also the appropriate device network interface config fragments in custom device layers. systemd-net-min no longer provides these.
- Custom layers using metadata conditional expression syntax will need to migrate.
What's Changed
* storage-binder: Add legacy firmware support by @learmj in https://github.com/raspberrypi/rpi-image-gen/pull/239
* IDP: Enable partition expansion in all PMAPs by @learmj in https://github.com/raspberrypi/rpi-image-gen/pull/240
* Add new common rpi device and security policy layers by @learmj in https://github.com/raspberrypi/rpi-image-gen/pull/242
* Fix doubled version in OTA bundle name by @clowder in https://github.com/raspberrypi/rpi-image-gen/pull/243
* Better metadata conditional expressions and layer version reporting by @learmj in https://github.com/raspberrypi/rpi-image-gen/pull/244
* connectivity: device wlan support and slot-shared OTA app infrastructure by @learmj in https://github.com/raspberrypi/rpi-image-gen/pull/246
* slim and example fixes by @learmj in https://github.com/raspberrypi/rpi-image-gen/pull/248
* Update readme by @learmj in https://github.com/raspberrypi/rpi-image-gen/pull/249
* layer (suite): Add wlan support to trixie minbase by @learmj in https://github.com/raspberrypi/rpi-image-gen/pull/250
* cryptroot: exit cleanly if no image by @learmj in https://github.com/raspberrypi/rpi-image-gen/pull/252
* Refactor locale layers and introduce dedicated i18n configurations by @learmj in https://github.com/raspberrypi/rpi-image-gen/pull/251
* wireless-regulatory: Add country code support by @learmj in https://github.com/raspberrypi/rpi-image-gen/pull/253
* examples/ota: Add wlan config section to readme by @learmj in https://github.com/raspberrypi/rpi-image-gen/pull/254
* ci: syft and github workflow updates by @learmj in https://github.com/raspberrypi/rpi-image-gen/pull/255
* doc: add a guide on getting started using configuration files by @johanehnberg in https://github.com/raspberrypi/rpi-image-gen/pull/207
* layer: Add new Trixe base layer for interactive systems by @learmj in https://github.com/raspberrypi/rpi-image-gen/pull/256
New Contributors
* @johanehnberg made their first contribution in https://github.com/raspberrypi/rpi-image-gen/pull/207
Full Changelog: https://github.com/raspberrypi/rpi-image-gen/compare/v2.5.0...v2.6.0
Operational LUKS Provisioning2026-04-28
本版打通了 IDP 端到端的 LUKS 磁盘加密部署:cryptroot 加密镜像首次可经 fastboot 直接刷入硬件,A/B 双槽也能用上加密分区。LUKS v2 在 image-rpios 与 image-rota 层达到生产可用,构建期由 cryptroot 钩子识别 PMAP 中的加密卷并写入解锁流程,支持 initramfs-tools 与 dracut 两种后端,口令由硬件派生。新增 rpi-idp、rpi-idp-luks2 层,可按设备指定算法参数,Pi 5 默认 aes-xts-plain64,其余设备用 xchacha12。镜像体积改由最终磁盘镜像实测得出,分区大小更准,并加入越界、扇区不匹配等硬性校验。启动可靠性方面,分区改按 GPT 标签寻址,新增 rpi-storage-binder 统一标记启动设备,by-slot 成为唯一权威命名空间。构建引擎支持层级 rootfs overlay、补上 finalize 阶段,并修复预构建钩子与动态层生成顺序问题。
v2.4.02026-03-09
v2.4.0 最重要的变化:主用户账户默认不再启用免密 sudo。原先无条件授予免密权限,现在需要通过 IGconfdeviceuser1sudo 显式开启,老配置若依赖免密 sudo 必须补上这一项。
用户凭据配置也更灵活了:user1passhash 支持传入预哈希密码字符串(如 bin/genpasswd 生成),经 chpasswd -e 写入,与 user1pass 互斥;还可为账户指定固定 UID/GID。
引擎侧新增触发条件通配符 *,可匹配任意非空变量值。IDP 文档补全了 JSON schema 校验与测试套件,字段说明和约束一应俱全,方便第三方镜像制作者接入 Raspberry Pi 供给流程。image-rota 现在能用 veritysetup 生成 EROFS 根文件系统的 dm-verity 哈希树。文档方面新增 rpi-image-gen doc,在本地 3142 端口起服务,直接浏览自动生成的 HTML 文档和 schema 说明。
EROFS immutable AB2026-03-04
本次更新的核心是 AB 镜像的根文件系统改用 EROFS,默认配置为 zstd 压缩——在树莓派各类存储、内核与读写模式的实测中表现最稳,image-rota 已将其设为默认方案。压缩放大效应让 EROFS 读取时从存储取回的字节能解出更多数据,普遍快于未压缩 ext4,SD 卡上提升最明显;fio 剖析显示瓶颈在存储 I/O 而非 CPU,因此不必担心处理器开销。分区会按目标内核页大小自动适配(Pi 5/CM5 为 16K,其余为 4K),Linux 6.18 的压缩读路径相比 6.12 也有明显改进。
其余改动:层元数据可声明基于变量取值的触发器与冲突规则;新增 linux-base、fs-base 层接管文件系统参数;建立统一的构建变量注册表;宿主端新增 zstd 1.5.7、erofs-utils 1.9、util-linux 2.41.3 等包,构建并行度提升。无破坏性变更。想沿用 ext4 的用户设置 IGconfimagerootfstype: ext4 即可,16K 页内核下再补 IGconffsext4mkfs_args: -b 4096 以保持分区大小一致。
Device Remote Update Support (OTA)2026-02-05
rpi-image-gen v2.2.0 支持生成可通过 Raspberry Pi Connect 远程更新的设备镜像,打通了现场部署的完整链路:先用 examples/ota 构建带 Connect 能力的初始镜像,设备启动后自动注册到 Connect,再构建更新镜像并通过 HTTP 托管,最后从 Connect 端下发 OTA 升级。这一版还同步了 RPi APT 密钥,以应对 Debian Sequoia(sqv)策略——2 月 1 日起弃用 SHA-1 签名摘要,未更新的密钥届时将失效。此外修复了 lint 回溯噪音、默认 APT 密钥目录为空的问题,新增 CI 工作流与社区扩展说明。本次无破坏性变更。
v2.1.02026-01-22
rpi-image-gen 迎来一次全面翻新的版本,重点在 image-rota 层:它已能提供实用的 A/B 双系统能力,配合可写入 GPT 分区属性的 IDP 供给机制、按槽位划分的 /var 与共享的身份、日志和 home 目录,让根文件系统保持不可变的同时不影响日常使用。工程侧新增动态层、由环境变量控制的层依赖、元数据锚点与配置变量延迟展开,配置灵活性明显提升;新增 splash、toolchain、Raspberry Pi Connect 等层,systemd 也拆成了模块化组件。底层方面,bdebstrap、genimage 等关键工具升级到最新版本,核心依赖改为源码安装,对宿主机已装包的依赖进一步降低,并新增层校验与 lint、SBOM 处理、Hook 执行流程文档化、测试框架和文档自动生成,同时支持 Trixie。
两处破坏性变更需要留意:配置变量的取值必须符合 POSIX shell 规范,非 POSIX 写法会被直接拒绝;IGconfimagepmap 已从 image-base 中移除。
v2.0.0-rc.12025-09-05
rpi-image-gen v2.0.0-rc.1 发布,这是一次架构级重构。项目改为以类似编译器的方式运作:直接处理源文件,同时可引用内置默认值;配置解析、图层元数据与管理交由专门引擎负责,图层成为所有配置项的唯一权威来源。
新能力包括配置变量的取值策略、基于类型的自动校验、图层依赖关系,以及配置文件的包含与分层机制。声明式文件统一为 YAML,并提供 INI 迁移命令;另新增图层内省、校验与 lint 专用命令,日志会输出变量处理过程,图层列表也支持分类浏览。文件系统不再绑定具体设备,便于容器开发、CI 与 NFS 场景使用。文档方面换用 asciidoc 手册,图层目录改为自动生成,可查依赖、反向依赖、变量与安装的软件包。
需注意破坏性变更:options 文件已移除,请按 #79 将设置迁入配置文件;所有 Profile 文件作废,Profile 现等同于带多重依赖的图层;部分配置变量改名并更换前缀,可用 rpi-image-gen layer --describe locale-base 查看;自定义层须符合内嵌元数据规范才会被搜索路径识别。