Skip to content

Commit b63e07e

Browse files
linux-qcom-next: Add hardening.config to kernel configuration
Kernel builds currently lack default security hardening options. Add support to merge `hardening.config` during configuration using merge_config.sh. Introduce `KBUILD_CONFIG_EXTRA` (following KBUILD naming conventions) for internal kernel configs like hardening.config, keeping them separate from external fragments managed via SRC_URI. This ensures consistent hardening across builds. Signed-off-by: Abhilasha Manna <[email protected]>
1 parent 81d6358 commit b63e07e

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,12 @@ 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)}"
39+
KBUILD_CONFIG_EXTRA = "${S}/kernel/configs/hardening.config"
4140

4241
do_configure:prepend() {
4342
# Use a copy of the 'defconfig' from the actual repo to merge fragments
4443
cp ${S}/arch/${ARCH}/configs/${KBUILD_DEFCONFIG} ${B}/.config
4544

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

0 commit comments

Comments
 (0)