From edc2e0c2eb443c00d1196c242e8d0b75c9aab7cf Mon Sep 17 00:00:00 2001 From: Luca Stefani Date: Sat, 1 Aug 2020 17:24:29 +0200 Subject: [PATCH] kernel: Allow installing modules on vendor_overlay * This allows to easily overlay kernel vendor modules on devices with prebuilt vendor.img Change-Id: Ie870f0c486043b57e4b8b10696830331540ae010 --- build/tasks/kernel.mk | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/build/tasks/kernel.mk b/build/tasks/kernel.mk index 92f51874..cdcff803 100644 --- a/build/tasks/kernel.mk +++ b/build/tasks/kernel.mk @@ -55,6 +55,8 @@ # modules in root instead of vendor # NEED_KERNEL_MODULE_SYSTEM = Optional, if true, install kernel # modules in system instead of vendor +# NEED_KERNEL_MODULE_VENDOR_OVERLAY = Optional, if true, install kernel +# modules in vendor_overlay instead of vendor ifneq ($(TARGET_NO_KERNEL),true) @@ -158,6 +160,11 @@ else ifeq ($(NEED_KERNEL_MODULE_SYSTEM),true) KERNEL_MODULES_OUT := $(TARGET_OUT) KERNEL_DEPMOD_STAGING_DIR := $(KERNEL_BUILD_OUT_PREFIX)$(call intermediates-dir-for,PACKAGING,depmod_system) KERNEL_MODULE_MOUNTPOINT := system +else ifeq ($(NEED_KERNEL_MODULE_VENDOR_OVERLAY),true) +KERNEL_MODULES_OUT := $(TARGET_OUT_PRODUCT)/vendor_overlay/$(PRODUCT_TARGET_VNDK_VERSION) +KERNEL_DEPMOD_STAGING_DIR := $(KERNEL_BUILD_OUT_PREFIX)$(call intermediates-dir-for,PACKAGING,depmod_product) +KERNEL_MODULE_MOUNTPOINT := vendor +$(INSTALLED_PRODUCTIMAGE_TARGET): $(TARGET_PREBUILT_INT_KERNEL) else KERNEL_MODULES_OUT := $(TARGET_OUT_VENDOR) KERNEL_DEPMOD_STAGING_DIR := $(KERNEL_BUILD_OUT_PREFIX)$(call intermediates-dir-for,PACKAGING,depmod_vendor)