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
27BUILDING_GSI := true
28
29# Exclude all files under system/product and system/system_ext
30PRODUCT_ARTIFACT_PATH_REQUIREMENT_ALLOWED_LIST += \
31    system/product/% \
32    system/system_ext/%
33
34# GSI should always support up-to-date platform features.
35# Keep this value at the latest API level to ensure latest build system
36# default configs are applied.
37PRODUCT_SHIPPING_API_LEVEL := 30
38
39# Enable dynamic partitions to facilitate mixing onto Cuttlefish
40PRODUCT_USE_DYNAMIC_PARTITIONS := true
41
42# Enable dynamic partition size
43PRODUCT_USE_DYNAMIC_PARTITION_SIZE := true
44
45# Disable the build-time debugfs restrictions on GSI builds
46PRODUCT_SET_DEBUGFS_RESTRICTIONS := false
47
48# GSI targets should install "unflattened" APEXes in /system
49TARGET_FLATTEN_APEX := false
50
51# GSI targets should install "flattened" APEXes in /system_ext as well
52PRODUCT_INSTALL_EXTRA_FLATTENED_APEXES := true
53
54# The flattened version of com.android.apex.cts.shim.v1 should be explicitly installed
55# because the shim apex is prebuilt one and PRODUCT_INSTALL_EXTRA_FLATTENED_APEXES is not
56# supported for prebuilt_apex modules yet.
57PRODUCT_PACKAGES += com.android.apex.cts.shim.v1_with_prebuilts.flattened
58
59# GSI specific tasks on boot
60PRODUCT_PACKAGES += \
61    gsi_skip_mount.cfg \
62    init.gsi.rc \
63    init.vndk-nodef.rc \
64
65# Support additional VNDK snapshots
66PRODUCT_EXTRA_VNDK_VERSIONS := \
67    28 \
68    29 \
69    30 \
70    31 \
71
72# Do not build non-GSI partition images.
73PRODUCT_BUILD_CACHE_IMAGE := false
74PRODUCT_BUILD_DEBUG_BOOT_IMAGE := false
75PRODUCT_BUILD_DEBUG_VENDOR_BOOT_IMAGE := false
76PRODUCT_BUILD_USERDATA_IMAGE := false
77PRODUCT_BUILD_VENDOR_IMAGE := false
78PRODUCT_BUILD_SUPER_PARTITION := false
79PRODUCT_BUILD_SUPER_EMPTY_IMAGE := false
80
81# Always build modules from source
82MODULE_BUILD_FROM_SOURCE := true
83
84# Additional settings used in all GSI builds
85PRODUCT_PRODUCT_PROPERTIES += \
86    ro.crypto.metadata_init_delete_all_keys.enabled=false \
87