Boot Profiles¶
Think of Stage0 as the cursed initrd and Boot Profiles as the cursed config blob for it.
Boot Profiles describe where boot artifacts come from and how stage0 should be adjusted per image/device. Use them when a plain rootfs path/URL is not enough.
Source of Truth¶
- Schema types:
crates/fastboop-schema/src/lib.rs - Codec + validation:
crates/fastboop-core/src/bootprofile.rs - Artifact pipeline schema/codec:
gibblox-pipeline - CLI tooling:
cli/src/commands/bootprofile.rs
Two Representations¶
- Manifest (
BootProfileManifest): YAML/JSON authoring format. - Compiled (
BootProfile): binary format used by runtime commands.
fastboop boot and fastboop stage0 accept a compiled Boot Profile as the ROOTFS input.
Minimal Manifest¶
id: local-erofs
display_name: Local EROFS image
rootfs:
erofs:
file: ./artifacts/rootfs.ero
stage0:
extra_modules:
- ff-memless
Maximal Manifest (Pipeline-Heavy)¶
id: generic-edge-phone
display_name: Generic edge image
rootfs:
ext4:
mbr:
index: 1
android_sparseimg:
xz:
http: https://downloads.example.com/images/generic-edge.img.xz
kernel:
path: /vmlinuz
fat:
mbr:
index: 0
android_sparseimg:
xz:
http: https://downloads.example.com/images/generic-edge.img.xz
dtbs:
path: /dtbs
fat:
mbr:
index: 0
android_sparseimg:
xz:
http: https://downloads.example.com/images/generic-edge.img.xz
extra_cmdline: console=ttyMSM0,115200n8
Validation Highlights¶
rootfsschema supportserofs,ext4, andfat.- Stage0 lower-root currently accepts
erofsandext4; usefatfor kernel/dtbs source pipelines. - Artifact pipeline validation/limits come from
gibblox-pipeline(MAX_PIPELINE_DEPTH=16). - GPT/MBR selector steps must choose exactly one selector field.
kernel.pathanddtbs.path(if present) must be non-empty.dt_overlayscompile/decompile requiresdtc.
How To Bang On It¶
# compile manifest -> binary
cargo run -p fastboop-cli -- bootprofile create ./profile.yaml -o /tmp/profile.fbp
# compile + materialize android sparse index hints
cargo run -p fastboop-cli -- bootprofile create ./profile.yaml --optimize-pipeline-hints -o /tmp/profile.fbp
# inspect binary -> yaml
cargo run -p fastboop-cli -- bootprofile show /tmp/profile.fbp
# exercise stage0 path through compiled profile
cargo run -p fastboop-cli -- stage0 /tmp/profile.fbp --device-profile <id> > /tmp/stage0.cpio