diff mbox series

[v4,1/9] poky-altcfg.conf: enable "efi" in DISTRO_FEATURES

Message ID 20250422143501.99565-2-mikko.rapeli@linaro.org
State New
Headers show
Series systemd based initrd and modular kernel support | expand

Commit Message

Mikko Rapeli April 22, 2025, 2:34 p.m. UTC
oe-core machines like genericarm64 already enable "efi" in
MACHINE_FEATURES but this does not enable systemd side
"efi" support and thus systemd does not mount ESP
partition for example.

Enabling "efi" in systemd PACKAGECONFIG got negative comments
in review. Also enabling systemd "efi" support via MACHINE_FEATURES
was rejected. Thus enabling this as distro feature for "poky-altcfg".

Many HW targets come with UEFI compatible firmware by default.
For example u-boot enables UEFI support by default on all targets.

This enables seeing UEFI firmware interfaces and data
in userspace since "efivars" is now mounted by systemd
to /sys/firmware/efi/efivars. Things like UEFI bootloader
(grub, systemd-boot etc) selections and secure boot status
can be queried from there.

Signed-off-by: Mikko Rapeli <mikko.rapeli@linaro.org>
---
 meta-poky/conf/distro/poky-altcfg.conf | 3 +++
 1 file changed, 3 insertions(+)

Comments

Richard Purdie April 24, 2025, 10:37 a.m. UTC | #1
On Tue, 2025-04-22 at 17:34 +0300, Mikko Rapeli via lists.openembedded.org wrote:
> oe-core machines like genericarm64 already enable "efi" in
> MACHINE_FEATURES but this does not enable systemd side
> "efi" support and thus systemd does not mount ESP
> partition for example.
> 
> Enabling "efi" in systemd PACKAGECONFIG got negative comments
> in review. Also enabling systemd "efi" support via MACHINE_FEATURES
> was rejected. Thus enabling this as distro feature for "poky-altcfg".
> 
> Many HW targets come with UEFI compatible firmware by default.
> For example u-boot enables UEFI support by default on all targets.
> 
> This enables seeing UEFI firmware interfaces and data
> in userspace since "efivars" is now mounted by systemd
> to /sys/firmware/efi/efivars. Things like UEFI bootloader
> (grub, systemd-boot etc) selections and secure boot status
> can be queried from there.
> 
> Signed-off-by: Mikko Rapeli <mikko.rapeli@linaro.org>
> ---
>  meta-poky/conf/distro/poky-altcfg.conf | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/meta-poky/conf/distro/poky-altcfg.conf b/meta-poky/conf/distro/poky-altcfg.conf
> index 3d64bdd1fe..e56c4f0a37 100644
> --- a/meta-poky/conf/distro/poky-altcfg.conf
> +++ b/meta-poky/conf/distro/poky-altcfg.conf
> @@ -14,4 +14,7 @@ POKY_INIT_MANAGER:poky-altcfg = "systemd"
>  # systemd isn't suitable with musl
>  POKY_INIT_MANAGER:poky-altcfg:libc-musl = "sysvinit"
>  
> +# for systemd etc UEFI support
> +DISTRO_FEATURES:append = " efi"
> +
>  require conf/distro/include/poky-distro-alt-test-config.inc

Having thought a bit about this, I think we should just add this by
default to nodistro. I'm trying to keep the delta between poky and
nodistro minimal if/where we can.

Cheers,

Richard
diff mbox series

Patch

diff --git a/meta-poky/conf/distro/poky-altcfg.conf b/meta-poky/conf/distro/poky-altcfg.conf
index 3d64bdd1fe..e56c4f0a37 100644
--- a/meta-poky/conf/distro/poky-altcfg.conf
+++ b/meta-poky/conf/distro/poky-altcfg.conf
@@ -14,4 +14,7 @@  POKY_INIT_MANAGER:poky-altcfg = "systemd"
 # systemd isn't suitable with musl
 POKY_INIT_MANAGER:poky-altcfg:libc-musl = "sysvinit"
 
+# for systemd etc UEFI support
+DISTRO_FEATURES:append = " efi"
+
 require conf/distro/include/poky-distro-alt-test-config.inc