Skip to content
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

Add support for secure boot without shim #92

Open
wants to merge 3 commits into
base: scarthgap
Choose a base branch
from

Conversation

Dvergatal
Copy link
Contributor

This pull request fixes some minor issues with additional changes like:

  • removes unneeded patch for disabling shim_lock and lockdown
  • fixes build for GRUB_SIGN_VERIFY without shim
  • moves grub-efi secure boot dependencies into conditionals of grub-efi's package RDEPENDS

Disabling inside lockdown and shim_lock verifieirs with patch is unneeded,
as there is already a `--disable-shim-lock`[1] option, which should be used
instead.

[1] https://www.gnu.org/software/grub/manual/grub/html_node/UEFI-secure-boot-and-shim.html

Signed-off-by: Piotr Łobacz <p.lobacz@welotec.com>
In `meta-signing-key/classes/user-key-store.bbclass` file, there is already
an implementation of sb_sign() function with support for both scerarions:
- bootloader is verified by shim_cert.crt
- shim is not used, and DB.crt is used to verify bootloader directly

but when building with MOK_SB ?= "0", grub is being build as `grub(ia32/x64).efi`
and with shim_lock support enabled.

Disabling shim_lock for running secure boot without shim fixes the issue:

  error: ../../grub-core/kern/efi/sb.c:180:shim_lock protocol not found.

during boot.

Disabling renaming of grub efi into `grubx64.efi` leaves it, as it is in
EFI_BOOT_IMAGE variable, set in `yocto/openembedded-core/meta/conf/image-uefi.conf`,
as this will be our first efi boot file.

Signed-off-by: Piotr Łobacz <p.lobacz@welotec.com>
Packages like shim, seloader etc. are currently being installed always,
as packages listed in `packagegroup-efi-secure-boot.bb`.

Instead of installing them for each scheme, they should be installed
conditionally, as run dependencies of grub-efi package.

Signed-off-by: Piotr Łobacz <p.lobacz@welotec.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