diff mbox series

[PATCHv2,1/1] package/systemd: add EFI support option

Message ID 20240911122010.2922087-1-guillaume.chaye@zeetim.com
State Accepted
Headers show
Series [PATCHv2,1/1] package/systemd: add EFI support option | expand

Commit Message

Guillaume GC. Chaye Sept. 11, 2024, 12:20 p.m. UTC
We need to compile systemd with -Defi=true flag to mount automatically
efivarfs in /sys/firmware/efi/efivars

Signed-off-by: Guillaume GC. Chaye <guillaume.chaye@zeetim.com>
---
 package/systemd/Config.in  |  4 ++++
 package/systemd/systemd.mk | 10 ++++++++--
 2 files changed, 12 insertions(+), 2 deletions(-)

Comments

Thomas Petazzoni Oct. 29, 2024, 10:10 p.m. UTC | #1
Hello Guillaume,

On Wed, 11 Sep 2024 14:20:10 +0200
"Guillaume GC. Chaye" <guillaume.chaye@zeetim.com> wrote:

> We need to compile systemd with -Defi=true flag to mount automatically
> efivarfs in /sys/firmware/efi/efivars
> 
> Signed-off-by: Guillaume GC. Chaye <guillaume.chaye@zeetim.com>
> ---
>  package/systemd/Config.in  |  4 ++++
>  package/systemd/systemd.mk | 10 ++++++++--
>  2 files changed, 12 insertions(+), 2 deletions(-)

Applied to master with a slightly improved commit message. An improved
commit message would have helped in getting your patch merged faster,
by providing a clearer explanation of what you're trying to fix, and
how.

Thanks for your contribution!

Thomas
diff mbox series

Patch

diff --git a/package/systemd/Config.in b/package/systemd/Config.in
index 345f08590e..6b695c40c9 100644
--- a/package/systemd/Config.in
+++ b/package/systemd/Config.in
@@ -113,6 +113,7 @@  config BR2_PACKAGE_SYSTEMD_BOOT
 	bool "systemd-boot"
 	depends on BR2_i386 || BR2_x86_64
 	select BR2_PACKAGE_GNU_EFI
+	select BR2_PACKAGE_SYSTEMD_EFI
 	help
 	  systemd-boot is a simple UEFI boot manager which executes
 	  configured EFI images. The default entry is selected by a
@@ -161,6 +162,9 @@  config BR2_PACKAGE_SYSTEMD_BOOT_EFI_ARCH
 	default "x64"   if BR2_x86_64
 	depends on BR2_PACKAGE_SYSTEMD_BOOT
 
+config BR2_PACKAGE_SYSTEMD_EFI
+	bool "enable EFI support"
+
 config BR2_PACKAGE_SYSTEMD_JOURNAL_REMOTE
 	bool "enable journal remote tools"
 	select BR2_PACKAGE_LIBCURL
diff --git a/package/systemd/systemd.mk b/package/systemd/systemd.mk
index 5dca8681bc..e2d0bba96e 100644
--- a/package/systemd/systemd.mk
+++ b/package/systemd/systemd.mk
@@ -647,7 +647,7 @@  endif
 ifeq ($(BR2_PACKAGE_SYSTEMD_BOOT),y)
 SYSTEMD_INSTALL_IMAGES = YES
 SYSTEMD_DEPENDENCIES += gnu-efi host-python-pyelftools
-SYSTEMD_CONF_OPTS += -Defi=true -Dbootloader=enabled
+SYSTEMD_CONF_OPTS += -Dbootloader=enabled
 
 SYSTEMD_BOOT_EFI_ARCH = $(call qstrip,$(BR2_PACKAGE_SYSTEMD_BOOT_EFI_ARCH))
 define SYSTEMD_INSTALL_BOOT_FILES
@@ -660,9 +660,15 @@  define SYSTEMD_INSTALL_BOOT_FILES
 endef
 
 else
-SYSTEMD_CONF_OPTS += -Defi=false -Dbootloader=disabled
+SYSTEMD_CONF_OPTS += -Dbootloader=disabled
 endif # BR2_PACKAGE_SYSTEMD_BOOT == y
 
+ifeq ($(BR2_PACKAGE_SYSTEMD_EFI),y)
+SYSTEMD_CONF_OPTS += -Defi=true
+else
+SYSTEMD_CONF_OPTS += -Defi=false
+endif
+
 SYSTEMD_FALLBACK_HOSTNAME = $(call qstrip,$(BR2_TARGET_GENERIC_HOSTNAME))
 ifneq ($(SYSTEMD_FALLBACK_HOSTNAME),)
 SYSTEMD_CONF_OPTS += -Dfallback-hostname=$(SYSTEMD_FALLBACK_HOSTNAME)