dlkm: Allow vendor ramdisk modules in its own subdir

Keeps the prebuilt kernel tree clean.

Change-Id: Ia162b6911f06ccac22c976e1aa7398f616edd136
This commit is contained in:
Adithya R 2023-08-09 15:59:16 +05:30 committed by Jake Weinstein
parent c39f15bbb6
commit a9592e9bfa
1 changed files with 7 additions and 1 deletions

View File

@ -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))