From cae3ef96c66f5e6fce8781e37b6301f5a1ef05af Mon Sep 17 00:00:00 2001 From: Nikita Ioffe Date: Wed, 7 Jun 2023 14:36:56 +0100 Subject: [PATCH] Add PRODUCT_AVF_KERNEL_MODULES_ENABLED This flag controls whether com.android.virt APEX should include an additional kernel image that supports modules loading. Bug: 283822676 Bug: 278008256 Test: m Change-Id: I296c57308e130ee6d5d185dcb4b690d11d2b04ac --- core/android_soong_config_vars.mk | 4 ++++ core/product.mk | 3 +++ 2 files changed, 7 insertions(+) diff --git a/core/android_soong_config_vars.mk b/core/android_soong_config_vars.mk index 6ba539c995..5dba2d166c 100644 --- a/core/android_soong_config_vars.mk +++ b/core/android_soong_config_vars.mk @@ -154,6 +154,10 @@ ifdef PRODUCT_AVF_ENABLED $(call add_soong_config_var_value,ANDROID,avf_enabled,$(PRODUCT_AVF_ENABLED)) endif +ifdef PRODUCT_AVF_KERNEL_MODULES_ENABLED +$(call add_soong_config_var_value,ANDROID,avf_kernel_modules_enabled,$(PRODUCT_AVF_KERNEL_MODULES_ENABLED)) +endif + # Enable system_server optimizations by default unless explicitly set or if # there may be dependent runtime jars. # TODO(b/240588226): Remove the off-by-default exceptions after handling diff --git a/core/product.mk b/core/product.mk index 818aac268f..6f54b78914 100644 --- a/core/product.mk +++ b/core/product.mk @@ -389,6 +389,9 @@ _product_single_value_vars += PRODUCT_MODULE_BUILD_FROM_SOURCE # If true, installs a full version of com.android.virt APEX. _product_single_value_vars += PRODUCT_AVF_ENABLED +# If true, kernel with modules will be used for Microdroid VMs. +_product_single_value_vars += PRODUCT_AVF_KERNEL_MODULES_ENABLED + # List of .json files to be merged/compiled into vendor/etc/linker.config.pb _product_list_vars += PRODUCT_VENDOR_LINKER_CONFIG_FRAGMENTS