diff --git a/core/Makefile b/core/Makefile index f9f0b4a2b9..1130e88a78 100644 --- a/core/Makefile +++ b/core/Makefile @@ -599,9 +599,9 @@ $(foreach kmd,$(BOARD_KERNEL_MODULE_DIRS), \ ifeq ($(BOARD_SYSTEM_KERNEL_MODULES),) ifneq ($(BOARD_SYSTEM_DLKM_SRC),) ifneq ($(wildcard $(BOARD_SYSTEM_DLKM_SRC)/*),) - SYSTEM_KERNEL_MODULES := $(call find-files-in-subdirs,$(BOARD_SYSTEM_DLKM_SRC),*.ko,.) - SRC_SYSTEM_KERNEL_MODULES := $(patsubst %,$(BOARD_SYSTEM_DLKM_SRC)/%,$(SYSTEM_KERNEL_MODULES)) - DST_SYSTEM_KERNEL_MODULES := $(patsubst %,:$(TARGET_OUT_SYSTEM_DLKM)/%,$(SYSTEM_KERNEL_MODULES)) + SYSTEM_KERNEL_MODULES := $(shell find $(BOARD_SYSTEM_DLKM_SRC) -type f) + SRC_SYSTEM_KERNEL_MODULES := $(SYSTEM_KERNEL_MODULES) + DST_SYSTEM_KERNEL_MODULES := $(patsubst $(BOARD_SYSTEM_DLKM_SRC)/%,:$(TARGET_OUT_SYSTEM_DLKM)/%,$(SRC_SYSTEM_KERNEL_MODULES)) SYSTEM_KERNEL_MODULE_COPY_PAIRS := $(join $(SRC_SYSTEM_KERNEL_MODULES),$(DST_SYSTEM_KERNEL_MODULES)) ALL_DEFAULT_INSTALLED_MODULES += $(call copy-many-files,$(SYSTEM_KERNEL_MODULE_COPY_PAIRS)) endif