Skip to content

Commit 73e11c0

Browse files
linux-qcom-next: Add conditional hardening.config support
Include hardening.config in kernel build only when DISTRO_FEATURES contains 'sec-hardening'. Signed-off-by: Abhilasha Manna <[email protected]>
1 parent 508ff26 commit 73e11c0

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

recipes-kernel/linux/linux-qcom-next_git.bb

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,13 @@ S = "${UNPACKDIR}/${BP}"
3636
KBUILD_DEFCONFIG ?= "defconfig"
3737
KBUILD_DEFCONFIG:qcom-armv7a = "qcom_defconfig"
3838

39+
CONFIG_LIST = "${@" ".join(find_cfgs(d))}"
40+
CONFIG_LIST += "${@bb.utils.contains('DISTRO_FEATURES', 'hardened', '${S}/kernel/configs/hardening.config', '', d)}"
41+
3942
do_configure:prepend() {
4043
# Use a copy of the 'defconfig' from the actual repo to merge fragments
4144
cp ${S}/arch/${ARCH}/configs/${KBUILD_DEFCONFIG} ${B}/.config
4245

4346
# Merge fragment for QCOM value add features
44-
${S}/scripts/kconfig/merge_config.sh -m -O ${B} ${B}/.config ${@" ".join(find_cfgs(d))}
47+
${S}/scripts/kconfig/merge_config.sh -m -O ${B} ${B}/.config ${CONFIG_LIST}
4548
}

0 commit comments

Comments
 (0)