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

feat(wic-tools): add efibootguard dependency #21

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

petermarko
Copy link
Contributor

Similar to other EFI_PROVIDER possibilities which are added already in poky

I'm actually not sure which architectures are supported by efibootguard, so we may need to add more archs

@afreof
Copy link

afreof commented Oct 26, 2022

To make it a bit more Yocto compatible (a layer should not change something unconditionally) and less ARCH specific I would propose:

DEPENDS:append = "${@' efibootguard' if d.getVar('EFI_PROVIDER') == 'efibootguard' else ''}"

Similar to other EFI_PROVIDER possibilities which are added already in poky
@jan-kiszka
Copy link
Collaborator

The old 0.11 release supported x86 (32 and 64 bit) and arm64. 0.12 enabled also 32-bit ARM. RISC-V is on the horizon, just not yet for the next release.

@petermarko
Copy link
Contributor Author

I'm kind of undecided if we should use append by architecture or just append when we use it.
The first one is what upstream poky uses (just depend on anything which can be potentially used, kind of waste but universal) however that will need constant maintenance which we may forget about on upgrades.
The second one is maintenance-free but not exactly matching philosophy of recipe which we append to...

@afreof
Copy link

afreof commented Oct 31, 2022

I see your point. In poky there is (https://git.yoctoproject.org/poky/tree/meta/recipes-core/meta/wic-tools.bb#n12)

DEPENDS:append:x86 = " syslinux-native syslinux grub-efi systemd-boot"
DEPENDS:append:x86-64 = " syslinux-native syslinux grub-efi systemd-boot"
DEPENDS:append:x86-x32 = " syslinux-native syslinux grub-efi"
DEPENDS:append:aarch64 = " grub-efi systemd-boot"

The more different bootloaders have to be supported, the less sense the implementation in poky makes. Who wants to build all bootloaders for all machines? Usually one bootloader per machine is enough. What about changing poky to:

# For build time optimization or for removing GPLv3 packages you might want
# to override these settings in the machine conf file to something like:
#   WIC_DEPENDS_BOOTLOADERS = ""
#   WIC_DEPENDS_EFI_PROVIDERS = "${EFI_PROVIDER}"

WIC_DEPENDS_BOOTLOADERS:x86 ?= "syslinux-native syslinux"
WIC_DEPENDS_BOOTLOADERS:x86-64 ?= "syslinux-native syslinux"
WIC_DEPENDS_BOOTLOADERS:x86-x32 ?= "syslinux-native syslinux"
WIC_DEPENDS_BOOTLOADERS:x86 ?= "syslinux-native syslinux"

WIC_DEPENDS_EFI_PROVIDERS:x86 ?= "grub-efi systemd-boot"
WIC_DEPENDS_EFI_PROVIDERS:x86-64 ?= "grub-efi systemd-boot"
WIC_DEPENDS_EFI_PROVIDERS:x86-x32 ?= "grub-efi"
WIC_DEPENDS_EFI_PROVIDERS:aarch64 ?= "grub-efi systemd-boot"

DEPENDS:append = " ${WIC_DEPENDS_BOOTLOADERS} ${WIC_DEPENDS_EFI_PROVIDERS}"

For meta-efibootguard we could then do:

WIC_DEPENDS_EFI_PROVIDERS:append:x86 = " efibootguard-native efibootguard"
WIC_DEPENDS_EFI_PROVIDERS:append:x86-64 = " efibootguard-native efibootguard"
WIC_DEPENDS_EFI_PROVIDERS:append:aarch64 = " efibootguard-native efibootguard"
WIC_DEPENDS_EFI_PROVIDERS:append:arm = " efibootguard-native efibootguard"

Transition from current state to proposed state:

  • Send patch to poky
  • in meta-efibootguard
    • for branches against poky without this change, what you originally proposed:

      DEPENDS:append:x86 = " efibootguard-native efibootguard"
      DEPENDS:append:x86-64 = " efibootguard-native efibootguard"
      DEPENDS:append:aarch64 = " efibootguard-native efibootguard"
      DEPENDS:append:arm = " efibootguard-native efibootguard"
      
    • for branches without this change, the appends for WIC_DEPENDS_EFI_PROVIDERS

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.

3 participants