Skip to main content
Rugix Bakery 0.9.6 is here: Build rules for custom image pipelines and verified boot for EFI and Raspberry Pi. Read the release post.
Documentation

core/image-debian-rpi-verified

Build a signed Raspberry Pi 4/CM4 or Pi 5 A/B release with a verified root from a prepared Debian root filesystem.

Preview
You're viewing the Next docs — a rolling preview of in-development changes. The current release docs may differ.

Build a signed Raspberry Pi 4/CM4 or Pi 5 A/B release with a verified root from a prepared Debian root filesystem.

Inputs

rootfs

Kind: directory

Prepared root filesystem implementing the core verified-root boot contract.

boot

Kind: directory

Raspberry Pi firmware tree containing start4.elf, fixup4.dat, DTBs, and overlays.

config

Kind: directory

Layer configuration partition contents.

boot-public-key

Kind: file

PEM-encoded RSA-2048 public key matching the Raspberry Pi boot signing key.

bundle-certificate

Kind: file

Single PEM-encoded X.509 end-entity signer certificate issued directly by the trusted root. No intermediates. The default signer requires RSA.

Parameters

kernel-version

Default: ""

Exact installed kernel version. Empty selects the unique matching version.

kernel-flavor

Default: "rpi-v8"

Required installed kernel version suffix.

cmdline-extra

Default: ""

Additional authenticated kernel arguments.

panic-timeout

Default: 10

Kernel panic reboot delay in seconds. Zero leaves the system stopped.

boot-config

Default: "[all]\narm_64bit=1\nkernel=kernel8.img\ninitramfs initrd followkernel\n"

Contents of config.txt inside the signed boot image. Must select kernel8.img and initrd.

signing-time

Default: ""

Signing time as Unix seconds in a string. Empty uses the build source epoch.

config-size

Default: 0

Configuration partition capacity in bytes. Zero sizes automatically with a 64 MiB minimum.

boot-size

Default: 0

Boot partition capacity in bytes. Zero sizes automatically with a 256 MiB minimum.

boot-image-size

Default: 0

Signed boot image capacity in bytes. Zero sizes it from its contents.

root-compression

Default: "none"

SquashFS compression of the root filesystem, such as zstd or xz, or none.

disk-size

Default: 0

Factory disk capacity in bytes. Zero sizes the disk from its partitions.

Outputs

image

Artifact Source: {"rule":{"node":"release","output":"image"}}

bundle

Artifact Source: {"rule":{"node":"release","output":"bundle"}}

bundle-hash

Artifact Source: {"rule":{"node":"release","output":"bundle-hash"}}

boot-image

Artifact Source: {"rule":{"node":"release","output":"boot-image"}}

boot-signature

Artifact Source: {"rule":{"node":"release","output":"boot-signature"}}

root-hash

Artifact Source: {"rule":{"node":"release","output":"root-hash"}}

hash-offset

Artifact Source: {"rule":{"node":"release","output":"hash-offset"}}

data-size

Artifact Source: {"rule":{"node":"release","output":"data-size"}}

Rule Parameters

Callers can replace these operations through rules bindings. An implementation receives the listed inputs and parameters and must produce the listed outputs. See Rule Parameters.

rpi-signer

Sign the Raspberry Pi boot image. Bakery verifies the signature against boot-public-key.

Default implementation: core/sign-rpi.

Input image

Kind: file

FAT boot.img to authenticate.

Input public-key

Kind: file

The boot-public-key input.

Parameter signing-time

Signing time as Unix seconds in a string. Empty means the build source epoch.

Output signature

Kind: file

Raspberry Pi RSA-2048 boot.sig.

bundle-signer

Create a CMS signature over the bundle’s signed metadata. Bakery verifies it against bundle-certificate.

Default implementation: core/sign-cms.

Input content

Kind: file

Signed bundle metadata.

Input certificate

Kind: file

The bundle-certificate input.

Parameter signing-time

Signing time as Unix seconds in a string. Empty means the build source epoch.

Output signature

Kind: file

DER-encoded CMS SignedData with the encapsulated content and signer certificate.

Execution

Composes other rules into a build graph.

Behavior

Build a Raspberry Pi 4/CM4 or Pi 5 A/B release with a verified root from a prepared Debian ARM64 root. By default, this wrapper selects one installed kernel whose version ends in rpi-v8, generates its initrd with core/initrd-debian, and passes those artifacts to core/image-rpi-verified.

Raspberry Pi’s rpi-v8 kernel supports both Pi 4 and Pi 5 with 4 KiB pages. The firmware tree must contain device trees for the target board. See the Raspberry Pi kernel documentation.

Prepare the layer with core/debian-rpi-verified-setup and configure trusted update signers in /etc/rugix/ctrl.toml through a project recipe. On first boot, Rugix Ctrl completes the factory layout through native bootstrap and uses its built-in rpi-tryboot flow. The wrapper consumes the root and firmware tree without modifying them.

Set kernel-version when multiple matching kernels exist; its empty default requires a unique matching kernel. kernel-flavor selects the required installed kernel version suffix and defaults to rpi-v8. The selected kernel and firmware tree must support the target board. Automatic capacity defaults, optional size overrides, boot settings, remaining release inputs, signing policy, and outputs match the generic Raspberry Pi composition. The wrapper forwards its rpi-signer and bundle-signer rule parameters to it, so you can sign with an HSM or a KMS as described in its signer documentation.

Example

For example, select the wrapper in a system definition:

[systems.rpi]
layer = "rpi"
architecture = "arm64"

[systems.rpi.rules.release]
uses = "core/image-debian-rpi-verified"
parameters.cmdline-extra = "console=serial0,115200 console=tty1"
inputs.boot-public-key = { path = "keys/rpi.pub" }
inputs.bundle-certificate = { path = "keys/bundle.crt" }
rules.rpi-signer.secrets.key = { path = "keys/rpi.key" }
rules.bundle-signer.secrets.key = { path = "keys/bundle.key" }

[systems.rpi.outputs]
"system.img" = { rule = { node = "release", output = "image" } }
"system.rugixb" = { rule = { node = "release", output = "bundle" } }
"system.rugixb-hash" = { rule = { node = "release", output = "bundle-hash" } }

Bakery supplies the built layer’s rootfs, boot, and config trees. Run ./run-bakery bake system rpi --release-version v1.