This project automates the building of custom Linux kernels for Firecracker microVMs, using the same kernel sources as official Firecracker repo and custom configuration files. It supports building specific kernel versions and uploading the resulting binaries to a Google Cloud Storage (GCS) bucket.
- Linux environment (for building kernels)
-
Configure kernel versions:
- Edit
kernel_versions.txtto specify which kernel versions to build (one per line, e.g.,6.1.102). - Place the corresponding config file in
configs/(e.g.,configs/6.1.102.config).
- Edit
-
Build:
make build # or directly ./build.shThe built kernels will be placed in
builds/vmlinux-<version>/<arch>/vmlinux.binwhere<arch>isamd64orarm64(Go/OCI convention). For x86_64 backward compatibility, a legacy copy is also placed atbuilds/vmlinux-<version>/vmlinux.bin.
- On every push, GitHub Actions will automatically build the kernels and save it as an artifact.
Output directories use Go's runtime.GOARCH convention (amd64, arm64) so they match the infra orchestrator's TargetArch() path resolution. The build-time variable TARGET_ARCH (x86_64, arm64) is only used internally for config paths and cross-compilation flags.
Note: these steps should give you new kernel on your self-hosted E2B using https://github.com/e2b-dev/infra
- Copy the kernel build in your project's object storage under
e2b-*-fc-kernels - In packages/api/internal/cfg/model.go update
DefaultKernelVersion - Build and deploy
api
This project is licensed under the Apache License 2.0. See LICENSE for details.