Expand description
Orchestration for prebuilt distro / local-package kernels.
Ties the three foundation pieces together into a cache entry the rest of ktstr boots like any built kernel:
repo::resolve_distro_kernel— spec → concrete package URLs + sha256 (distro path only).crate::fetch::download_verified_file— stream each package (and its debuginfo) with the shared watchdog + progress + retry.extract— unpack the packages and locate image / modules / config / vmlinux.
then a config gate (boot-critical options must be =y/=m, other
ktstr-feature options warn), a boot-module selection (each modular
virtio driver is module_closure’d and embedded in the entry), and
an atomic install into the kernel cache.
§Config gate & boot modules — why these options
The ktstr guest boots off the initramfs (no root disk — see
src/vmm/setup/mod.rs rdinit=/init), so the only devices EVERY
boot touches are the virtio-console control ports
(the named ktstr-bulk sys_rdy channel and /dev/hvc0), presented over
the virtio-MMIO transport on both arches
(src/vmm/setup/mod.rs console virtio_mmio.device=,
src/vmm/aarch64/fdt.rs virtio,mmio nodes) and loaded before any
virtio access by guest init
(src/vmm/rust_init/init.rs “load modules BEFORE any virtio device
is touched”). So BOOT_CRITICAL — virtio core, the MMIO
transport, and the console driver — is what a kernel cannot boot in
ktstr without, in ANY form; absent (neither =y nor =m) is a
hard error. FEATURE_MODULES (blk / net / pci / btrfs) back
optional devices attached only by tests that request a disk or NIC
(self.disk / self.networks gating in setup/mod.rs), so a
missing one only warns. virtio_pci is x86-only (aarch64 has no
PCI bus).
Functions§
- acquire_
distro_ kernel - Acquire a prebuilt distro kernel (
--kernel fedora/ubuntu/amazonlinux, with optional pinned release) into the cache and return its cache-entry directory. - acquire_
package_ kernel - Acquire a kernel from one or more local
.rpm/.debfiles into the cache and return its cache-entry directory. No debuginfo requirement —vmlinuxis cached only when a debuginfo package is among the files; otherwise the entry has no vmlinux and the monitor’s vmlinux-dependent features surface their normal “no vmlinux” error only if actually used.