diff --git a/dlkm/kernel-platform.mk b/dlkm/kernel-platform.mk index ece47219..7afd3269 100644 --- a/dlkm/kernel-platform.mk +++ b/dlkm/kernel-platform.mk @@ -32,10 +32,16 @@ endef prepend-kernel-modules = $(eval $1 := $2 $(filter-out $2,$($1))) +ifneq ($(wildcard $(KERNEL_PREBUILT_DIR)/vendor_ramdisk/),) +first_stage_modules := $(call get-kernel-modules,vendor_ramdisk,modules.load) +recovery_modules := $(call get-kernel-modules,vendor_ramdisk,modules.load.recovery) +else first_stage_modules := $(call get-kernel-modules,.,modules.load) +recovery_modules := $(call get-kernel-modules,.,modules.load.recovery) +endif + gki_modules := $(call get-kernel-modules,system_dlkm,modules.load) second_stage_modules := $(call get-kernel-modules,vendor_dlkm,modules.load) -recovery_modules := $(call get-kernel-modules,.,modules.load.recovery) $(call prepend-kernel-modules,BOARD_VENDOR_RAMDISK_KERNEL_MODULES_LOAD,$(first_stage_modules)) $(call prepend-kernel-modules,BOARD_VENDOR_RAMDISK_RECOVERY_KERNEL_MODULES_LOAD,$(recovery_modules))