Skip to content

Switch from raw to QCOW2 and 2MB to 4MB firmware, adjust firmware variables creation - #2434

Merged
chewi merged 6 commits into
mainfrom
chewi/new-firmware
Nov 12, 2024
Merged

chewi merged 6 commits into
mainfrom
chewi/new-firmware

Conversation

@chewi

@chewi chewi commented Nov 8, 2024 •

Copy link
Copy Markdown
Contributor

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 entries added in the respective changelog/ directory (user-facing change, bug fix, security fix, update)
  • Inspected CI output for image differences: /boot and /usr size, packages, list files for any missing binaries, kernel modules, config files, kernel modules, etc.

@chewi chewi self-assigned this Nov 8, 2024
@chewi
chewi force-pushed the chewi/new-firmware branch from 738b908 to 3e00e3f Compare November 8, 2024 12:37
@chewi
chewi requested a review from a team November 8, 2024 12:37
Comment thread build_library/vm_image_util.sh
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]>
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]>

This branch had an error being deployed

1 failed deployment
development — 010afcd3 Deployed Nov 12, 2024 by chewi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants