summaryrefslogtreecommitdiff
path: root/eclass/kernel-build.eclass
diff options
context:
space:
mode:
Diffstat (limited to 'eclass/kernel-build.eclass')
-rw-r--r--eclass/kernel-build.eclass15
1 files changed, 13 insertions, 2 deletions
diff --git a/eclass/kernel-build.eclass b/eclass/kernel-build.eclass
index 10fd0cca2cc5..3836bef1276b 100644
--- a/eclass/kernel-build.eclass
+++ b/eclass/kernel-build.eclass
@@ -296,7 +296,13 @@ kernel-build_src_configure() {
kernel-build_src_compile() {
debug-print-function ${FUNCNAME} "${@}"
- emake O="${WORKDIR}"/build "${MAKEARGS[@]}" all
+ local targets=( all )
+
+ if grep -q "CONFIG_CTF=y" "${WORKDIR}/modprep/.config"; then
+ targets+=( ctf )
+ fi
+
+ emake O="${WORKDIR}"/build "${MAKEARGS[@]}" "${targets[@]}"
}
# @FUNCTION: kernel-build_src_test
@@ -315,7 +321,7 @@ kernel-build_src_test() {
emake O="${WORKDIR}"/build "${MAKEARGS[@]}" \
INSTALL_MOD_PATH="${T}" INSTALL_MOD_STRIP="${strip_args}" \
- modules_install
+ modules_install ctf_install
kernel-install_test "${KV_FULL}" \
"${WORKDIR}/build/$(dist-kernel_get_image_path)" \
@@ -337,6 +343,10 @@ kernel-build_src_install() {
targets+=( dtbs_install )
fi
+ if grep -q "CONFIG_CTF=y" "${WORKDIR}/modprep/.config"; then
+ targets+=( ctf_install )
+ fi
+
# Use the kernel build system to strip, this ensures the modules
# are stripped *before* they are signed or compressed.
local strip_args
@@ -430,6 +440,7 @@ kernel-build_src_install() {
mv "build/vmlinux" "${ED}${kernel_dir}/vmlinux" || die
fi
dostrip -x "${kernel_dir}/vmlinux"
+ dostrip -x "${kernel_dir}/vmlinux.ctfa"
fi
# strip empty directories