kernel: copy only *.ko for debug info
authorChuanhong Guo <gch981213@gmail.com>
Sun, 7 Jan 2024 15:56:05 +0000 (23:56 +0800)
committerChuanhong Guo <gch981213@gmail.com>
Sun, 7 Jan 2024 15:56:05 +0000 (23:56 +0800)
Previous commits installed non-elf files into /lib/modules/$VER/.
COLLECT_KERNEL_DEBUG tries to strip all files and these two files
break the build.
Fix it by copying only kernel modules for debug info collection.

Fixes: e1d8e57614 ("kernel: include modinfo for built-in modules")
Fixes: 29f6da4340 ("kernel: include built-in module list")
Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
include/kernel-build.mk

index 5b332258f8b8c5e9ae3fc481d5d637ab03694380..b9513ec41435fb732b22ab0cd63fc1ccc698b325 100644 (file)
@@ -63,7 +63,7 @@ ifdef CONFIG_COLLECT_KERNEL_DEBUG
        mkdir -p $(KERNEL_BUILD_DIR)/debug/modules
        $(CP) $(LINUX_DIR)/vmlinux $(KERNEL_BUILD_DIR)/debug/
        -$(CP) \
-               $(STAGING_DIR_ROOT)/lib/modules/$(LINUX_VERSION)/* \
+               $(STAGING_DIR_ROOT)/lib/modules/$(LINUX_VERSION)/*.ko \
                $(KERNEL_BUILD_DIR)/debug/modules/
        $(FIND) $(KERNEL_BUILD_DIR)/debug -type f | $(XARGS) $(KERNEL_CROSS)strip --only-keep-debug
        $(TAR) c -C $(KERNEL_BUILD_DIR) debug \