Projects
A Rugix Bakery project is a directory containing the following files and directories:
run-bakery: Shell script for running Rugix Bakery pinned to a major version.rugix-bakery.toml: Project configuration file.layers: Directory containing project-specific layer configurations (optional).recipes: Directory containing project-specific recipes (optional).rules: Directory containing reusable build rules (optional).envs: Directory containing tooling environments defined by Dockerfiles (optional).tests: Directory containing system tests (optional).
We also refer to the directory containing all these files and directories as the project directory.
Note that you must always run ./run-bakery directly in the project directory.
Project Templates
Templates provide a starting configuration and recipes for a project. You can browse the templates on GitHub or list those included in your Rugix Bakery version:
./run-bakery init
To initialize a new project, pass a template name. For example, in a directory
containing the run-bakery launcher and no rugix-bakery.toml:
./run-bakery init debian-grub-efi
Rugix Bakery includes these general-purpose templates:
| Template | Description |
|---|---|
quickstart-guide | Debian for AMD64 and ARM64 EFI systems and Raspberry Pi 4 and 5, used in the quickstart guide. |
alpine-grub-efi | Alpine for AMD64 and ARM64 EFI systems, using GRUB. |
debian-grub-efi | Debian for AMD64 and ARM64 EFI systems, using GRUB. |
yocto-grub-efi | Yocto for AMD64 and ARM64 QEMU systems, using GRUB. |
rpi-alpine | Alpine for Raspberry Pi 4, Compute Module 4, and Pi 5. |
rpi-debian | Debian for Raspberry Pi 4, Compute Module 4, and Pi 5. |
rpi-raspios | Raspberry Pi OS for all Raspberry Pi models. |
Secure Boot
These Debian templates support signed boot and verified root filesystems. Follow the linked READMEs for build and firmware setup instructions.
| Template | Hardware |
|---|---|
debian-secure-efi | AMD64 EFI; adaptable to ARM64 EFI |
rpi-debian-secure | Raspberry Pi 4, Compute Module 4, and Pi 5 |
Project Configuration
Each project is configured in a rugix-bakery.toml configuration file.
Such a file typically has two sections, repositories and systems.
We explain those sections in further detail in dedicated sections of this documentation.
To give you an idea how a configuration file may look like, here is an example:
#:schema https://raw.githubusercontent.com/rugix/rugix/refs/tags/v0.8.0/schemas/rugix-bakery-project.schema.json
[repositories]
rugix-extra = { git = "https://github.com/rugix/rugix-extra.git", branch = "v0.9" }
[systems.customized-arm64]
layer = "customized"
architecture = "arm64"The #:schema directive is used to specify a JSON Schema for the TOML file. Rugix Bakery comes with JSON Schemas for all its configuration files, enabling straightforward validation and autocompletion in modern IDEs.
For reference, here is the complete schema for project configuration files:
ProjectConfigobject
Project configuration.
Properties
repositoriesobject
Additional properties
valueSourceConfig
Repository source.
Any of
option 1object
Properties
gitstringrequired
tagstring
branchstring
revstring
dirstring
option 2object
Properties
pathstringrequired
systemsobject
Additional properties
valueSystemConfig
Properties
layerstringrequired
mixinsarray<string>
Items
valuestring
architectureArchitecturerequired
Architecture.
amd64arm64armv7armhfarm
targetTarget
Target.
generic-grub-efirpi-trybootrpi-ubootbspunknown
imageSystemImageConfig
Properties
sizeNumBytes
Number of bytes.
layoutImageLayout
Layout of an image.
Properties
typePartitionTableType
Partition table type.
mbrgpt
raw-blobsarray<RawBlob>
Items
valueRawBlob
Raw firmware blob written at a fixed offset on the disk.
Properties
filestringrequired
offsetNumBytesrequired
Number of bytes.
sizeNumBytes
Number of bytes.
partitionsarray<ImagePartition>
Items
valueImagePartition
Partition of an image.
Properties
namestring
sizeNumBytes
Number of bytes.
filesystemFilesystem
Filesystem.
One of
option 1object
Properties
typeconst "ext4"required
ext4
additional-optionsarray<string>
Items
valuestring
clamp-mtimeTimestamp
Timestamp.
option 2object
Properties
typeconst "fat32"required
fat32
option 3object
Properties
typeconst "squashfs"required
squashfs
additional-optionsarray<string>
Items
valuestring
no-compressionboolean
rootstring
typePartitionType
Partition type.
bootableboolean
rulesobject
Additional properties
valueRuleInvocation
An invocation of a repository-defined rule.
Properties
usesRuleReferencerequired
A rule name or the implementation of an enclosing rule parameter.
Any of
option 1string
option 2object
Properties
rule-parameterstringrequired
inputsobject
Additional properties
valueArtifactSource
An artifact reference within a composition.
One of
option 1object
Properties
inputstringrequired
option 2object
Properties
pathstringrequired
option 3object
Properties
ruleRuleOutputSourcerequired
Reference to a node output.
Properties
nodestringrequired
outputstringrequired
option 4object
Properties
selectArtifactSelectionrequired
A path within a directory artifact. Symlinks must resolve inside that directory.
Properties
sourceArtifactSource (cycle)required
pathstringrequired
kindArtifactKindrequired
Filesystem object accepted by an input or produced by an output.
filedirectory
option 5object
Properties
treeobjectrequired
Additional properties
valueArtifactSource (cycle)
parametersobject
Additional properties
valueParameterBinding
A literal parameter value or a reference to an enclosing parameter.
Any of
option 1object
Properties
parameterstringrequired
option 2any of
Any of
option 1string
option 2boolean
option 3integer | string (int64)int64
- pattern:
^-?[0-9]+$
option 4number | string
- pattern:
^(NaN|[+-]?Infinity)$
secretsobject
Additional properties
valueArtifactSource
An artifact reference within a composition.
One of
option 1object
Properties
inputstringrequired
option 2object
Properties
pathstringrequired
option 3object
Properties
ruleRuleOutputSourcerequired
Reference to a node output.
Properties
nodestringrequired
outputstringrequired
option 4object
Properties
selectArtifactSelectionrequired
A path within a directory artifact. Symlinks must resolve inside that directory.
Properties
sourceArtifactSource (cycle)required
pathstringrequired
kindArtifactKindrequired
Filesystem object accepted by an input or produced by an output.
filedirectory
option 5object
Properties
treeobjectrequired
Additional properties
valueArtifactSource (cycle)
rulesobject
Additional properties
valueRuleBinding
An implementation bound to a rule parameter. Bindings resolve in the scope that contains them. The graph supplies the interface inputs and parameters, which a binding must not bind.
Properties
usesRuleReference
A rule name or the implementation of an enclosing rule parameter.
Any of
option 1string
option 2object
Properties
rule-parameterstringrequired
inputsobject
Additional properties
valueArtifactSource
An artifact reference within a composition.
One of
option 1object
Properties
inputstringrequired
option 2object
Properties
pathstringrequired
option 3object
Properties
ruleRuleOutputSourcerequired
Reference to a node output.
Properties
nodestringrequired
outputstringrequired
option 4object
Properties
selectArtifactSelectionrequired
A path within a directory artifact. Symlinks must resolve inside that directory.
Properties
sourceArtifactSource (cycle)required
pathstringrequired
kindArtifactKindrequired
Filesystem object accepted by an input or produced by an output.
filedirectory
option 5object
Properties
treeobjectrequired
Additional properties
valueArtifactSource (cycle)
parametersobject
Additional properties
valueParameterBinding
A literal parameter value or a reference to an enclosing parameter.
Any of
option 1object
Properties
parameterstringrequired
option 2any of
Any of
option 1string
option 2boolean
option 3integer | string (int64)int64
- pattern:
^-?[0-9]+$
option 4number | string
- pattern:
^(NaN|[+-]?Infinity)$
secretsobject
Additional properties
valueArtifactSource
An artifact reference within a composition.
One of
option 1object
Properties
inputstringrequired
option 2object
Properties
pathstringrequired
option 3object
Properties
ruleRuleOutputSourcerequired
Reference to a node output.
Properties
nodestringrequired
outputstringrequired
option 4object
Properties
selectArtifactSelectionrequired
A path within a directory artifact. Symlinks must resolve inside that directory.
Properties
sourceArtifactSource (cycle)required
pathstringrequired
kindArtifactKindrequired
Filesystem object accepted by an input or produced by an output.
filedirectory
option 5object
Properties
treeobjectrequired
Additional properties
valueArtifactSource (cycle)
rulesobject
Additional properties
valueRuleBinding (cycle)
outputsobject
Additional properties
valueArtifactSource
An artifact reference within a composition.
One of
option 1object
Properties
inputstringrequired
option 2object
Properties
pathstringrequired
option 3object
Properties
ruleRuleOutputSourcerequired
Reference to a node output.
Properties
nodestringrequired
outputstringrequired
option 4object
Properties
selectArtifactSelectionrequired
A path within a directory artifact. Symlinks must resolve inside that directory.
Properties
sourceArtifactSource (cycle)required
pathstringrequired
kindArtifactKindrequired
Filesystem object accepted by an input or produced by an output.
filedirectory
option 5object
Properties
treeobjectrequired
Additional properties
valueArtifactSource (cycle)
bundleSystemBundleConfig
Bundle encoding for the predefined pipeline.
Properties
enabledboolean
compressionboolean
chunkerChunkerAlgorithm
Bundle payload chunking algorithm, as defined by rugix-bundle.
optionsSystemOptions
Properties
use-squashfsSquashfsOptions
Properties
additional-optionsarray<string>
Items
valuestring
no-compressionboolean
You will find the most recent version of this schema on GitHub.
System Artifacts
A system’s rules table instantiates reusable build rules. Its outputs
table maps published file names to graph artifacts. A target or image
also enables the predefined pipeline, whose outputs rules can use through the
reserved node target.
See Systems for examples and bundle configuration.
./run-bakery bake system customized
./run-bakery bake system customized --artifact system.img --output build/image-only