diff --git a/dlkm/kernel-platform.mk b/dlkm/kernel-platform.mk index fe2bdb35..ceb97610 100644 --- a/dlkm/kernel-platform.mk +++ b/dlkm/kernel-platform.mk @@ -20,8 +20,10 @@ endif # Path to system_dlkm artifacts directory ifneq ($(wildcard $(KERNEL_PREBUILT_DIR)/system_dlkm/),) BOARD_SYSTEM_DLKM_SRC := $(KERNEL_PREBUILT_DIR)/system_dlkm +ifeq ($(wildcard $(BOARD_SYSTEM_DLKM_SRC)/lib/modules/),) PRODUCT_COPY_FILES += \ - $(call find-copy-subdir-files,*,$(KERNEL_PREBUILT_DIR)/system_dlkm/,$(TARGET_COPY_OUT_SYSTEM_DLKM)/lib/modules) + $(call find-copy-subdir-files,*,$(BOARD_SYSTEM_DLKM_SRC)/,$(TARGET_COPY_OUT_SYSTEM_DLKM)/lib/modules) +endif endif # DLKM