2.9 KiB
2.9 KiB
Phase 8.2: Image generation integrated with the Fruix system definition layer
Date: 2026-04-01
Summary
This step moves bhyve-image generation out of a detached shell-only path and into the declarative Fruix FreeBSD system-composition module.
Added files:
tests/system/materialize-phase8-system-image.scmtests/system/run-phase8-system-image.sh
Updated file:
modules/fruix/system/freebsd.scm
Validation command
Run command:
METADATA_OUT=/tmp/phase8-system-image-metadata.txt \
./tests/system/run-phase8-system-image.sh
What changed in the system layer
The FreeBSD system module now exports image-oriented operations including:
operating-system-image-specmaterialize-bhyve-image
The integrated image path now:
- starts from a declarative Fruix operating-system object
- materializes the system closure under
/frx/store - materializes a rootfs from that closure
- stages the closure and its reference closure into
rootfs/frx/store - builds:
esp.imgroot.ufsdisk.img
- stores the resulting image artifact as a content-addressed store item under
/frx/store
Observed results
Observed metadata included:
image_store_path=/frx/store/...-fruix-bhyve-image-fruix-freebsddisk_image=/frx/store/...-fruix-bhyve-image-fruix-freebsd/disk.imgclosure_path=/frx/store/...-fruix-system-fruix-freebsdraw_sha256=ac57d4c694ea3cf6b1bd24be48982090a6cfcfa301d052c1f903636a46f2d56eimage_size_bytes=335578624store_item_count=13esp_fstype=msdosfsroot_fstype=ufsrun_current_system_target=/frx/store/...-fruix-system-fruix-freebsdboot_loader_target=/run/current-system/boot/loaderrc_conf_target=/run/current-system/etc/rc.confrc_script_target=/run/current-system/usr/local/etc/rc.d/fruix-shepherdimage_generation_mode=declarative-system-layer
Important findings
- image generation is now a direct output of the Fruix FreeBSD system-definition layer rather than an external follow-up script around Phase 7 artifacts
- the resulting image artifact is itself stored under
/frx/store, preserving the project’s store-centered composition story as the work moves from closures to VM images - rerunning
materialize-bhyve-imagefor the same operating-system description produced the same image store path, which is the current prototype proof that the declarative system object can drive image generation end-to-end - the integrated image still passes the same static boot-structure checks used in Phase 8.1:
- GPT layout
- EFI partition contents
- UFS root partition
- serial-console loader configuration
run/current-systemtopology
Conclusion
Phase 8.2 is satisfied on the current FreeBSD prototype track:
- a single declarative Fruix operating-system description can now drive image generation end-to-end
- the result is a bhyve-oriented raw image artifact stored under
/frx/store - Phase 8 as a whole is now complete on the active FreeBSD amd64 prototype path