1# 2# Copyright (C) 2021 Google Inc. 3# 4# Licensed under the Apache License, Version 2.0 (the "License"); 5# you may not use this file except in compliance with the License. 6# You may obtain a copy of the License at 7# 8# http://www.apache.org/licenses/LICENSE-2.0 9# 10# Unless required by applicable law or agreed to in writing, software 11# distributed under the License is distributed on an "AS IS" BASIS, 12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13# See the License for the specific language governing permissions and 14# limitations under the License. 15# 16 17# TODO: Remove this once the APEX is included in base system. 18 19# To include the APEX in your build, insert this in your device.mk: 20# $(call inherit-product, packages/modules/Virtualization/build/apex/product_packages.mk) 21 22# If devices supports AVF it implies that it uses non-flattened APEXes. 23$(call inherit-product, $(SRC_TARGET_DIR)/product/updatable_apex.mk) 24 25PRODUCT_PACKAGES += \ 26 com.android.compos \ 27 features_com.android.virt.xml 28 29ifneq (true, $(RELEASE_INSTALL_APEX_SYSTEMSERVER_DEXPREOPT_SAME_PARTITION)) 30PRODUCT_ARTIFACT_PATH_REQUIREMENT_ALLOWED_LIST := \ 31 system/framework/oat/%@service-compos.jar@classes.odex \ 32 system/framework/oat/%@service-compos.jar@classes.vdex \ 33 34endif 35 36PRODUCT_APEX_SYSTEM_SERVER_JARS := com.android.compos:service-compos 37 38PRODUCT_SYSTEM_EXT_PROPERTIES := ro.config.isolated_compilation_enabled=true 39 40PRODUCT_FSVERITY_GENERATE_METADATA := true 41 42PRODUCT_AVF_ENABLED := true 43 44# The cheap build flags dependency management system until there is a proper one. 45ifdef RELEASE_AVF_ENABLE_DEVICE_ASSIGNMENT 46 ifndef RELEASE_AVF_ENABLE_VENDOR_MODULES 47 $(error RELEASE_AVF_ENABLE_VENDOR_MODULES must also be enabled) 48 endif 49endif 50 51ifdef RELEASE_AVF_ENABLE_LLPVM_CHANGES 52 ifndef RELEASE_AVF_ENABLE_DICE_CHANGES 53 $(error RELEASE_AVF_ENABLE_DICE_CHANGES must also be enabled) 54 endif 55endif 56 57ifdef RELEASE_AVF_ENABLE_REMOTE_ATTESTATION 58 ifndef RELEASE_AVF_ENABLE_DICE_CHANGES 59 $(error RELEASE_AVF_ENABLE_DICE_CHANGES must also be enabled) 60 endif 61endif 62 63ifdef RELEASE_AVF_ENABLE_NETWORK 64 ifndef RELEASE_AVF_ENABLE_LLPVM_CHANGES 65 $(error RELEASE_AVF_ENABLE_LLPVM_CHANGES must also be enabled) 66 endif 67endif 68 69ifdef RELEASE_AVF_ENABLE_EARLY_VM 70 # We can't query TARGET_RELEASE from here, so we use RELEASE_AIDL_USE_UNFROZEN as a proxy value of 71 # whether we are building -next release. 72 ifneq ($(RELEASE_AIDL_USE_UNFROZEN),true) 73 $(error RELEASE_AVF_ENABLE_EARLY_VM can only be enabled in trunk_staging until b/357025924 is fixed) 74 endif 75endif 76