From: Aswin Murugan Date: Thu, 16 Jul 2026 18:44:04 +0000 (+0530) Subject: systemd: Add backport of EFI_MEMORY_ATTRIBUTE_PROTOCOL warning downgrade patch X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=8bbcc441e12ceff4339845b1990cb4f15f2fbc16;p=thirdparty%2Fopenembedded%2Fopenembedded-core.git systemd: Add backport of EFI_MEMORY_ATTRIBUTE_PROTOCOL warning downgrade patch Add a backport systemd patch[1] that downgrades the EFI_MEMORY_ATTRIBUTE_PROTOCOL missing message from warning to debug. U-Boot does not currently implement EFI_MEMORY_ATTRIBUTE_PROTOCOL, causing systemd-boot to emit a warning on every boot on EFI 2.10+ platforms. Although the condition is a known U-Boot limitation and requires no user intervention, the warning triggers log_wait() behavior, introducing an unnecessary ~2.5-second delay during boot and negatively impacting boot-time KPIs. Include the patch in the systemd recipe to suppress this non-actionable warning, eliminate the associated ~2.5-second boot delay, and improve boot performance on U-Boot-based systems. [1] https://github.com/systemd/systemd/pull/43017 Signed-off-by: Aswin Murugan Signed-off-by: Mathieu Dubois-Briand Signed-off-by: Richard Purdie --- diff --git a/meta/recipes-core/systemd/systemd-boot_259.5.bb b/meta/recipes-core/systemd/systemd-boot_259.5.bb index bab2e7ae27..0344313ae6 100644 --- a/meta/recipes-core/systemd/systemd-boot_259.5.bb +++ b/meta/recipes-core/systemd/systemd-boot_259.5.bb @@ -8,6 +8,10 @@ DEPENDS = "libcap util-linux gperf-native python3-jinja2-native python3-pyelftoo inherit meson pkgconfig gettext inherit deploy +SRC_URI += " \ + file://0005-boot-downgrade-EFI_MEMORY_ATTRIBUTE_PROTOCOL-warning.patch \ + " + PACKAGE_ARCH = "${MACHINE_ARCH}" LDFLAGS =+ "${@ " ".join(d.getVar('LD').split()[1:])} " diff --git a/meta/recipes-core/systemd/systemd/0005-boot-downgrade-EFI_MEMORY_ATTRIBUTE_PROTOCOL-warning.patch b/meta/recipes-core/systemd/systemd/0005-boot-downgrade-EFI_MEMORY_ATTRIBUTE_PROTOCOL-warning.patch new file mode 100644 index 0000000000..7db73571cd --- /dev/null +++ b/meta/recipes-core/systemd/systemd/0005-boot-downgrade-EFI_MEMORY_ATTRIBUTE_PROTOCOL-warning.patch @@ -0,0 +1,47 @@ +From 829c2f0e3dffe8b4484e730a3f3058b61e2133ad Mon Sep 17 00:00:00 2001 +From: Aswin Murugan +Date: Tue, 14 Jul 2026 11:37:14 +0530 +Subject: [PATCH] boot: downgrade EFI_MEMORY_ATTRIBUTE_PROTOCOL warning + +U-Boot currently does not implement EFI_MEMORY_ATTRIBUTE_PROTOCOL +even when reporting EFI version >= 2.10. Consequently, systemd-boot +emits a warning on every boot when running on U-Boot firmware. + +The absence of EFI_MEMORY_ATTRIBUTE_PROTOCOL is a current +U-Boot limitation and not a condition users can remedy. +Furthermore, the EFI specification does not require all +firmware advertising EFI 2.10 or newer to implement the +protocol. As a result, the warning provides little value on +U-Boot systems while causing log_wait() to impose a 2.5-second +boot delay. + +Downgrade the message to LOG_DEBUG, this keeps the diagnostic +available for debugging purposes without penalizing normal +boot time. + +Upstream-Status: Backport [ https://github.com/systemd/systemd/pull/43017 ] + +Signed-off-by: Aswin Murugan +--- + src/boot/linux.c | 5 +---- + 1 file changed, 1 insertion(+), 4 deletions(-) + +diff --git a/src/boot/linux.c b/src/boot/linux.c +index 67ed859993..09fb63419d 100644 +--- a/src/boot/linux.c ++++ b/src/boot/linux.c +@@ -267,10 +267,7 @@ EFI_STATUS linux_exec( + * if required for NX_COMPAT */ + err = BS->LocateProtocol(MAKE_GUID_PTR(EFI_MEMORY_ATTRIBUTE_PROTOCOL), /* Registration= */ NULL, (void **) &memory_proto); + if (err != EFI_SUCCESS) +- /* Only warn if the UEFI should have support in the first place (version >= 2.10) */ +- log_full(err, +- ST->Hdr.Revision >= ((2U << 16) | 100U) ? LOG_WARNING : LOG_DEBUG, +- "No EFI_MEMORY_ATTRIBUTE_PROTOCOL found, skipping NX_COMPAT support."); ++ log_debug_status(err, "No EFI_MEMORY_ATTRIBUTE_PROTOCOL found, skipping NX_COMPAT support."); + } + + const PeSectionHeader *headers; +-- +2.34.1 + diff --git a/meta/recipes-core/systemd/systemd_259.5.bb b/meta/recipes-core/systemd/systemd_259.5.bb index d576d32a92..96ee4bc842 100644 --- a/meta/recipes-core/systemd/systemd_259.5.bb +++ b/meta/recipes-core/systemd/systemd_259.5.bb @@ -39,6 +39,7 @@ SRC_URI += " \ file://0001-meson-use-libfido2_cflags-dependency.patch \ file://0018-shared-fdset-add-detailed-debug-logging-to-fdset_new.patch \ file://0004-tpm2-util-fix-PCR-bank-guessing-without-EFI.patch \ + file://0005-boot-downgrade-EFI_MEMORY_ATTRIBUTE_PROTOCOL-warning.patch \ " PAM_PLUGINS = " \