feat: add a way to boot UEFI with -kernel and -initrd QEMU args - #615
Merged
Conversation
zyuiop
force-pushed
the
feat/efi-direct-boot
branch
from
June 7, 2026 12:50
67109f8 to
9098036
Compare
Contributor
Author
|
Re. the funky build script: I was planning to use linker scripts for that initially, but it seems we cannot add a linker script with In any case I don't know how to write linker scripts so this is probably the easiest way. We can potentially split the PR in two, one with the rust code changes, and one with the README + funky script. |
zyuiop
force-pushed
the
feat/efi-direct-boot
branch
2 times, most recently
from
June 7, 2026 14:17
c76dcaf to
22dd6a2
Compare
jounathaen
reviewed
Aug 18, 2026
mkroening
force-pushed
the
feat/efi-direct-boot
branch
from
August 20, 2026 11:47
1cfc65a to
a862230
Compare
mkroening
enabled auto-merge
August 20, 2026 11:50
github-merge-queue
Bot
removed this pull request from the merge queue due to a conflict with the base branch
Aug 20, 2026
mkroening
force-pushed
the
feat/efi-direct-boot
branch
from
August 20, 2026 11:59
a862230 to
8c082e7
Compare
mkroening
force-pushed
the
feat/efi-direct-boot
branch
from
August 20, 2026 12:00
8c082e7 to
1a7c4e2
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.
In order for a
-kernelargument to be valid for UEFI boot with AMD SEV-SNP, it needs to "look" like a Linux Kernel, and specifically bits at positions 0x202 must be set to the LinuxBoot magic value, with version at least 0x202.This requires "patching" the image, for which I provide an additional step in the xtask build scripts.
In addition, I modify the
uefientrypoint to parse OVMF provided command line arguments, which include theinitrd=path for the-initrdarguments, as well as any provided-appendarguments, and use those instead of the defaulthermit-appandhermit-argsfiles.This is particularly useful for AMD SEV-SNP because it allows us to use "Measured Direct Boot" (a feature of QEMU which takes the
kernel/initrd/appendarguments and puts their hashes directly in OVMF, ensuring they are verified before boot, and therefore guaranteeing integrity of the files) with Hermit, without relying on Secure Boot (which we were doing up until now in a non-published patch)