Files
fruix/docs/reports/phase14-native-runtime-freebsd.md

3.7 KiB

Phase 14.2: validated an explicit native FreeBSD runtime slice

Date: 2026-04-03

Goal

Phase 14.1 proved that Fruix could boot without host-copied /boot material by sourcing boot assets from the existing native world output.

Phase 14.2 removed the remaining model ambiguity on the runtime side:

  • the guest should now boot and reach ready state using an explicit native runtime output
  • not by reusing the broader native world artifact for both boot and runtime roles

Changes

Added a new native package:

  • freebsd-native-runtime

This package is built from /usr/src via the existing native world build path and prunes at least:

  • boot
  • usr/include
  • usr/share/doc
  • usr/share/examples
  • usr/share/info
  • usr/share/man
  • usr/share/mk
  • usr/tests

The validated Phase 14.2 operating-system template now uses:

  • #:kernel freebsd-native-kernel
  • #:bootloader freebsd-native-world
  • #:base-packages (list freebsd-native-runtime)

That means the model is now explicit:

  • native world provides boot assets
  • native runtime provides the guest runtime slice
  • host base stores are no longer part of the validated path

Practical sizing finding

This Phase 14.2 layout still duplicates some native world/runtime content in the closure because the boot assets still come from the broader native world output.

As a result, the Phase 13 image sizes were no longer large enough.

Working values were:

  • local QEMU:
    • DISK_CAPACITY=12g
    • ROOT_SIZE=10g
  • real XCP-ng:
    • ROOT_SIZE=10g
    • disk capacity still matched to the fixed 30 GiB VDI

The wrappers were updated to use those larger defaults.

This is acceptable for Phase 14.2 because the next subphase is specifically about cleaning up the runtime/development/boot boundary further.

New files

Added:

  • tests/system/phase14-native-runtime-pid1-operating-system.scm.in
  • tests/system/run-phase14-native-runtime-qemu.sh
  • tests/system/run-phase14-native-runtime-xcpng.sh

These wrappers assert:

  • host_base_store_count=0
  • native kernel present
  • native world present as the current boot-source artifact
  • native runtime present
  • runtime store still contains the files needed for boot-to-ready
  • runtime store no longer contains /boot
  • runtime store no longer contains /usr/include

Validation

Local QEMU / UEFI / TCG

Passing run:

  • PASS phase14-native-runtime-qemu
  • workdir: /tmp/phase14-2-qemu2-1775189802

Confirmed:

disk_capacity=12g
root_size=10g
runtime_store=/frx/store/684a82aeed2c9a353e3a09d2cbf5358274d758005e0bfa9b1025d101bc166f79-freebsd-native-runtime-15.0-STABLE
native_base_store_count=3
host_base_store_count=0
shepherd_pid=1
sshd_status=running
native_runtime_ready=ok

Real XCP-ng VM

Passing run:

  • PASS phase14-native-runtime-xcpng
  • workdir: /tmp/phase14-2-xcpng-1775190184

Confirmed:

vm_id=90490f2e-e8fc-4b7a-388e-5c26f0157289
vdi_id=0f1f90d3-48ca-4fa2-91d8-fc6339b95743
guest_ip=192.168.213.62
root_size=10g
runtime_store=/frx/store/684a82aeed2c9a353e3a09d2cbf5358274d758005e0bfa9b1025d101bc166f79-freebsd-native-runtime-15.0-STABLE
native_base_store_count=3
host_base_store_count=0
shepherd_pid=1
sshd_status=running
compat_prefix_shims=absent
guile_module_smoke=ok
native_runtime_ready=ok

Result

Phase 14.2 is complete.

The validated Fruix guest now reaches ready state using an explicit native runtime artifact:

  • native kernel
  • native world for boot assets
  • native runtime for the guest runtime slice
  • no host-staged FreeBSD base stores in the validated path

Next step

Phase 14.3 should clean up the remaining redundancy by defining clearer runtime vs. development boundaries and, ideally, replacing the temporary use of the broad native world artifact as the boot-source package with a narrower native boot asset package.