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-squashfs-verity

Create a SquashFS image with appended dm-verity authentication data.

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

Create a SquashFS image with appended dm-verity authentication data.

Inputs

tree

Kind: directory

Root filesystem directory tree.

Parameters

compression

Default: "none"

Compression algorithm accepted by mksquashfs, such as zstd or xz, or none.

Outputs

image

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

root-hash

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

hash-offset

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

data-size

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

Execution

Composes other rules into a build graph.

Behavior

Create a SquashFS root image with appended dm-verity authentication data. The composition runs core/image-squashfs, generates a detached hash tree with core/dm-verity, then combines both with core/append-verity. A single partition or update payload can therefore carry the filesystem and its authentication data.

compression defaults to none. Uncompressed images store file contents as is, which helps delta updates find unchanged data across releases. Select a compressor such as zstd or xz for smaller images.

OutputContents
imageSquashFS followed by alignment padding and verity authentication data
root-hashSHA-256 root hash as hexadecimal text
hash-offsetByte offset of the appended hash area, as decimal text
data-sizeSquashFS length in bytes before padding and hashes, as decimal text

A trusted boot component must authenticate the root hash and geometry. Supply root-hash, hash-offset, and data-size to core/verified-cmdline when using the core verified-root boot contract.

Example

For example, build a compressed root image from a prepared tree:

uses = "core/image-squashfs-verity"
inputs.tree = { path = "prepared-root" }
parameters.compression = "zstd"

Save the invocation as build-rule.toml and run ./run-bakery bake rule build-rule.toml build/result.