From 1382fe78e08941eb5fde03624a2d44a2da9784dd Mon Sep 17 00:00:00 2001 From: Samuel Gosselin Date: Thu, 1 Jun 2023 03:16:58 +0000 Subject: [PATCH] gs201: support splitting modules between system/vendor_dlkm Currently, all gs201 targets have a system_dlkm image but their modules are stored on the vendor_dlkm partition. In order to support the staging kernel, modules have to be split across the system/vendor_dlkm images. This fix enables targets to define modules on the system_dlkm image. If so, the system/vendor_dlkm split will be honored. Otherwise, all modules will remain stored on the vendor_dlkm image. Test: - Build and flash aosp_panther, no errors. - Build and flash a target defining BOARD_SYSTEM_KERNEL_MODULES, ensure modules are correctly split across the two dlkm partitions. Bug: 285177263 Change-Id: I80131d97073ce666a9228a47c2fff94b76139a64 Signed-off-by: Samuel Gosselin --- BoardConfig-common.mk | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/BoardConfig-common.mk b/BoardConfig-common.mk index 92dab880..f6804417 100644 --- a/BoardConfig-common.mk +++ b/BoardConfig-common.mk @@ -411,7 +411,15 @@ BOARD_VENDOR_KERNEL_MODULES_LOAD := $(strip $(shell cat $(KERNEL_MODULE_DIR)/ven ifndef BOARD_VENDOR_KERNEL_MODULES_LOAD $(error vendor_dlkm.modules.load not found or empty) endif + +# staging kernels might have modules split between system/vendor_dlkm. If +# the target defined modules on the system_dlkm image, honor the split. +# Otherwise, assume all modules are stored on the vendor_dlkm image. +ifneq ($(BOARD_SYSTEM_KERNEL_MODULES),) +BOARD_VENDOR_KERNEL_MODULES := $(addprefix $(KERNEL_MODULE_DIR)/, $(notdir $(BOARD_VENDOR_KERNEL_MODULES_LOAD))) +else BOARD_VENDOR_KERNEL_MODULES := $(KERNEL_MODULES) +endif # Using BUILD_COPY_HEADERS BUILD_BROKEN_USES_BUILD_COPY_HEADERS := true