From 47aa65ba73e1b29459171de24fb0ee0040cbb39c Mon Sep 17 00:00:00 2001 From: Scott Murray Date: Tue, 11 Feb 2020 13:33:42 -0500 Subject: meta-agl-bsp: Add CONFIG_LSM workaround for 5.1+ kernels Add explicit clearing of CONFIG_LSM before running "make oldconfig" in the do_configure_append added by linux-agl.inc. This ensures that the derived value of CONFIG_LSM will reflect configuration changes done by the merged AGL provided fragments, i.e. SMACK being enabled. Without it, kernel recipes that are not based on linux-yocto.bbclass or have their own fragment handling done via prepend will end up with an incorrect value of CONFIG_LSM which effectively disables SMACK. Examples include the linux-imx or linux-fslc kernels used by NXP. Bug-AGL: SPEC-2932 Change-Id: Id99906e3de75128ebc54866d43d89d3a24bb1cf2 Signed-off-by: Scott Murray --- meta-agl-bsp/recipes-kernel/linux/linux-agl.inc | 3 +++ 1 file changed, 3 insertions(+) (limited to 'meta-agl-bsp') diff --git a/meta-agl-bsp/recipes-kernel/linux/linux-agl.inc b/meta-agl-bsp/recipes-kernel/linux/linux-agl.inc index 17fe96dff..c03c56ea3 100644 --- a/meta-agl-bsp/recipes-kernel/linux/linux-agl.inc +++ b/meta-agl-bsp/recipes-kernel/linux/linux-agl.inc @@ -14,6 +14,9 @@ def find_cfgs(d): do_configure_append () { [ ! -f .config ] && cp -a ${WORKDIR}/defconfig .config + # Need to clear CONFIG_LSM for 5.1+ kernels to ensure it'll get + # regenerated to reflect configuration changes (e.g. SMACK). + sed -i '/^CONFIG_LSM/d' .config merge_config.sh -m .config ${@" ".join(find_cfgs(d))} yes '' | make oldconfig } -- cgit 1.2.3-korg