diff mbox series

[wrynose,10/38] grub: disable grub-protect for native builds

Message ID b3e732e13a908e1b46e746d8bf4062d5df5d0fbc.1788938909.git.yoann.congal@smile.fr
State New
Headers show
Series [wrynose,01/38] linux-yocto/6.18: update to v6.18.41 | expand

Commit Message

Yoann Congal Sept. 9, 2026, 7:29 a.m. UTC
From: Himanshu Jadon <hjadon@cisco.com>

grub-native fails on hosts where libtasn1 headers are not available
when configure tries to build grub-protect:

  util/grub-protect.c:25:10: fatal error:
  libtasn1.h: No such file or directory

grub-protect is an optional utility for sealing disk-encryption keys
using the TPM2 key protector. It is not used by the GRUB native tools
staged for Yocto recipe execution.

Disable grub-protect for class-native so grub-native does not depend on
libtasn1. This keeps the native build focused on the tools needed by
Yocto and avoids adding another native library dependency only for an
unused utility.

Target and nativesdk builds keep the upstream default, so image and SDK
behaviour is unchanged.

Signed-off-by: Himanshu Jadon <hjadon@cisco.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 9290ca0517e5a8888ee8a695a87c0d7e7b5ea377)
Signed-off-by: Deepak Rathore <deeratho@cisco.com>
Signed-off-by: Yoann Congal <yoann.congal@smile.fr>
---
 meta/recipes-bsp/grub/grub2.inc | 2 ++
 1 file changed, 2 insertions(+)
diff mbox series

Patch

diff --git a/meta/recipes-bsp/grub/grub2.inc b/meta/recipes-bsp/grub/grub2.inc
index 0656489ead3..466c772e5bf 100644
--- a/meta/recipes-bsp/grub/grub2.inc
+++ b/meta/recipes-bsp/grub/grub2.inc
@@ -73,6 +73,8 @@  EXTRA_OECONF = "--with-platform=${GRUBPLATFORM} \
                 --disable-werror \
 "
 
+EXTRA_OECONF:append:class-native = " --disable-grub-protect"
+
 PACKAGECONFIG ??= ""
 PACKAGECONFIG[grub-mount] = "--enable-grub-mount,--disable-grub-mount,fuse"
 PACKAGECONFIG[device-mapper] = "--enable-device-mapper,--disable-device-mapper,libdevmapper"