Skip to content

Commit

Permalink
kernel: copy only *.ko for debug info
Browse files Browse the repository at this point in the history
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: e1d8e57 ("kernel: include modinfo for built-in modules")
Fixes: 29f6da4 ("kernel: include built-in module list")
Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
  • Loading branch information
981213 committed Jan 7, 2024
1 parent 9658050 commit 066b0fe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/kernel-build.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down

0 comments on commit 066b0fe

Please sign in to comment.