Repository navigation
Build Linux guest kernels from defconfigs - #5
Merged
Merged
Conversation
Signed-off-by: Charalampos Mainas <charalampos.mainas@gmail.com>
Add a workflow that builds each kernel under linux_kernel/<name>/ and publishes it as a signed multi-arch image, ghcr.io/<repo>/linux-kernel:<name>, with the kernel at /.boot/kernel. Bunnyfiles can then reference a kernel by digest instead of copying a binary into their build context. A generic kernel for amd64 and arm64 is included. Kernels are described by one defconfig per arch, which keeps the configuration small and reviewable. A `# KVER=` line pins the kernel version; otherwise the latest LTS release is used. The build fails if a symbol set to =y does not end up built in, since drivers the guest needs to mount its root cannot be loaded as modules. To keep builds trustworthy and reproducible, the source tarball must carry a valid kernel.org release signature, and it is compiled in a digest-pinned gcc image with fixed build metadata. Each image ships the kernel license and the full .config, and its labels record the source tarball, its checksum and the defconfig used, so the GPL source of every published kernel is identifiable. Pull requests build the changed kernels and get a comment linking the artifacts; pushes to main publish them. Signed-off-by: Charalampos Mainas <charalampos.mainas@gmail.com>
Kernel builds
On merge: |
cmainas
force-pushed
the
feat/linux_kernels
branch
5 times, most recently
from
October 20, 2026 17:21
04549cd to
988bcb3
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adds
.github/workflows/kernels.yml. It builds the Linux guest kernels described underlinux_kernel/and publishes each one as a signed image that bunnyfiles can reference by digest. It also adds agenerickernel for amd64 and arm64.How it works
linux_kernel/<name>/defconfig-<arch>, where<arch>isamd64orarm64. Each directory is one kernel, published asghcr.io/urunc-dev/unikernel-build/linux-kernel:<name>, with an entry for each arch it defines.# KVER=x.y.zline in the defconfig pins the kernel version. Without one, the latest LTS release is used. All arches of a kernel must resolve to the same version.=ysymbol does not end up built in.vmlinux, arm64 producesImage.main: the built kernels are published, tagged<name>,<name>-<kver>and<name>-<sha>, and signed with cosign.Image contents
/.boot/kernel/.boot/config.config/.boot/COPYING,/.boot/LICENSES/Labels record the kernel version, the source tarball URL and its SHA-256, and the defconfig used. That identifies the GPL source of every published kernel: an unmodified kernel.org release plus this repository.
Also add license and update README to document how to add or change a kernel and how to build one locally.