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 SystemUI setting
55ifneq ($(PRODUCT_IS_AUTOMOTIVE),true)
56    PRODUCT_PACKAGES += gsi_overlay_systemui
57    PRODUCT_COPY_FILES += \
58        device/generic/common/overlays/overlay-config.xml:$(TARGET_COPY_OUT_SYSTEM_EXT)/overlay/config/config.xml
59endif
60
61# Support additional VNDK snapshots
62PRODUCT_EXTRA_VNDK_VERSIONS := \
63    30 \
64    31 \
65    32 \
66    33 \
67    34 \
68
69# Do not build non-GSI partition images.
70PRODUCT_BUILD_CACHE_IMAGE := false
71PRODUCT_BUILD_DEBUG_BOOT_IMAGE := false
72PRODUCT_BUILD_DEBUG_VENDOR_BOOT_IMAGE := false
73PRODUCT_BUILD_USERDATA_IMAGE := false
74PRODUCT_BUILD_VENDOR_IMAGE := false
75PRODUCT_BUILD_SUPER_PARTITION := false
76PRODUCT_BUILD_SUPER_EMPTY_IMAGE := false
77PRODUCT_BUILD_SYSTEM_DLKM_IMAGE := false
78PRODUCT_EXPORT_BOOT_IMAGE_TO_DIST := true
79
80# Additional settings used in all GSI builds
81PRODUCT_PRODUCT_PROPERTIES += \
82    ro.crypto.metadata_init_delete_all_keys.enabled=false \
83
84# Window Extensions
85ifneq ($(PRODUCT_IS_ATV),true)
86$(call inherit-product, $(SRC_TARGET_DIR)/product/window_extensions.mk)
87endif
88
89# A GSI is to be mixed with different boot images. That means we can't determine
90# the kernel version when building a GSI.
91# Assume the device supports UFFD. If it doesn't, the ART runtime will fall back
92# to CC, and odrefresh will regenerate core dexopt artifacts on the first boot,
93# so this is okay.
94PRODUCT_ENABLE_UFFD_GC := true
95