1# 2# Copyright (C) 2019 The Android Open-Source Project 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# 18# The makefile contains the special settings for GSI releasing. 19# This makefile is used for the build targets which used for releasing GSI. 20# 21# For example: 22# - Released GSI contains skip_mount.cfg to skip mounting prodcut paritition 23# - Released GSI contains more VNDK packages to support old version vendors 24# - etc. 25# 26# See device/generic/common/README.md for more details. 27# 28 29BUILDING_GSI := true 30 31PRODUCT_ARTIFACT_PATH_REQUIREMENT_ALLOWED_LIST += \ 32 system/etc/init/config \ 33 system/product/% \ 34 system/system_ext/% 35 36# GSI should always support up-to-date platform features. 37# Keep this value at the latest API level to ensure latest build system 38# default configs are applied. 39PRODUCT_SHIPPING_API_LEVEL := 34 40 41# Enable dynamic partitions to facilitate mixing onto Cuttlefish 42PRODUCT_USE_DYNAMIC_PARTITIONS := true 43 44# Enable dynamic partition size 45PRODUCT_USE_DYNAMIC_PARTITION_SIZE := true 46 47# GSI specific tasks on boot 48PRODUCT_PACKAGES += \ 49 gsi_skip_mount.cfg \ 50 init.gsi.rc \ 51 init.vndk-nodef.rc \ 52 53 54# Overlay the GSI specific setting for framework and SystemUI 55ifneq ($(PRODUCT_IS_AUTOMOTIVE),true) 56 PRODUCT_PACKAGES += \ 57 gsi_overlay_framework \ 58 gsi_overlay_systemui \ 59 PRODUCT_COPY_FILES += \ 60 device/generic/common/overlays/overlay-config.xml:$(TARGET_COPY_OUT_SYSTEM_EXT)/overlay/config/config.xml 61endif 62 63# Support additional VNDK snapshots 64PRODUCT_EXTRA_VNDK_VERSIONS := \ 65 30 \ 66 31 \ 67 32 \ 68 33 \ 69 34 \ 70 71# Do not build non-GSI partition images. 72PRODUCT_BUILD_CACHE_IMAGE := false 73PRODUCT_BUILD_DEBUG_BOOT_IMAGE := false 74PRODUCT_BUILD_DEBUG_VENDOR_BOOT_IMAGE := false 75PRODUCT_BUILD_USERDATA_IMAGE := false 76PRODUCT_BUILD_VENDOR_IMAGE := false 77PRODUCT_BUILD_SUPER_PARTITION := false 78PRODUCT_BUILD_SUPER_EMPTY_IMAGE := false 79PRODUCT_BUILD_SYSTEM_DLKM_IMAGE := false 80PRODUCT_EXPORT_BOOT_IMAGE_TO_DIST := true 81 82# Build pvmfw with GSI: b/376363989, pvmfw currently only supports AArch64 83ifneq (,$(filter %_arm64,$(TARGET_PRODUCT))) 84PRODUCT_BUILD_PVMFW_IMAGE := true 85endif 86 87# Additional settings used in all GSI builds 88PRODUCT_PRODUCT_PROPERTIES += \ 89 ro.crypto.metadata_init_delete_all_keys.enabled=false \ 90 debug.codec2.bqpool_dealloc_after_stop=1 \ 91 92# Window Extensions 93ifneq ($(PRODUCT_IS_ATV),true) 94$(call inherit-product, $(SRC_TARGET_DIR)/product/window_extensions.mk) 95endif 96 97# A GSI is to be mixed with different boot images. That means we can't determine 98# the kernel version when building a GSI. 99# Assume the device supports UFFD. If it doesn't, the ART runtime will fall back 100# to CC, and odrefresh will regenerate core dexopt artifacts on the first boot, 101# so this is okay. 102PRODUCT_ENABLE_UFFD_GC := true 103