build: Only include modules needed by product

It takes long time to include all DLKM's makefile even if the
product does not need this module.

Time of "make bootimage" on user build:
- without change: 23 mins
- with change: 9 mins

Change-Id: Icf0cd01b318a17457336dc7627cbf1ab3a8c78b8
Reviewed-on: https://gerrit.mot.com/2057699
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Minghui Wei <weimh1@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
This commit is contained in:
jixj 2021-09-01 17:38:45 +08:00 • committed by Xiaojun Ji
commit 605998546f

View file

@ -5,8 +5,10 @@ include device/qcom/common/dlkm/Build_external_kernelmodule.mk
endif
else
ifneq (,$(findstring gki,$(KERNEL_DEFCONFIG)))
ifneq (,$(findstring $(LOCAL_MODULE),$(BOARD_VENDOR_KERNEL_MODULES)))
#GKI product should use Qcom latest dlkm compile file
include device/qcom/common/dlkm/AndroidKernelModule.mk
endif
else
DISABLE_THIS_DLKM := $(strip $(TARGET_KERNEL_DLKM_DISABLE))