Skip to content

feat(build): Build images from a prebuilt kernel - #529

Draft
jedevc wants to merge 2 commits into
prod-stagingfrom
jedevc/build-kernel-type
Draft

jedevc wants to merge 2 commits into
prod-stagingfrom
jedevc/build-kernel-type

Conversation

@jedevc

@jedevc jedevc commented Oct 6, 2026

Copy link
Copy Markdown
Member

⚠️ Depends on unikraft-cloud/x#516 — do not merge until that lands. go.mod is pinned to that PR's head commit and will need bumping once it's merged.

Lets unikraft image build wrap a kernel that was built somewhere else (straight out of a Unikraft source tree, say) into an image, without going through a runtime at all.

spec: v0.7

targets:
  - kraftcloud/x86_64

kernel: ./build/helloworld_kraftcloud-x86_64

cmd: ["/helloworld"]
$ unikraft image build . --output ./out.oci.tar

Building the core from source is still rejected, as before.

jedevc added 2 commits October 6, 2026 15:10
Signed-off-by: Justin Chadwell <justin@unikraft.com>
A Kraftfile with a unikraft entry was rejected outright, since we can't
build the core from source. With the new kernel type there's nothing to
build: the binary is wrapped as the image's kernel as-is.

The binary carries no platform metadata, so it takes its platform from
the single declared target rather than from a runtime lookup, and the
unikraft-level kconfig is folded into each target's features ahead of
the target's own. Building from source and libraries are still
rejected.

Signed-off-by: Justin Chadwell <justin@unikraft.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant