The builder provides firecracker-compatible images for 2 kernel versions,
5.10.x and 4.19.x, and cloudhypervisor-compatible images for 1 kernel
version, 5.12.
These images are extremely minimal. kernel-bin is built from SCRATCH and
only contains a kernel binary. kernel-modules, also built from SCRATCH,
only contains modules for that kernel.
Image files can be found in kernel/. The full chain of images which go into
creating the eventually used bin and module images is:
kernel/builder- Built from Ubuntu20.04, installs packages required to build kernels.kernel/firecracker/base- Built from thebuilderimage, compiles the kernel and modules fromkernel/firecracker/configs. This image can be used in specs for versions older than Flintlock 0.5.0 and CAPMVM which do not support the separate bin and module images.kernel/cloud-hypervisor/base- Built from thebuilderimage, compiles the kernel and modules fromkernel/cloud-hypervisor/configs.kernel/bin- Built from either the firecracker or cloud-hypervisor base, contains only the kernel binary.kernel/modules- Built from either the firecracker or cloud-hypervisor base, contains only the kernel modules.
The resulting images can be added to Microvm specs like so:
ghcr.io/weaveworks-liquidmetal/firecracker-kernel-bin:X.X.X
ghcr.io/weaveworks-liquidmetal/firecracker-kernel-modules:X.X.X
ghcr.io/weaveworks-liquidmetal/cloudhypervisor-kernel-bin:X.X.X
ghcr.io/weaveworks-liquidmetal/cloudhypervisor-kernel-modules:X.X.X
For platforms using versions older than Flintlock 0.5.0 and CAPMVM 0.8.0
use the following legacy image for firecracker microvms:
ghcr.io/weaveworks-liquidmetal/flintlock-kernel:X.X.X
Note the filename locations for each of the kernels:
- If using the firecracker
kernelorkernel-bin, the value offilenameshould bebin/vmlinux - If using the cloud-hypervisor
kernel-bin, the value offilenameshould bebin/vmlinux.bin
New images are published automatically when merged to main by Github Actions.
You should not need to manually publish new images to the ghcr account.
- Add a new kernel config file in
kernel/<FC/CH>/configsfollowing the naming pattern - Update the list of
FC_KERNEL_VERSIONSorCH_KERNEL_VERSIONSinkernel/Makefile - Update the versions lists in
.github/workflows/kernel-images.ymland.github/workflows/kernel-images-manual.yml - Update any docs (like this one) with new version info
- Update the Liquid Metal docs with new version info
- Open a PR with your changes
- Merge once checks and reviews pass
Your new version will be automatically published.
Note that Firecracker only supports 5.10 and 4.19 kernels.
- Fork this repo, clone your fork
cdintokernel- Edit the
Dockerfilefor the image you want to change. The build sequence is as follows:Loadinggraph TD; builder-->fc-base; builder-->ch-base; fc-base-->fc-bin; ch-base-->ch-bin; fc-base-->fc-modules; ch-base-->ch-modules;
- Set your image registry
export REGISTRY=docker.io/foobar - If you only want to build one or a subset of kernel versions, set this with
export FC_KERNEL_VERSIONS=5.10.77orexport CH_KERNEL_VERSIONS=5.12 - Run
make build-fcormake build-chto build the images andmake push-fcormake push-chto push the images to your registry