From ae9987ba9684a83a0310b42e28299c545e0e5468 Mon Sep 17 00:00:00 2001 From: Sam James Date: Wed, 4 Sep 2024 15:38:34 +0100 Subject: [PATCH] kernel-build.eclass: fix src_test w/o CTF MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes: 983fe336a7571f822655c25e0785f067de80c64c Signed-off-by: Sam James Signed-off-by: Michał Górny --- eclass/kernel-build.eclass | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/eclass/kernel-build.eclass b/eclass/kernel-build.eclass index 3836bef1276b4..91c962d671abb 100644 --- a/eclass/kernel-build.eclass +++ b/eclass/kernel-build.eclass @@ -312,6 +312,12 @@ kernel-build_src_compile() { kernel-build_src_test() { debug-print-function ${FUNCNAME} "${@}" + local targets=( modules_install ) + + 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 @@ -321,7 +327,7 @@ kernel-build_src_test() { emake O="${WORKDIR}"/build "${MAKEARGS[@]}" \ INSTALL_MOD_PATH="${T}" INSTALL_MOD_STRIP="${strip_args}" \ - modules_install ctf_install + "${targets[@]}" kernel-install_test "${KV_FULL}" \ "${WORKDIR}/build/$(dist-kernel_get_image_path)" \