-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Switch from raw to QCOW2 and 2MB to 4MB firmware, adjust firmware variables creation #2434
Merged
Conversation
This file contains 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
chewi
force-pushed
the
chewi/new-firmware
branch
from
November 8, 2024 12:37
738b908
to
3e00e3f
Compare
krnowak
approved these changes
Nov 12, 2024
Kola's logic for choosing BIOS vs EFI isn't too smart, and not specifying --qemu-ovmf-vars leads to it passing -bios to QEMU. This doesn't make sense for arm64, but it did work anyway with the old firmware in raw format. The new firmware in QCOW2 format doesn't work this way. Signed-off-by: James Le Cuirot <[email protected]>
The new arm64 firmware supporting Secure Boot (see next commit) is in QCOW2 format only, avoiding the extra space taken up by the 64MB padding. Supporting both raw and QCOW2 images would be messy, so switch entirely to QCOW2. Only the 4MB images are in QCOW2 format on amd64, so also switch away from the 2MB images. 4MB images are now the default for most distributions as they are needed to apply certain Windows updates. Signed-off-by: James Le Cuirot <[email protected]>
chewi
force-pushed
the
chewi/new-firmware
branch
from
November 12, 2024 12:00
3e00e3f
to
bcd3c0f
Compare
edk2-bin now supports multiple platforms, including QEMU on arm64, so we no longer need to use Fedora's build. Note that the Secure Boot implementation is currently insecure as it lacks SMM, which is needed to protect the EFI variable store. Signed-off-by: James Le Cuirot <[email protected]>
Rather than starting with a blank image, reuse the image that already has the Microsoft certificates and the latest DBX revocation list applied. Gentoo also applies the Red Hat certificates, which we don't need, but this is okay. Signed-off-by: James Le Cuirot <[email protected]>
These are only needed when you are going to ship DB updates to existing systems, which we are not going to do. Our EFI variables are only for testing. End users are expected to use EFI variables provided by their hosts or hardware vendors. We presumably provided these before because some PK and KEK does need to be provided, but we can now use the Microsoft and Red Hat ones provided via Gentoo's edk2 package. Signed-off-by: James Le Cuirot <[email protected]>
Signed-off-by: James Le Cuirot <[email protected]>
chewi
force-pushed
the
chewi/new-firmware
branch
from
November 12, 2024 12:02
bcd3c0f
to
010afcd
Compare
krnowak
approved these changes
Nov 12, 2024
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.
Switch QCOW2 to 4MB firmware, adjust variables creation
The new arm64 firmware supporting Secure Boot is in QCOW2 format only, avoiding the extra space taken up by the 64MB padding. Supporting both raw and QCOW2 images would be messy, so switch entirely to QCOW2.
Only the 4MB images are in QCOW2 format on amd64, so also switch away from the 2MB images. 4MB images are now the default for most distributions as they are needed to apply certain Windows updates.
Rather than starting with a blank variables image, reuse the image that already has the Microsoft certificates and the latest DBX revocation list applied. Gentoo also applies the Red Hat certificates, which we don't need, but this is okay.
Drop the PK and KEK certificates as these are only needed when you are going to ship DB updates to existing systems, which we are not going to do.
How to use
Check that the various images still boot under QEMU, including amd64 with Secure Boot enabled.
Testing done
The Jenkins run passed, including qemu_uefi_secure.
changelog/
directory (user-facing change, bug fix, security fix, update)/boot
and/usr
size, packages, list files for any missing binaries, kernel modules, config files, kernel modules, etc.