From 482339617b419720c67ffee11b98b77fd0edd621 Mon Sep 17 00:00:00 2001 From: Javier Viguera Date: Mon, 8 Aug 2022 15:36:25 +0200 Subject: [PATCH] linux-dey: fix kernel build configuration Commit 8cba3aaefb in 'meta-freescale' changed the kernel_localversion function we are using in our kernel recipe. This leads to a not-properly configured kernel build, where CONFIG_MODULES is disabled. That config option is needed to build external kernel modules in other recipes, so those recipes (kernel-module-qualcomm, cryptodev-module, etc) fail to build. The commit makes sure the kernel is properly configured for building by extending the do_configure function in a "prepend". Signed-off-by: Javier Viguera --- meta-digi-arm/recipes-kernel/linux/linux-dey_5.15.bb | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/meta-digi-arm/recipes-kernel/linux/linux-dey_5.15.bb b/meta-digi-arm/recipes-kernel/linux/linux-dey_5.15.bb index cce04aa45..ba8fd37d3 100644 --- a/meta-digi-arm/recipes-kernel/linux/linux-dey_5.15.bb +++ b/meta-digi-arm/recipes-kernel/linux/linux-dey_5.15.bb @@ -24,6 +24,15 @@ require ${@oe.utils.conditional('TRUSTFENCE_SIGN', '1', 'recipes-kernel/linux/li # Use custom provided 'defconfig' if variable KERNEL_DEFCONFIG is cleared SRC_URI +="${@oe.utils.conditional('KERNEL_DEFCONFIG', '', 'file://defconfig', '', d)}" +# This is needed because kernel_localversion (in fsl-kernel-localversion.bbclass) +# creates a basic ${B}/.config file and because that file exists, kernel_do_configure +# (in kernel.bbclass) does not apply our defconfig. +do_configure:prepend:imx-nxp-bsp() { + if [ -f "${WORKDIR}/defconfig" ] && [ -f "${B}/.config" ]; then + cat "${WORKDIR}/defconfig" >> "${B}/.config" + fi +} + # Apply configuration fragments do_configure:append() { # Only accept fragments ending in .cfg. If the fragments contain