Skip to content

Commit 9dc89cb

Browse files
authored
Include prune.config to reduce kernel Image size (#1245)
Added prune.config to KBUILD_CONFIG_EXTRA for aarch64 builds to disable non-target architectures configurations, thus significantly reducing kernel size.
2 parents 3ac7db4 + d1e9628 commit 9dc89cb

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +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)}"
39+
KBUILD_CONFIG_EXTRA = "${@bb.utils.contains('DISTRO_FEATURES', 'hardened', '${S}/kernel/configs/hardening.config', '', d)}"
40+
KBUILD_CONFIG_EXTRA:append:aarch64 = "${S}/arch/arm64/configs/prune.config"
4141

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

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

0 commit comments

Comments
 (0)