Integrate FreeBSD image generation with system layer
This commit is contained in:
@@ -2082,3 +2082,75 @@ Current assessment:
|
||||
|
||||
- Phase 8.1 is now satisfied on the current FreeBSD prototype track
|
||||
- the next step is to integrate this image generation path into the declarative Fruix system-composition layer so that a single operating-system description can drive image generation end-to-end
|
||||
|
||||
## 2026-04-01 — Phase 8.2 completed: image generation integrated into the declarative system layer
|
||||
|
||||
Completed work:
|
||||
|
||||
- extended the FreeBSD system module with integrated image-generation operations:
|
||||
- `operating-system-image-spec`
|
||||
- `materialize-bhyve-image`
|
||||
- added the Phase 8.2 integration harnesses:
|
||||
- `tests/system/materialize-phase8-system-image.scm`
|
||||
- `tests/system/run-phase8-system-image.sh`
|
||||
- wrote the Phase 8.2 report:
|
||||
- `docs/reports/phase8-system-image-freebsd.md`
|
||||
- ran the integrated system-image harness successfully and captured metadata under:
|
||||
- `/tmp/phase8-system-image-metadata.txt`
|
||||
|
||||
Important findings:
|
||||
|
||||
- image generation is now a direct output of the Fruix FreeBSD system-definition layer rather than an external shell-only follow-up to Phase 7
|
||||
- the integrated path now stores the resulting image artifact itself under `/frx/store`, preserving the store-centered Fruix composition story even at the VM-image layer
|
||||
- rerunning `materialize-bhyve-image` for the same operating-system description produced the same image store path, which is the current prototype proof that one declarative system object can drive image generation end-to-end
|
||||
- observed metadata confirmed:
|
||||
- `image_store_path=/frx/store/...-fruix-bhyve-image-fruix-freebsd`
|
||||
- `disk_image=/frx/store/...-fruix-bhyve-image-fruix-freebsd/disk.img`
|
||||
- `closure_path=/frx/store/...-fruix-system-fruix-freebsd`
|
||||
- `raw_sha256=ac57d4c694ea3cf6b1bd24be48982090a6cfcfa301d052c1f903636a46f2d56e`
|
||||
- `image_size_bytes=335578624`
|
||||
- `store_item_count=13`
|
||||
- `esp_fstype=msdosfs`
|
||||
- `root_fstype=ufs`
|
||||
- `run_current_system_target=/frx/store/...-fruix-system-fruix-freebsd`
|
||||
- `boot_loader_target=/run/current-system/boot/loader`
|
||||
- `rc_conf_target=/run/current-system/etc/rc.conf`
|
||||
- `rc_script_target=/run/current-system/usr/local/etc/rc.d/fruix-shepherd`
|
||||
- `image_generation_mode=declarative-system-layer`
|
||||
|
||||
Current assessment:
|
||||
|
||||
- Phase 8.2 is now satisfied on the current FreeBSD prototype track
|
||||
- Phase 8 as a whole is now complete on the active FreeBSD amd64 prototype path
|
||||
|
||||
## 2026-04-01 — Phase 8 completed on the current FreeBSD prototype track
|
||||
|
||||
Phase 8 is now considered complete for the active FreeBSD amd64 prototype path.
|
||||
|
||||
Why this milestone is satisfied:
|
||||
|
||||
- **Phase 8.1** success criteria were met on the prototype track:
|
||||
- a reproducible raw GPT+UEFI+UFS image can now be generated from the Fruix system outputs
|
||||
- that image passes static boot-structure sanity checks
|
||||
- **Phase 8.2** success criteria were met on the prototype track:
|
||||
- the image builder is now integrated with the declarative Fruix system-definition layer
|
||||
- a single operating-system description now drives image generation end-to-end
|
||||
- the integrated output is itself a store-backed Fruix image artifact under `/frx/store`
|
||||
|
||||
Important scope note:
|
||||
|
||||
- this completes the **image-construction milestone** for the current prototype track, not the first successful bhyve boot yet
|
||||
- the generated image is now ready for the next phase’s VM-launch and serial-console validation work
|
||||
- the current first-boot strategy remains explicit and unchanged:
|
||||
- FreeBSD init + `rc.d` + Shepherd
|
||||
- the image path still reflects the current prototype system/runtime limitations, including the fact that deeper runtime closure completeness for locally copied Guile/Shepherd dependencies will be exercised more fully in Phase 9 boot validation
|
||||
|
||||
Next recommended step:
|
||||
|
||||
1. begin Phase 9.1 by creating a bhyve launcher and serial-console validation harness for the generated image
|
||||
2. keep the current deterministic ready-state target visible:
|
||||
- Shepherd startup leading to the generated `/var/lib/fruix/ready` marker path
|
||||
3. continue preserving the selective Fruix naming policy:
|
||||
- Fruix at the product boundary
|
||||
- `/frx` as the canonical store root
|
||||
- stable upstream-derived internal names unless there is strong architectural value in renaming them
|
||||
|
||||
82
docs/reports/phase8-system-image-freebsd.md
Normal file
82
docs/reports/phase8-system-image-freebsd.md
Normal file
@@ -0,0 +1,82 @@
|
||||
# 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.scm`
|
||||
- `tests/system/run-phase8-system-image.sh`
|
||||
|
||||
Updated file:
|
||||
|
||||
- `modules/fruix/system/freebsd.scm`
|
||||
|
||||
## Validation command
|
||||
|
||||
Run command:
|
||||
|
||||
```sh
|
||||
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-spec`
|
||||
- `materialize-bhyve-image`
|
||||
|
||||
The integrated image path now:
|
||||
|
||||
1. starts from a declarative Fruix operating-system object
|
||||
2. materializes the system closure under `/frx/store`
|
||||
3. materializes a rootfs from that closure
|
||||
4. stages the closure and its reference closure into `rootfs/frx/store`
|
||||
5. builds:
|
||||
- `esp.img`
|
||||
- `root.ufs`
|
||||
- `disk.img`
|
||||
6. 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-freebsd`
|
||||
- `disk_image=/frx/store/...-fruix-bhyve-image-fruix-freebsd/disk.img`
|
||||
- `closure_path=/frx/store/...-fruix-system-fruix-freebsd`
|
||||
- `raw_sha256=ac57d4c694ea3cf6b1bd24be48982090a6cfcfa301d052c1f903636a46f2d56e`
|
||||
- `image_size_bytes=335578624`
|
||||
- `store_item_count=13`
|
||||
- `esp_fstype=msdosfs`
|
||||
- `root_fstype=ufs`
|
||||
- `run_current_system_target=/frx/store/...-fruix-system-fruix-freebsd`
|
||||
- `boot_loader_target=/run/current-system/boot/loader`
|
||||
- `rc_conf_target=/run/current-system/etc/rc.conf`
|
||||
- `rc_script_target=/run/current-system/usr/local/etc/rc.d/fruix-shepherd`
|
||||
- `image_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-image` for 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-system` topology
|
||||
|
||||
## 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
|
||||
Reference in New Issue
Block a user