Skip to contentSkip to conversation

core-image-minimal-initramfs: don't install a kernel into the initramfs

PATCH New [email protected] 1 participant 1 message Nov 27, 2023

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 core-image-minimal-initramfs: don't install a kernel into the initramfs

From: Ross Burton <[email protected]>

There's obviously no point in installing a kernel into an initramfs, but if we install kernel modules then they'll recommend the relevant kernel.

Set PACKAGE_EXCLUDE to ensure the initramfs for a kernel doesn't contain the kernel.

---
 meta/recipes-core/images/core-image-minimal-initramfs.bb | 3 +++
 1 file changed, 3 insertions(+)
meta/recipes-core/images/core-image-minimal-initramfs.bb +3 -0
index 1c08c7fec62..7bb0b2738c7 100644
@@ -17,6 +17,9 @@ PACKAGE_INSTALL = "${INITRAMFS_SCRIPTS} ${VIRTUAL-RUNTIME_base-utils} udev base-
 # Do not pollute the initrd image with rootfs features
 IMAGE_FEATURES = ""
 
+# Don't allow the initramfs to contain a kernel
+PACKAGE_EXCLUDE = "kernel-image-*"
+
 export IMAGE_BASENAME = "${MLPREFIX}core-image-minimal-initramfs"
 IMAGE_NAME_SUFFIX ?= ""
 IMAGE_LINGUAS = ""
Signature · 1 line
2.34.1