Skip to contentSkip to conversation

grub: disable grub-protect for native builds

PATCH New Himanshu Jadon -X (hjadon - E INFOCHIPS PRIVATE LIMITED at Cisco) 1 participant 1 message Aug 20

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 grub: disable grub-protect for native builds

From: Himanshu Jadon <[email protected]>

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.

---
 meta/recipes-bsp/grub/grub2.inc | 2 ++
 1 file changed, 2 insertions(+)
meta/recipes-bsp/grub/grub2.inc +2 -0
index 0656489ead..466c772e5b 100644
@@ -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"
Signature · 1 line
2.51.0