Re: [OE-core] [PATCH v3 01/11] systemd: enable efi support by default

Koen Kooi
2025-04-16T09:07:43Z

> Op 16 apr 2025, om 08:08 heeft Mikko Rapeli via lists.openembedded.org <mikko.rapeli=linaro.org@lists.openembedded.org> het volgende geschreven:
>
> Hi,
>
> On Tue, Apr 15, 2025 at 04:20:50PM +0000, Peter Kjellerstedt wrote:
>>> -----Original Message-----
>>> From: openembedded-core@lists.openembedded.org <openembedded-core@lists.openembedded.org> On Behalf Of Mikko Rapeli via lists.openembedded.org
>>> Sent: den 15 april 2025 11:52
>>> To: Adrian Freihofer <adrian.freihofer@gmail.com>
>>> Cc: openembedded-core@lists.openembedded.org; mike.looijmans@topic.nl
>>> Subject: Re: [OE-core] [PATCH v3 01/11] systemd: enable efi support by default
>>>
>>> Hi,
>>>
>>> On Mon, Apr 14, 2025 at 06:28:13PM +0200, Adrian Freihofer wrote:
>>>> Hi Mikko
>>>>
>>>> Would it be possible to provide some numbers on the impact on the size of
>>>> the binaries and the additional dependencies that could be added to the
>>>> image with or without efi enabled?
>>>> I think the patch would be a very good compromise if the impact is
>>>> negligible, but otherwise the question is probably still valid.
>>
>> I have probably missed something in this very long thread, but what is the
>> reason to force EFI support on us rather than relying on the efi distro
>> feature? We do not use EFI in any of our products and thus do not have it
>> set in DISTRO_FEATURES. If it is suddenly expected that EFI support should
>> be enabled all over the place it just means I will have to go hunting for
>> it to turn it off rather than just relying on the existing distro feature.
>
> Is it ok for Richard to enable "efi" in poky/poky-altcfg DISTRO_FEATURES
> by default?
>
> It is already enabled in MACHINE_FEATURES for oe-core machines I care about.
>
>>>
>>> The impact is small:
>>>
>>> * python3-pyelftools-native is added to build dependencies
>>>
>>> * At runtime the efivars partition is now automatically mounted read-only by
>>> systemd to /sys/firmware/efi/efivars and can be used to query various firmware
>>> and EFI bootloader (grub, systemd-boot) details
>>>
>>> * Since "efi" is now default, other layers can stop enabling it:
>>>
>>> https://git.yoctoproject.org/meta-arm/tree/meta-arm/recipes-core/systemd/systemd-efi.inc
>>> https://git.yoctoproject.org/meta-security/tree/meta-tpm/recipes-core/systemd/systemd_%25.bbappend#n5
>>> https://github.com/Wind-River/meta-secure-core/blob/master/meta-efi-secure-boot/recipes-core/systemd/systemd-efi-secure-boot.inc
>>
>> But isn't the problem here rather that these layers want to force EFI
>> support instead of using, e.g., REQUIRED_DISTRO_FEATURES = "efi"?
>
> These layers want to enable EFI support but don't want to change the poky/poky-altcfg
> distro settings.

So it sucks to be them, they can't have their cake and eat it as well. If you want 'efi' in your DISTRO_FEATURES, add it to your DISTRO_FEATURES. That is what is so great about OE: you can very easily create your own, optionally derivative, DISTRO.

regards,

Koen