Switch the containerization dependency from the github URL to a vendored copy (third_party/containerization, upstream commit 6b7b42ca) referenced by path, so we can carry a small local patch that upstream lacks: LinuxContainer.Configuration gains a `vmExtensions` field forwarded into VMConfiguration.extensions. Upstream already supports VMConfiguration.extensions + the VZInstanceExtension hook, but LinuxContainer — our only entry point — never forwarded them, so there was no way to attach a device (e.g. a memory balloon) to a container's VM. Tests/, docs/, examples/, images/ and the corresponding test targets are trimmed for footprint (we never build the dependency's tests). See PATCHES.md for the full diff vs. upstream and the re-vendoring procedure. Also adds the ContainerizationExtras product to NucleicCore (AddressAllocator, named in the configureVZ signature). Co-Authored-By: Claude Opus 4.8 <[email protected]>
1.4 KiB
1.4 KiB
Containerization Kernel Configuration
This directory includes an optimized kernel configuration to produce a fast and lightweight kernel for container use.
config-arm64andconfig-x86_64include the per-arch kernelCONFIG_options.Makefileincludes the kernel version and source package URL.build.shscripts the kernel build process.image/includes the configuration for an image with build tooling.
Building
- The build process relies on having the
containertool installed (https://github.com/apple/container/releases). - Run
make. This should create the image used for building the resulting Linux kernel, and then run a container with that image to perform the kernel build.
Target architecture
The build target is selected by the TARGET_ARCH make variable, which accepts either arm64 or x86_64. When unset, it falls back to the build host's architecture (as reported by uname -m, with aarch64/amd64 normalized to arm64/x86_64).
make(default) → builds for the host archmake TARGET_ARCH=arm64→vmlinux-arm64(uncompressedImage)make TARGET_ARCH=x86_64→vmlinuz-x86_64(compressedbzImage, cross-compiled inside the arm64 container)make x86_64→ convenience alias formake TARGET_ARCH=x86_64
The z suffix on the x86 name follows Linux convention for a compressed kernel image. The resulting kernel is copied into the repo's bin/ directory.