From b66b11ec9a4e53f3e933616d7f6b3335bfdec8f2 Mon Sep 17 00:00:00 2001 From: Kelvin Zhang Date: Mon, 5 Dec 2022 13:04:42 -0800 Subject: [PATCH] Allow empty modules.load file to be generated Currently, if BOARD_*_KERNEL_MODULES_LOAD is set to empty string, we default to load all modules listed in BOARD_*_KERNEL_MODULES. For system_dlkm, we do not want to load any modules unless they are dependency of vendor kernel modules. Therefore we need to create an empty modules.load file for system_dlkm. Add 'false' as an out of band value to indicate that an empty modules.load file should be generated. Bug: 149866755 Test: th Change-Id: Ieaaeb2f9a824e97671acff465bbd4da83dfd9aa0 --- core/Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/core/Makefile b/core/Makefile index 80805f7ec9..e96f210335 100644 --- a/core/Makefile +++ b/core/Makefile @@ -447,6 +447,8 @@ $(if $(5),\ $(if $(strip $(BOARD_$(1)_KERNEL_MODULES$(_sep)$(_kver))$(BOARD_$(1)_KERNEL_MODULES_ARCHIVE$(_sep)$(_kver))),\ $(if $(BOARD_$(1)_KERNEL_MODULES_LOAD$(_sep)$(_kver)),,\ $(eval BOARD_$(1)_KERNEL_MODULES_LOAD$(_sep)$(_kver) := $(BOARD_$(1)_KERNEL_MODULES$(_sep)$(_kver)))) \ + $(if $(filter false,$(BOARD_$(1)_KERNEL_MODULES_LOAD$(_sep)$(_kver))),\ + $(eval BOARD_$(1)_KERNEL_MODULES_LOAD$(_sep)$(_kver) :=),) \ $(call copy-many-files,$(call build-image-kernel-modules,$(BOARD_$(1)_KERNEL_MODULES$(_sep)$(_kver)),$(2),$(3),$(call intermediates-dir-for,PACKAGING,depmod_$(1)$(_sep)$(_kver)),$(BOARD_$(1)_KERNEL_MODULES_LOAD$(_sep)$(_kver)),$(4),$(BOARD_$(1)_KERNEL_MODULES_ARCHIVE$(_sep)$(_kver)),$(_stripped_staging_dir),$(_kver)))) \ $(if $(_kver), \ $(eval _dir := $(_kver)/), \