core/image-layout
Resolve a Rugix Bakery image layout into an unpopulated disk image.
Resolve a Rugix Bakery image layout into an unpopulated disk image.
Inputs
-
layout -
Kind: file
Rugix ImageLayout definition in JSON or TOML.
-
roots -
Kind: directory
Prepared filesystem trees addressed by each partition root path.
-
layer -
Kind: directory
Layer tree containing roots/ and any referenced firmware blobs.
Parameters
-
size -
Default:
0Disk capacity in bytes. Zero uses the capacity required by the layout.
Outputs
-
image -
Kind: file
Sparse disk image containing its partition table and raw firmware blobs.
Execution
-
Environment
-
Rugix Bakery
-
Source epoch
-
Consumed
-
Output cache
-
Allowed
Resolve a Rugix Bakery ImageLayout into an unpopulated disk. This rule
supports GPT, MBR with extended partitions, and raw firmware written before
partitions. It preserves the layout model used by system image configuration and
BSPs.
The roots input contains prepared filesystem trees under their root names. The
layer input supplies paths referenced by raw firmware blobs. For example, a
partition with root = "system" reads its size estimate from roots/system,
while a blob with file = "bsp/firmware.bin" reads that file from the layer
input.
A partition with an explicit size keeps that capacity. Otherwise, Rugix Bakery estimates capacity from its tree, with a minimum of 64 MiB and 20% overhead. The output contains partition tables and raw firmware, with empty partition regions. Disk and partition identifiers derive from the layout and resolved geometry. Raw firmware reservations must not overlap, exceed their reserved capacity, or overwrite partition table metadata.
For example, this Rugix Bakery ImageLayout describes one ext4 root partition:
type = "gpt"
[[partitions]]
root = "system"
filesystem = { type = "ext4" }The layout records the intended filesystem; this rule resolves geometry without creating that filesystem. An invocation binds the layout and its prepared trees:
uses = "core/image-layout"
inputs.layout = { path = "layouts/device.toml" }
inputs.roots = { path = "prepared-roots" }
inputs.layer = { path = "prepared-layer" }
Use core/assemble-disk to populate the partitions with separately built
filesystem artifacts.