Automate the strip and assignment of PRODUCT_ vars
With this change, all PRODUCT_ variables are treated the same when it comes to stripping and assigning them to their final variable name. In the past, all the PRODUCT variables needed to be listed in two places to achieve this. The documentation previously attached to the strip/assignment is moved to the PRODUCT_ variable list in product.mk. Also refactor some of the default value logic to cope with the new automation. Many places in the build system that currently refer to $(PRODUCTS.$(INTERNAL_PRODUCT).X) can now be modified to use $(X) directly. Bug: 116769560 Test: verified noop on PRODUCT_ variables on all products in the tree Change-Id: I5677c355e81359b1d3c0db2a2232941097a05047
This commit is contained in:
parent
fde506a6d7
commit
13ea2a6a7d
3 changed files with 293 additions and 390 deletions
|
@ -404,12 +404,8 @@ endif
|
||||||
# Typical build; include any Android.mk files we can find.
|
# Typical build; include any Android.mk files we can find.
|
||||||
#
|
#
|
||||||
|
|
||||||
# Before we go and include all of the module makefiles, strip values for easier
|
# Strip and readonly a few more variables so they won't be modified.
|
||||||
# processing.
|
$(readonly-final-product-vars)
|
||||||
$(call strip-product-vars)
|
|
||||||
# Before we go and include all of the module makefiles, mark the PRODUCT_*
|
|
||||||
# and ADDITIONAL*PROPERTIES values readonly so that they won't be modified.
|
|
||||||
$(call readonly-product-vars)
|
|
||||||
ADDITIONAL_DEFAULT_PROPERTIES := $(strip $(ADDITIONAL_DEFAULT_PROPERTIES))
|
ADDITIONAL_DEFAULT_PROPERTIES := $(strip $(ADDITIONAL_DEFAULT_PROPERTIES))
|
||||||
.KATI_READONLY := ADDITIONAL_DEFAULT_PROPERTIES
|
.KATI_READONLY := ADDITIONAL_DEFAULT_PROPERTIES
|
||||||
ADDITIONAL_BUILD_PROPERTIES := $(strip $(ADDITIONAL_BUILD_PROPERTIES))
|
ADDITIONAL_BUILD_PROPERTIES := $(strip $(ADDITIONAL_BUILD_PROPERTIES))
|
||||||
|
|
386
core/product.mk
386
core/product.mk
|
@ -106,138 +106,242 @@ define get-all-product-makefiles
|
||||||
$(call get-product-makefiles,$(_find-android-products-files))
|
$(call get-product-makefiles,$(_find-android-products-files))
|
||||||
endef
|
endef
|
||||||
|
|
||||||
#
|
_product_var_list :=
|
||||||
# Functions for including product makefiles
|
_product_var_list += PRODUCT_NAME
|
||||||
#
|
_product_var_list += PRODUCT_MODEL
|
||||||
|
|
||||||
_product_var_list := \
|
# The resoure configuration options to use for this product.
|
||||||
PRODUCT_NAME \
|
_product_var_list += PRODUCT_LOCALES
|
||||||
PRODUCT_MODEL \
|
_product_var_list += PRODUCT_AAPT_CONFIG
|
||||||
PRODUCT_LOCALES \
|
_product_var_list += PRODUCT_AAPT_PREF_CONFIG
|
||||||
PRODUCT_AAPT_CONFIG \
|
_product_var_list += PRODUCT_AAPT_PREBUILT_DPI
|
||||||
PRODUCT_AAPT_PREF_CONFIG \
|
_product_var_list += PRODUCT_HOST_PACKAGES
|
||||||
PRODUCT_AAPT_PREBUILT_DPI \
|
_product_var_list += PRODUCT_PACKAGES
|
||||||
PRODUCT_HOST_PACKAGES \
|
_product_var_list += PRODUCT_PACKAGES_DEBUG
|
||||||
PRODUCT_PACKAGES \
|
_product_var_list += PRODUCT_PACKAGES_DEBUG_ASAN
|
||||||
PRODUCT_PACKAGES_DEBUG \
|
_product_var_list += PRODUCT_PACKAGES_ENG
|
||||||
PRODUCT_PACKAGES_DEBUG_ASAN \
|
_product_var_list += PRODUCT_PACKAGES_TESTS
|
||||||
PRODUCT_PACKAGES_ENG \
|
|
||||||
PRODUCT_PACKAGES_TESTS \
|
# The device that this product maps to.
|
||||||
PRODUCT_DEVICE \
|
_product_var_list += PRODUCT_DEVICE
|
||||||
PRODUCT_MANUFACTURER \
|
_product_var_list += PRODUCT_MANUFACTURER
|
||||||
PRODUCT_BRAND \
|
_product_var_list += PRODUCT_BRAND
|
||||||
|
|
||||||
|
# These PRODUCT_SYSTEM_* flags, if defined, are used in place of the
|
||||||
|
# corresponding PRODUCT_* flags for the sysprops on /system.
|
||||||
|
_product_var_list += \
|
||||||
PRODUCT_SYSTEM_NAME \
|
PRODUCT_SYSTEM_NAME \
|
||||||
PRODUCT_SYSTEM_MODEL \
|
PRODUCT_SYSTEM_MODEL \
|
||||||
PRODUCT_SYSTEM_DEVICE \
|
PRODUCT_SYSTEM_DEVICE \
|
||||||
PRODUCT_SYSTEM_BRAND \
|
PRODUCT_SYSTEM_BRAND \
|
||||||
PRODUCT_SYSTEM_MANUFACTURER \
|
PRODUCT_SYSTEM_MANUFACTURER \
|
||||||
PRODUCT_PROPERTY_OVERRIDES \
|
|
||||||
PRODUCT_DEFAULT_PROPERTY_OVERRIDES \
|
# A list of property assignments, like "key = value", with zero or more
|
||||||
PRODUCT_PRODUCT_PROPERTIES \
|
# whitespace characters on either side of the '='.
|
||||||
PRODUCT_PRODUCT_SERVICES_PROPERTIES \
|
_product_var_list += PRODUCT_PROPERTY_OVERRIDES
|
||||||
PRODUCT_ODM_PROPERTIES \
|
|
||||||
PRODUCT_CHARACTERISTICS \
|
# A list of property assignments, like "key = value", with zero or more
|
||||||
PRODUCT_COPY_FILES \
|
# whitespace characters on either side of the '='.
|
||||||
PRODUCT_OTA_PUBLIC_KEYS \
|
# used for adding properties to default.prop
|
||||||
PRODUCT_EXTRA_RECOVERY_KEYS \
|
_product_var_list += PRODUCT_DEFAULT_PROPERTY_OVERRIDES
|
||||||
PRODUCT_PACKAGE_OVERLAYS \
|
|
||||||
DEVICE_PACKAGE_OVERLAYS \
|
# A list of property assignments, like "key = value", with zero or more
|
||||||
PRODUCT_ENFORCE_RRO_EXCLUDED_OVERLAYS \
|
# whitespace characters on either side of the '='.
|
||||||
PRODUCT_ENFORCE_RRO_TARGETS \
|
# used for adding properties to build.prop of product partition
|
||||||
PRODUCT_SDK_ATREE_FILES \
|
_product_var_list += PRODUCT_PRODUCT_PROPERTIES
|
||||||
PRODUCT_SDK_ADDON_NAME \
|
|
||||||
PRODUCT_SDK_ADDON_COPY_FILES \
|
# A list of property assignments, like "key = value", with zero or more
|
||||||
PRODUCT_SDK_ADDON_COPY_MODULES \
|
# whitespace characters on either side of the '='.
|
||||||
PRODUCT_SDK_ADDON_DOC_MODULES \
|
# used for adding properties to build.prop of product partition
|
||||||
PRODUCT_SDK_ADDON_SYS_IMG_SOURCE_PROP \
|
_product_var_list += PRODUCT_PRODUCT_SERVICES_PROPERTIES
|
||||||
PRODUCT_SOONG_NAMESPACES \
|
_product_var_list += PRODUCT_ODM_PROPERTIES
|
||||||
PRODUCT_DEFAULT_WIFI_CHANNELS \
|
_product_var_list += PRODUCT_CHARACTERISTICS
|
||||||
PRODUCT_DEFAULT_DEV_CERTIFICATE \
|
|
||||||
PRODUCT_RESTRICT_VENDOR_FILES \
|
# A list of words like <source path>:<destination path>[:<owner>].
|
||||||
PRODUCT_VENDOR_KERNEL_HEADERS \
|
# The file at the source path should be copied to the destination path
|
||||||
PRODUCT_BOOT_JARS \
|
# when building this product. <destination path> is relative to
|
||||||
PRODUCT_SUPPORTS_BOOT_SIGNER \
|
# $(PRODUCT_OUT), so it should look like, e.g., "system/etc/file.xml".
|
||||||
PRODUCT_SUPPORTS_VBOOT \
|
# The rules for these copy steps are defined in build/make/core/Makefile.
|
||||||
PRODUCT_SUPPORTS_VERITY \
|
# The optional :<owner> is used to indicate the owner of a vendor file.
|
||||||
PRODUCT_SUPPORTS_VERITY_FEC \
|
_product_var_list += PRODUCT_COPY_FILES
|
||||||
PRODUCT_OEM_PROPERTIES \
|
|
||||||
PRODUCT_SYSTEM_DEFAULT_PROPERTIES \
|
# The OTA key(s) specified by the product config, if any. The names
|
||||||
PRODUCT_SYSTEM_PROPERTY_BLACKLIST \
|
# of these keys are stored in the target-files zip so that post-build
|
||||||
PRODUCT_VENDOR_PROPERTY_BLACKLIST \
|
# signing tools can substitute them for the test key embedded by
|
||||||
PRODUCT_SYSTEM_SERVER_APPS \
|
# default.
|
||||||
PRODUCT_SYSTEM_SERVER_JARS \
|
_product_var_list += PRODUCT_OTA_PUBLIC_KEYS
|
||||||
PRODUCT_ALWAYS_PREOPT_EXTRACTED_APK \
|
_product_var_list += PRODUCT_EXTRA_RECOVERY_KEYS
|
||||||
PRODUCT_DEXPREOPT_SPEED_APPS \
|
|
||||||
PRODUCT_LOADED_BY_PRIVILEGED_MODULES \
|
# Should we use the default resources or add any product specific overlays
|
||||||
PRODUCT_VBOOT_SIGNING_KEY \
|
_product_var_list += PRODUCT_PACKAGE_OVERLAYS
|
||||||
PRODUCT_VBOOT_SIGNING_SUBKEY \
|
_product_var_list += DEVICE_PACKAGE_OVERLAYS
|
||||||
PRODUCT_VERITY_SIGNING_KEY \
|
|
||||||
PRODUCT_SYSTEM_VERITY_PARTITION \
|
# Resource overlay list which must be excluded from enforcing RRO.
|
||||||
PRODUCT_VENDOR_VERITY_PARTITION \
|
_product_var_list += PRODUCT_ENFORCE_RRO_EXCLUDED_OVERLAYS
|
||||||
PRODUCT_PRODUCT_VERITY_PARTITION \
|
|
||||||
PRODUCT_PRODUCT_SERVICES_VERITY_PARTITION \
|
# Package list to apply enforcing RRO.
|
||||||
PRODUCT_ODM_VERITY_PARTITION \
|
_product_var_list += PRODUCT_ENFORCE_RRO_TARGETS
|
||||||
PRODUCT_SYSTEM_SERVER_DEBUG_INFO \
|
|
||||||
PRODUCT_OTHER_JAVA_DEBUG_INFO \
|
_product_var_list += PRODUCT_SDK_ATREE_FILES
|
||||||
PRODUCT_DEX_PREOPT_MODULE_CONFIGS \
|
_product_var_list += PRODUCT_SDK_ADDON_NAME
|
||||||
PRODUCT_DEX_PREOPT_DEFAULT_COMPILER_FILTER \
|
_product_var_list += PRODUCT_SDK_ADDON_COPY_FILES
|
||||||
PRODUCT_DEX_PREOPT_DEFAULT_FLAGS \
|
_product_var_list += PRODUCT_SDK_ADDON_COPY_MODULES
|
||||||
PRODUCT_DEX_PREOPT_BOOT_FLAGS \
|
_product_var_list += PRODUCT_SDK_ADDON_DOC_MODULES
|
||||||
PRODUCT_DEX_PREOPT_PROFILE_DIR \
|
_product_var_list += PRODUCT_SDK_ADDON_SYS_IMG_SOURCE_PROP
|
||||||
PRODUCT_DEX_PREOPT_BOOT_IMAGE_PROFILE_LOCATION \
|
|
||||||
PRODUCT_DEX_PREOPT_GENERATE_DM_FILES \
|
# which Soong namespaces to export to Make
|
||||||
PRODUCT_DEX_PREOPT_NEVER_ALLOW_STRIPPING \
|
_product_var_list += PRODUCT_SOONG_NAMESPACES
|
||||||
|
|
||||||
|
_product_var_list += PRODUCT_DEFAULT_WIFI_CHANNELS
|
||||||
|
_product_var_list += PRODUCT_DEFAULT_DEV_CERTIFICATE
|
||||||
|
_product_var_list += PRODUCT_RESTRICT_VENDOR_FILES
|
||||||
|
|
||||||
|
# The list of product-specific kernel header dirs
|
||||||
|
_product_var_list += PRODUCT_VENDOR_KERNEL_HEADERS
|
||||||
|
|
||||||
|
# A list of module names of BOOTCLASSPATH (jar files)
|
||||||
|
_product_var_list += PRODUCT_BOOT_JARS
|
||||||
|
_product_var_list += PRODUCT_SUPPORTS_BOOT_SIGNER
|
||||||
|
_product_var_list += PRODUCT_SUPPORTS_VBOOT
|
||||||
|
_product_var_list += PRODUCT_SUPPORTS_VERITY
|
||||||
|
_product_var_list += PRODUCT_SUPPORTS_VERITY_FEC
|
||||||
|
_product_var_list += PRODUCT_OEM_PROPERTIES
|
||||||
|
|
||||||
|
# A list of property assignments, like "key = value", with zero or more
|
||||||
|
# whitespace characters on either side of the '='.
|
||||||
|
# used for adding properties to default.prop of system partition
|
||||||
|
_product_var_list += PRODUCT_SYSTEM_DEFAULT_PROPERTIES
|
||||||
|
|
||||||
|
_product_var_list += PRODUCT_SYSTEM_PROPERTY_BLACKLIST
|
||||||
|
_product_var_list += PRODUCT_VENDOR_PROPERTY_BLACKLIST
|
||||||
|
_product_var_list += PRODUCT_SYSTEM_SERVER_APPS
|
||||||
|
_product_var_list += PRODUCT_SYSTEM_SERVER_JARS
|
||||||
|
|
||||||
|
# All of the apps that we force preopt, this overrides WITH_DEXPREOPT.
|
||||||
|
_product_var_list += PRODUCT_ALWAYS_PREOPT_EXTRACTED_APK
|
||||||
|
_product_var_list += PRODUCT_DEXPREOPT_SPEED_APPS
|
||||||
|
_product_var_list += PRODUCT_LOADED_BY_PRIVILEGED_MODULES
|
||||||
|
_product_var_list += PRODUCT_VBOOT_SIGNING_KEY
|
||||||
|
_product_var_list += PRODUCT_VBOOT_SIGNING_SUBKEY
|
||||||
|
_product_var_list += PRODUCT_VERITY_SIGNING_KEY
|
||||||
|
_product_var_list += PRODUCT_SYSTEM_VERITY_PARTITION
|
||||||
|
_product_var_list += PRODUCT_VENDOR_VERITY_PARTITION
|
||||||
|
_product_var_list += PRODUCT_PRODUCT_VERITY_PARTITION
|
||||||
|
_product_var_list += PRODUCT_PRODUCT_SERVICES_VERITY_PARTITION
|
||||||
|
_product_var_list += PRODUCT_ODM_VERITY_PARTITION
|
||||||
|
_product_var_list += PRODUCT_SYSTEM_SERVER_DEBUG_INFO
|
||||||
|
_product_var_list += PRODUCT_OTHER_JAVA_DEBUG_INFO
|
||||||
|
|
||||||
|
# Per-module dex-preopt configs.
|
||||||
|
_product_var_list += PRODUCT_DEX_PREOPT_MODULE_CONFIGS
|
||||||
|
_product_var_list += PRODUCT_DEX_PREOPT_DEFAULT_COMPILER_FILTER
|
||||||
|
_product_var_list += PRODUCT_DEX_PREOPT_DEFAULT_FLAGS
|
||||||
|
_product_var_list += PRODUCT_DEX_PREOPT_BOOT_FLAGS
|
||||||
|
_product_var_list += PRODUCT_DEX_PREOPT_PROFILE_DIR
|
||||||
|
_product_var_list += PRODUCT_DEX_PREOPT_GENERATE_DM_FILES
|
||||||
|
_product_var_list += PRODUCT_DEX_PREOPT_NEVER_ALLOW_STRIPPING
|
||||||
|
|
||||||
|
# Boot image options.
|
||||||
|
_product_var_list += \
|
||||||
PRODUCT_USE_PROFILE_FOR_BOOT_IMAGE \
|
PRODUCT_USE_PROFILE_FOR_BOOT_IMAGE \
|
||||||
PRODUCT_SYSTEM_SERVER_COMPILER_FILTER \
|
PRODUCT_DEX_PREOPT_BOOT_IMAGE_PROFILE_LOCATION \
|
||||||
PRODUCT_SANITIZER_MODULE_CONFIGS \
|
|
||||||
PRODUCT_SYSTEM_BASE_FS_PATH \
|
_product_var_list += PRODUCT_SYSTEM_SERVER_COMPILER_FILTER
|
||||||
PRODUCT_VENDOR_BASE_FS_PATH \
|
# Per-module sanitizer configs
|
||||||
PRODUCT_PRODUCT_BASE_FS_PATH \
|
_product_var_list += PRODUCT_SANITIZER_MODULE_CONFIGS
|
||||||
PRODUCT_PRODUCT_SERVICES_BASE_FS_PATH \
|
_product_var_list += PRODUCT_SYSTEM_BASE_FS_PATH
|
||||||
PRODUCT_ODM_BASE_FS_PATH \
|
_product_var_list += PRODUCT_VENDOR_BASE_FS_PATH
|
||||||
PRODUCT_SHIPPING_API_LEVEL \
|
_product_var_list += PRODUCT_PRODUCT_BASE_FS_PATH
|
||||||
VENDOR_PRODUCT_RESTRICT_VENDOR_FILES \
|
_product_var_list += PRODUCT_PRODUCT_SERVICES_BASE_FS_PATH
|
||||||
VENDOR_EXCEPTION_MODULES \
|
_product_var_list += PRODUCT_ODM_BASE_FS_PATH
|
||||||
VENDOR_EXCEPTION_PATHS \
|
_product_var_list += PRODUCT_SHIPPING_API_LEVEL
|
||||||
PRODUCT_ART_TARGET_INCLUDE_DEBUG_BUILD \
|
_product_var_list += VENDOR_PRODUCT_RESTRICT_VENDOR_FILES
|
||||||
PRODUCT_ART_USE_READ_BARRIER \
|
_product_var_list += VENDOR_EXCEPTION_MODULES
|
||||||
PRODUCT_IOT \
|
_product_var_list += VENDOR_EXCEPTION_PATHS
|
||||||
PRODUCT_SYSTEM_HEADROOM \
|
|
||||||
PRODUCT_MINIMIZE_JAVA_DEBUG_INFO \
|
# Whether the product wants to ship libartd. For rules and meaning, see art/Android.mk.
|
||||||
PRODUCT_INTEGER_OVERFLOW_EXCLUDE_PATHS \
|
_product_var_list += PRODUCT_ART_TARGET_INCLUDE_DEBUG_BUILD
|
||||||
PRODUCT_ADB_KEYS \
|
|
||||||
PRODUCT_CFI_INCLUDE_PATHS \
|
# Make this art variable visible to soong_config.mk.
|
||||||
PRODUCT_CFI_EXCLUDE_PATHS \
|
_product_var_list += PRODUCT_ART_USE_READ_BARRIER
|
||||||
PRODUCT_DISABLE_SCUDO \
|
|
||||||
PRODUCT_COMPATIBLE_PROPERTY_OVERRIDE \
|
# Whether the product is an Android Things variant.
|
||||||
PRODUCT_ACTIONABLE_COMPATIBLE_PROPERTY_DISABLE \
|
_product_var_list += PRODUCT_IOT
|
||||||
PRODUCT_ENFORCE_ARTIFACT_PATH_REQUIREMENTS \
|
|
||||||
PRODUCT_ENFORCE_ARTIFACT_SYSTEM_CERTIFICATE_REQUIREMENT \
|
# Add reserved headroom to a system image.
|
||||||
PRODUCT_ARTIFACT_SYSTEM_CERTIFICATE_REQUIREMENT_WHITELIST \
|
_product_var_list += PRODUCT_SYSTEM_HEADROOM
|
||||||
PRODUCT_ARTIFACT_PATH_REQUIREMENT_HINT \
|
|
||||||
PRODUCT_ARTIFACT_PATH_REQUIREMENT_WHITELIST \
|
# Whether to save disk space by minimizing java debug info
|
||||||
|
_product_var_list += PRODUCT_MINIMIZE_JAVA_DEBUG_INFO
|
||||||
|
|
||||||
|
# Whether any paths are excluded from sanitization when SANITIZE_TARGET=integer_overflow
|
||||||
|
_product_var_list += PRODUCT_INTEGER_OVERFLOW_EXCLUDE_PATHS
|
||||||
|
|
||||||
|
_product_var_list += PRODUCT_ADB_KEYS
|
||||||
|
|
||||||
|
# Whether any paths should have CFI enabled for components
|
||||||
|
_product_var_list += PRODUCT_CFI_INCLUDE_PATHS
|
||||||
|
|
||||||
|
# Whether any paths are excluded from sanitization when SANITIZE_TARGET=cfi
|
||||||
|
_product_var_list += PRODUCT_CFI_EXCLUDE_PATHS
|
||||||
|
|
||||||
|
# Whether the Scudo hardened allocator is disabled platform-wide
|
||||||
|
_product_var_list += PRODUCT_DISABLE_SCUDO
|
||||||
|
|
||||||
|
# A flag to override PRODUCT_COMPATIBLE_PROPERTY
|
||||||
|
_product_var_list += PRODUCT_COMPATIBLE_PROPERTY_OVERRIDE
|
||||||
|
|
||||||
|
# Whether the whitelist of actionable compatible properties should be disabled or not
|
||||||
|
_product_var_list += PRODUCT_ACTIONABLE_COMPATIBLE_PROPERTY_DISABLE
|
||||||
|
_product_var_list += PRODUCT_ENFORCE_ARTIFACT_PATH_REQUIREMENTS
|
||||||
|
_product_var_list += PRODUCT_ENFORCE_ARTIFACT_SYSTEM_CERTIFICATE_REQUIREMENT
|
||||||
|
_product_var_list += PRODUCT_ARTIFACT_SYSTEM_CERTIFICATE_REQUIREMENT_WHITELIST
|
||||||
|
_product_var_list += PRODUCT_ARTIFACT_PATH_REQUIREMENT_HINT
|
||||||
|
_product_var_list += PRODUCT_ARTIFACT_PATH_REQUIREMENT_WHITELIST
|
||||||
|
|
||||||
|
# List of modules that should be forcefully unmarked from being LOCAL_PRODUCT_MODULE, and hence
|
||||||
|
# installed on /system directory by default.
|
||||||
|
_product_var_list += PRODUCT_FORCE_PRODUCT_MODULES_TO_SYSTEM_PARTITION
|
||||||
|
|
||||||
|
# When this is true, dynamic partitions is retrofitted on a device that has
|
||||||
|
# already been launched without dynamic partitions. Otherwise, the device
|
||||||
|
# is launched with dynamic partitions.
|
||||||
|
# This flag implies PRODUCT_USE_DYNAMIC_PARTITIONS.
|
||||||
|
_product_var_list += PRODUCT_RETROFIT_DYNAMIC_PARTITIONS
|
||||||
|
|
||||||
|
# Other dynamic partition feature flags.PRODUCT_USE_DYNAMIC_PARTITION_SIZE and
|
||||||
|
# PRODUCT_BUILD_SUPER_PARTITION default to the value of PRODUCT_USE_DYNAMIC_PARTITIONS.
|
||||||
|
_product_var_list += \
|
||||||
|
PRODUCT_USE_DYNAMIC_PARTITIONS \
|
||||||
PRODUCT_USE_DYNAMIC_PARTITION_SIZE \
|
PRODUCT_USE_DYNAMIC_PARTITION_SIZE \
|
||||||
PRODUCT_BUILD_SUPER_PARTITION \
|
PRODUCT_BUILD_SUPER_PARTITION \
|
||||||
PRODUCT_FORCE_PRODUCT_MODULES_TO_SYSTEM_PARTITION \
|
|
||||||
PRODUCT_USE_DYNAMIC_PARTITIONS \
|
# If set, kernel configuration requirements are present in OTA package (and will be enforced
|
||||||
PRODUCT_RETROFIT_DYNAMIC_PARTITIONS \
|
# during OTA). Otherwise, kernel configuration requirements are enforced in VTS.
|
||||||
PRODUCT_OTA_ENFORCE_VINTF_KERNEL_REQUIREMENTS \
|
# Devices that checks the running kernel (instead of the kernel in OTA package) should not
|
||||||
PRODUCT_XOM_EXCLUDE_PATHS \
|
# set this variable to prevent OTA failures.
|
||||||
PRODUCT_MANIFEST_PACKAGE_NAME_OVERRIDES \
|
_product_var_list += PRODUCT_OTA_ENFORCE_VINTF_KERNEL_REQUIREMENTS
|
||||||
PRODUCT_PACKAGE_NAME_OVERRIDES \
|
|
||||||
PRODUCT_CERTIFICATE_OVERRIDES \
|
# Whether any paths are excluded from being set XOM when ENABLE_XOM=true
|
||||||
PRODUCT_BUILD_SYSTEM_IMAGE \
|
_product_var_list += PRODUCT_XOM_EXCLUDE_PATHS
|
||||||
PRODUCT_BUILD_SYSTEM_OTHER_IMAGE \
|
_product_var_list += PRODUCT_MANIFEST_PACKAGE_NAME_OVERRIDES
|
||||||
PRODUCT_BUILD_VENDOR_IMAGE \
|
_product_var_list += PRODUCT_PACKAGE_NAME_OVERRIDES
|
||||||
PRODUCT_BUILD_PRODUCT_IMAGE \
|
_product_var_list += PRODUCT_CERTIFICATE_OVERRIDES
|
||||||
PRODUCT_BUILD_PRODUCT_SERVICES_IMAGE \
|
_product_var_list += PRODUCT_BUILD_SYSTEM_IMAGE
|
||||||
PRODUCT_BUILD_ODM_IMAGE \
|
_product_var_list += PRODUCT_BUILD_SYSTEM_OTHER_IMAGE
|
||||||
PRODUCT_BUILD_CACHE_IMAGE \
|
_product_var_list += PRODUCT_BUILD_VENDOR_IMAGE
|
||||||
PRODUCT_BUILD_RAMDISK_IMAGE \
|
_product_var_list += PRODUCT_BUILD_PRODUCT_IMAGE
|
||||||
PRODUCT_BUILD_USERDATA_IMAGE \
|
_product_var_list += PRODUCT_BUILD_PRODUCT_SERVICES_IMAGE
|
||||||
PRODUCT_UPDATABLE_BOOT_MODULES \
|
_product_var_list += PRODUCT_BUILD_ODM_IMAGE
|
||||||
PRODUCT_UPDATABLE_BOOT_LOCATIONS \
|
_product_var_list += PRODUCT_BUILD_CACHE_IMAGE
|
||||||
PRODUCT_CHECK_ELF_FILES \
|
_product_var_list += PRODUCT_BUILD_RAMDISK_IMAGE
|
||||||
|
_product_var_list += PRODUCT_BUILD_USERDATA_IMAGE
|
||||||
|
_product_var_list += PRODUCT_UPDATABLE_BOOT_MODULES
|
||||||
|
_product_var_list += PRODUCT_UPDATABLE_BOOT_LOCATIONS
|
||||||
|
|
||||||
|
# Whether the product would like to check prebuilt ELF files.
|
||||||
|
_product_var_list += PRODUCT_CHECK_ELF_FILES
|
||||||
|
.KATI_READONLY := _product_var_list
|
||||||
|
|
||||||
define dump-product
|
define dump-product
|
||||||
$(warning ==== $(1) ====)\
|
$(warning ==== $(1) ====)\
|
||||||
|
@ -250,6 +354,10 @@ define dump-products
|
||||||
$(foreach p,$(PRODUCTS),$(call dump-product,$(p)))
|
$(foreach p,$(PRODUCTS),$(call dump-product,$(p)))
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
#
|
||||||
|
# Functions for including product makefiles
|
||||||
|
#
|
||||||
|
|
||||||
#
|
#
|
||||||
# $(1): product to inherit
|
# $(1): product to inherit
|
||||||
#
|
#
|
||||||
|
@ -372,26 +480,44 @@ define resolve-short-product-name
|
||||||
$(strip $(call _resolve-short-product-name,$(1)))
|
$(strip $(call _resolve-short-product-name,$(1)))
|
||||||
endef
|
endef
|
||||||
|
|
||||||
_product_stash_var_list := $(_product_var_list)
|
# BoardConfig variables that are also inherited in product mks. Should ideally
|
||||||
# TODO: Move this to board_config.mk when no longer set in product makefiles
|
# be cleaned up to not be product variables.
|
||||||
_product_stash_var_list += WITH_DEXPREOPT_BOOT_IMG_AND_SYSTEM_SERVER_ONLY
|
_readonly_late_variables := \
|
||||||
_product_strip_var_list :=
|
DEVICE_PACKAGE_OVERLAYS \
|
||||||
|
WITH_DEXPREOPT_BOOT_IMG_AND_SYSTEM_SERVER_ONLY \
|
||||||
|
|
||||||
|
# Modified internally in the build system
|
||||||
|
_readonly_late_variables += \
|
||||||
|
PRODUCT_COPY_FILES \
|
||||||
|
PRODUCT_DEX_PREOPT_NEVER_ALLOW_STRIPPING \
|
||||||
|
PRODUCT_DEX_PREOPT_BOOT_FLAGS \
|
||||||
|
|
||||||
|
_readonly_early_variables := $(filter-out $(_readonly_late_variables),$(_product_var_list))
|
||||||
|
|
||||||
#
|
#
|
||||||
# Mark the variables in _product_stash_var_list as readonly
|
# Mark the variables in _product_stash_var_list as readonly
|
||||||
#
|
#
|
||||||
define readonly-product-vars
|
define readonly-variables
|
||||||
$(foreach v,$(_product_stash_var_list), \
|
$(foreach v,$(1), \
|
||||||
$(eval $(v) ?=) \
|
$(eval $(v) ?=) \
|
||||||
$(eval .KATI_READONLY := $(v)) \
|
$(eval .KATI_READONLY := $(v)) \
|
||||||
)
|
)
|
||||||
endef
|
endef
|
||||||
|
define readonly-product-vars
|
||||||
|
$(call readonly-variables,$(_readonly_early_variables))
|
||||||
|
endef
|
||||||
|
|
||||||
|
define readonly-final-product-vars
|
||||||
|
$(call readonly-variables,$(_readonly_late_variables))
|
||||||
|
endef
|
||||||
|
|
||||||
#
|
#
|
||||||
# Strip the variables in _product_strip_var_list
|
# Strip the variables in _product_strip_var_list
|
||||||
#
|
#
|
||||||
define strip-product-vars
|
define strip-product-vars
|
||||||
$(foreach v,$(_product_strip_var_list),$(eval $(v) := $(strip $($(v)))))
|
$(foreach v,$(_product_var_list), \
|
||||||
|
$(eval $(v) := $(strip $(PRODUCTS.$(INTERNAL_PRODUCT).$(v)))) \
|
||||||
|
)
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define add-to-product-copy-files-if-exists
|
define add-to-product-copy-files-if-exists
|
||||||
|
|
|
@ -252,29 +252,19 @@ current_product_makefile :=
|
||||||
all_product_makefiles :=
|
all_product_makefiles :=
|
||||||
all_product_configs :=
|
all_product_configs :=
|
||||||
|
|
||||||
|
############################################################################
|
||||||
|
# Strip and assign the PRODUCT_ variables.
|
||||||
|
$(call strip-product-vars)
|
||||||
|
|
||||||
#############################################################################
|
#############################################################################
|
||||||
|
# Sanity check and assign default values
|
||||||
|
|
||||||
# A list of module names of BOOTCLASSPATH (jar files)
|
TARGET_DEVICE := $(PRODUCT_DEVICE)
|
||||||
PRODUCT_BOOT_JARS := $(strip $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_BOOT_JARS))
|
|
||||||
PRODUCT_UPDATABLE_BOOT_MODULES := $(strip $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_UPDATABLE_BOOT_MODULES))
|
|
||||||
PRODUCT_UPDATABLE_BOOT_LOCATIONS := $(strip $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_UPDATABLE_BOOT_LOCATIONS))
|
|
||||||
PRODUCT_SYSTEM_SERVER_JARS := $(strip $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_SYSTEM_SERVER_JARS))
|
|
||||||
PRODUCT_SYSTEM_SERVER_APPS := $(strip $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_SYSTEM_SERVER_APPS))
|
|
||||||
PRODUCT_DEXPREOPT_SPEED_APPS := $(strip $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_DEXPREOPT_SPEED_APPS))
|
|
||||||
PRODUCT_LOADED_BY_PRIVILEGED_MODULES := $(strip $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_LOADED_BY_PRIVILEGED_MODULES))
|
|
||||||
|
|
||||||
# All of the apps that we force preopt, this overrides WITH_DEXPREOPT.
|
# TODO: also keep track of things like "port", "land" in product files.
|
||||||
PRODUCT_ALWAYS_PREOPT_EXTRACTED_APK := $(strip $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_ALWAYS_PREOPT_EXTRACTED_APK))
|
|
||||||
|
|
||||||
# Find the device that this product maps to.
|
|
||||||
TARGET_DEVICE := $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_DEVICE)
|
|
||||||
|
|
||||||
# Figure out which resoure configuration options to use for this
|
# Figure out which resoure configuration options to use for this
|
||||||
# product.
|
# product.
|
||||||
PRODUCT_LOCALES := $(strip $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_LOCALES))
|
|
||||||
# TODO: also keep track of things like "port", "land" in product files.
|
|
||||||
|
|
||||||
# If CUSTOM_LOCALES contains any locales not already included
|
# If CUSTOM_LOCALES contains any locales not already included
|
||||||
# in PRODUCT_LOCALES, add them to PRODUCT_LOCALES.
|
# in PRODUCT_LOCALES, add them to PRODUCT_LOCALES.
|
||||||
extra_locales := $(filter-out $(PRODUCT_LOCALES),$(CUSTOM_LOCALES))
|
extra_locales := $(filter-out $(PRODUCT_LOCALES),$(CUSTOM_LOCALES))
|
||||||
|
@ -288,170 +278,55 @@ ifneq (,$(extra_locales))
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Add PRODUCT_LOCALES to PRODUCT_AAPT_CONFIG
|
# Add PRODUCT_LOCALES to PRODUCT_AAPT_CONFIG
|
||||||
PRODUCT_AAPT_CONFIG := $(strip $(PRODUCT_LOCALES) $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_AAPT_CONFIG))
|
PRODUCT_AAPT_CONFIG := $(PRODUCT_LOCALES) $(PRODUCT_AAPT_CONFIG)
|
||||||
PRODUCT_AAPT_PREF_CONFIG := $(strip $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_AAPT_PREF_CONFIG))
|
|
||||||
PRODUCT_AAPT_PREBUILT_DPI := $(strip $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_AAPT_PREBUILT_DPI))
|
|
||||||
|
|
||||||
# Keep a copy of the space-separated config
|
# Keep a copy of the space-separated config
|
||||||
PRODUCT_AAPT_CONFIG_SP := $(PRODUCT_AAPT_CONFIG)
|
PRODUCT_AAPT_CONFIG_SP := $(PRODUCT_AAPT_CONFIG)
|
||||||
|
PRODUCT_AAPT_CONFIG := $(subst $(space),$(comma),$(PRODUCT_AAPT_CONFIG))
|
||||||
|
|
||||||
# Convert spaces to commas.
|
|
||||||
PRODUCT_AAPT_CONFIG := \
|
|
||||||
$(subst $(space),$(comma),$(strip $(PRODUCT_AAPT_CONFIG)))
|
|
||||||
|
|
||||||
PRODUCT_SYSTEM_NAME := $(strip $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_SYSTEM_NAME))
|
|
||||||
ifndef PRODUCT_SYSTEM_NAME
|
ifndef PRODUCT_SYSTEM_NAME
|
||||||
PRODUCT_SYSTEM_NAME := $(strip $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_NAME))
|
PRODUCT_SYSTEM_NAME := $(PRODUCT_NAME)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
PRODUCT_SYSTEM_DEVICE := $(strip $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_SYSTEM_DEVICE))
|
|
||||||
ifndef PRODUCT_SYSTEM_DEVICE
|
ifndef PRODUCT_SYSTEM_DEVICE
|
||||||
PRODUCT_SYSTEM_DEVICE := $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_DEVICE)
|
PRODUCT_SYSTEM_DEVICE := $(PRODUCT_DEVICE)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
PRODUCT_BRAND := $(strip $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_BRAND))
|
|
||||||
PRODUCT_SYSTEM_BRAND := $(strip $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_SYSTEM_BRAND))
|
|
||||||
ifndef PRODUCT_SYSTEM_BRAND
|
ifndef PRODUCT_SYSTEM_BRAND
|
||||||
PRODUCT_SYSTEM_BRAND := $(PRODUCT_BRAND)
|
PRODUCT_SYSTEM_BRAND := $(PRODUCT_BRAND)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
PRODUCT_MODEL := $(strip $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_MODEL))
|
|
||||||
ifndef PRODUCT_MODEL
|
ifndef PRODUCT_MODEL
|
||||||
PRODUCT_MODEL := $(strip $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_NAME))
|
PRODUCT_MODEL := $(PRODUCT_NAME)
|
||||||
endif
|
endif
|
||||||
PRODUCT_SYSTEM_MODEL := $(strip $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_SYSTEM_MODEL))
|
|
||||||
ifndef PRODUCT_SYSTEM_MODEL
|
ifndef PRODUCT_SYSTEM_MODEL
|
||||||
PRODUCT_SYSTEM_MODEL := $(PRODUCT_MODEL)
|
PRODUCT_SYSTEM_MODEL := $(PRODUCT_MODEL)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
PRODUCT_MANUFACTURER := $(strip $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_MANUFACTURER))
|
|
||||||
ifndef PRODUCT_MANUFACTURER
|
ifndef PRODUCT_MANUFACTURER
|
||||||
PRODUCT_MANUFACTURER := unknown
|
PRODUCT_MANUFACTURER := unknown
|
||||||
endif
|
endif
|
||||||
PRODUCT_SYSTEM_MANUFACTURER := $(strip $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_SYSTEM_MANUFACTURER))
|
|
||||||
ifndef PRODUCT_SYSTEM_MANUFACTURER
|
ifndef PRODUCT_SYSTEM_MANUFACTURER
|
||||||
PRODUCT_SYSTEM_MANUFACTURER := $(PRODUCT_MANUFACTURER)
|
PRODUCT_SYSTEM_MANUFACTURER := $(PRODUCT_MANUFACTURER)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_CHARACTERISTICS),)
|
ifndef PRODUCT_CHARACTERISTICS
|
||||||
TARGET_AAPT_CHARACTERISTICS := default
|
TARGET_AAPT_CHARACTERISTICS := default
|
||||||
else
|
else
|
||||||
TARGET_AAPT_CHARACTERISTICS := $(strip $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_CHARACTERISTICS))
|
TARGET_AAPT_CHARACTERISTICS := $(PRODUCT_CHARACTERISTICS)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
PRODUCT_DEFAULT_WIFI_CHANNELS := \
|
|
||||||
$(strip $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_DEFAULT_WIFI_CHANNELS))
|
|
||||||
|
|
||||||
PRODUCT_DEFAULT_DEV_CERTIFICATE := \
|
|
||||||
$(strip $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_DEFAULT_DEV_CERTIFICATE))
|
|
||||||
ifdef PRODUCT_DEFAULT_DEV_CERTIFICATE
|
ifdef PRODUCT_DEFAULT_DEV_CERTIFICATE
|
||||||
ifneq (1,$(words $(PRODUCT_DEFAULT_DEV_CERTIFICATE)))
|
ifneq (1,$(words $(PRODUCT_DEFAULT_DEV_CERTIFICATE)))
|
||||||
$(error PRODUCT_DEFAULT_DEV_CERTIFICATE='$(PRODUCT_DEFAULT_DEV_CERTIFICATE)', \
|
$(error PRODUCT_DEFAULT_DEV_CERTIFICATE='$(PRODUCT_DEFAULT_DEV_CERTIFICATE)', \
|
||||||
only 1 certificate is allowed.)
|
only 1 certificate is allowed.)
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# A list of words like <source path>:<destination path>[:<owner>].
|
ENFORCE_SYSTEM_CERTIFICATE := $(PRODUCT_ENFORCE_ARTIFACT_SYSTEM_CERTIFICATE_REQUIREMENT)
|
||||||
# The file at the source path should be copied to the destination path
|
ENFORCE_SYSTEM_CERTIFICATE_WHITELIST := $(PRODUCT_ARTIFACT_SYSTEM_CERTIFICATE_REQUIREMENT_WHITELIST)
|
||||||
# when building this product. <destination path> is relative to
|
|
||||||
# $(PRODUCT_OUT), so it should look like, e.g., "system/etc/file.xml".
|
|
||||||
# The rules for these copy steps are defined in build/make/core/Makefile.
|
|
||||||
# The optional :<owner> is used to indicate the owner of a vendor file.
|
|
||||||
PRODUCT_COPY_FILES := \
|
|
||||||
$(strip $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_COPY_FILES))
|
|
||||||
|
|
||||||
# A list of property assignments, like "key = value", with zero or more
|
PRODUCT_OTA_PUBLIC_KEYS := $(sort $(PRODUCT_OTA_PUBLIC_KEYS))
|
||||||
# whitespace characters on either side of the '='.
|
PRODUCT_EXTRA_RECOVERY_KEYS := $(sort $(PRODUCT_EXTRA_RECOVERY_KEYS))
|
||||||
PRODUCT_PROPERTY_OVERRIDES := \
|
|
||||||
$(strip $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_PROPERTY_OVERRIDES))
|
|
||||||
.KATI_READONLY := PRODUCT_PROPERTY_OVERRIDES
|
|
||||||
|
|
||||||
PRODUCT_SHIPPING_API_LEVEL := $(strip $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_SHIPPING_API_LEVEL))
|
|
||||||
|
|
||||||
# A list of property assignments, like "key = value", with zero or more
|
|
||||||
# whitespace characters on either side of the '='.
|
|
||||||
# used for adding properties to default.prop
|
|
||||||
PRODUCT_DEFAULT_PROPERTY_OVERRIDES := \
|
|
||||||
$(strip $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_DEFAULT_PROPERTY_OVERRIDES))
|
|
||||||
|
|
||||||
.KATI_READONLY := PRODUCT_DEFAULT_PROPERTY_OVERRIDES
|
|
||||||
|
|
||||||
# A list of property assignments, like "key = value", with zero or more
|
|
||||||
# whitespace characters on either side of the '='.
|
|
||||||
# used for adding properties to default.prop of system partition
|
|
||||||
PRODUCT_SYSTEM_DEFAULT_PROPERTIES := \
|
|
||||||
$(strip $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_SYSTEM_DEFAULT_PROPERTIES))
|
|
||||||
.KATI_READONLY := PRODUCT_SYSTEM_DEFAULT_PROPERTIES
|
|
||||||
|
|
||||||
# A list of property assignments, like "key = value", with zero or more
|
|
||||||
# whitespace characters on either side of the '='.
|
|
||||||
# used for adding properties to build.prop of product partition
|
|
||||||
PRODUCT_PRODUCT_PROPERTIES := \
|
|
||||||
$(strip $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_PRODUCT_PROPERTIES))
|
|
||||||
.KATI_READONLY := PRODUCT_PRODUCT_PROPERTIES
|
|
||||||
|
|
||||||
ENFORCE_SYSTEM_CERTIFICATE := \
|
|
||||||
$(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_ENFORCE_ARTIFACT_SYSTEM_CERTIFICATE_REQUIREMENT)
|
|
||||||
|
|
||||||
ENFORCE_SYSTEM_CERTIFICATE_WHITELIST := \
|
|
||||||
$(strip $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_ARTIFACT_SYSTEM_CERTIFICATE_REQUIREMENT_WHITELIST))
|
|
||||||
|
|
||||||
# A list of property assignments, like "key = value", with zero or more
|
|
||||||
# whitespace characters on either side of the '='.
|
|
||||||
# used for adding properties to build.prop of product partition
|
|
||||||
PRODUCT_PRODUCT_SERVICES_PROPERTIES := \
|
|
||||||
$(strip $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_PRODUCT_SERVICES_PROPERTIES))
|
|
||||||
.KATI_READONLY := PRODUCT_PRODUCT_SERVICES_PROPERTIES
|
|
||||||
|
|
||||||
# Should we use the default resources or add any product specific overlays
|
|
||||||
PRODUCT_PACKAGE_OVERLAYS := \
|
|
||||||
$(strip $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_PACKAGE_OVERLAYS))
|
|
||||||
DEVICE_PACKAGE_OVERLAYS := \
|
|
||||||
$(strip $(PRODUCTS.$(INTERNAL_PRODUCT).DEVICE_PACKAGE_OVERLAYS))
|
|
||||||
|
|
||||||
# The list of product-specific kernel header dirs
|
|
||||||
PRODUCT_VENDOR_KERNEL_HEADERS := \
|
|
||||||
$(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_VENDOR_KERNEL_HEADERS)
|
|
||||||
|
|
||||||
# The OTA key(s) specified by the product config, if any. The names
|
|
||||||
# of these keys are stored in the target-files zip so that post-build
|
|
||||||
# signing tools can substitute them for the test key embedded by
|
|
||||||
# default.
|
|
||||||
PRODUCT_OTA_PUBLIC_KEYS := $(sort \
|
|
||||||
$(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_OTA_PUBLIC_KEYS))
|
|
||||||
|
|
||||||
PRODUCT_EXTRA_RECOVERY_KEYS := $(sort \
|
|
||||||
$(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_EXTRA_RECOVERY_KEYS))
|
|
||||||
|
|
||||||
PRODUCT_DEX_PREOPT_DEFAULT_COMPILER_FILTER := \
|
|
||||||
$(strip $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_DEX_PREOPT_DEFAULT_COMPILER_FILTER))
|
|
||||||
PRODUCT_DEX_PREOPT_DEFAULT_FLAGS := \
|
|
||||||
$(strip $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_DEX_PREOPT_DEFAULT_FLAGS))
|
|
||||||
PRODUCT_DEX_PREOPT_GENERATE_DM_FILES := \
|
|
||||||
$(strip $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_DEX_PREOPT_GENERATE_DM_FILES))
|
|
||||||
PRODUCT_DEX_PREOPT_BOOT_FLAGS := \
|
|
||||||
$(strip $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_DEX_PREOPT_BOOT_FLAGS))
|
|
||||||
PRODUCT_DEX_PREOPT_PROFILE_DIR := \
|
|
||||||
$(strip $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_DEX_PREOPT_PROFILE_DIR))
|
|
||||||
PRODUCT_DEX_PREOPT_NEVER_ALLOW_STRIPPING := \
|
|
||||||
$(strip $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_DEX_PREOPT_NEVER_ALLOW_STRIPPING))
|
|
||||||
|
|
||||||
# Boot image options.
|
|
||||||
PRODUCT_USE_PROFILE_FOR_BOOT_IMAGE := \
|
|
||||||
$(strip $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_USE_PROFILE_FOR_BOOT_IMAGE))
|
|
||||||
PRODUCT_DEX_PREOPT_BOOT_IMAGE_PROFILE_LOCATION := \
|
|
||||||
$(strip $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_DEX_PREOPT_BOOT_IMAGE_PROFILE_LOCATION))
|
|
||||||
|
|
||||||
PRODUCT_SYSTEM_SERVER_COMPILER_FILTER := \
|
|
||||||
$(strip $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_SYSTEM_SERVER_COMPILER_FILTER))
|
|
||||||
PRODUCT_SYSTEM_SERVER_DEBUG_INFO := \
|
|
||||||
$(strip $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_SYSTEM_SERVER_DEBUG_INFO))
|
|
||||||
PRODUCT_OTHER_JAVA_DEBUG_INFO := \
|
|
||||||
$(strip $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_OTHER_JAVA_DEBUG_INFO))
|
|
||||||
|
|
||||||
# Resolve and setup per-module dex-preopt configs.
|
# Resolve and setup per-module dex-preopt configs.
|
||||||
PRODUCT_DEX_PREOPT_MODULE_CONFIGS := \
|
|
||||||
$(strip $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_DEX_PREOPT_MODULE_CONFIGS))
|
|
||||||
DEXPREOPT_DISABLED_MODULES :=
|
DEXPREOPT_DISABLED_MODULES :=
|
||||||
# If a module has multiple setups, the first takes precedence.
|
# If a module has multiple setups, the first takes precedence.
|
||||||
_pdpmc_modules :=
|
_pdpmc_modules :=
|
||||||
|
@ -466,9 +341,8 @@ $(foreach c,$(PRODUCT_DEX_PREOPT_MODULE_CONFIGS),\
|
||||||
$(eval DEXPREOPT.$(TARGET_PRODUCT).$(m).CONFIG := $(cf)))))
|
$(eval DEXPREOPT.$(TARGET_PRODUCT).$(m).CONFIG := $(cf)))))
|
||||||
_pdpmc_modules :=
|
_pdpmc_modules :=
|
||||||
|
|
||||||
|
|
||||||
# Resolve and setup per-module sanitizer configs.
|
# Resolve and setup per-module sanitizer configs.
|
||||||
PRODUCT_SANITIZER_MODULE_CONFIGS := \
|
|
||||||
$(strip $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_SANITIZER_MODULE_CONFIGS))
|
|
||||||
# If a module has multiple setups, the first takes precedence.
|
# If a module has multiple setups, the first takes precedence.
|
||||||
_psmc_modules :=
|
_psmc_modules :=
|
||||||
$(foreach c,$(PRODUCT_SANITIZER_MODULE_CONFIGS),\
|
$(foreach c,$(PRODUCT_SANITIZER_MODULE_CONFIGS),\
|
||||||
|
@ -480,123 +354,29 @@ $(foreach c,$(PRODUCT_SANITIZER_MODULE_CONFIGS),\
|
||||||
$(eval SANITIZER.$(TARGET_PRODUCT).$(m).CONFIG := $(cf))))
|
$(eval SANITIZER.$(TARGET_PRODUCT).$(m).CONFIG := $(cf))))
|
||||||
_psmc_modules :=
|
_psmc_modules :=
|
||||||
|
|
||||||
# Whether the product wants to ship libartd. For rules and meaning, see art/Android.mk.
|
# Reset ADB keys for non-debuggable builds
|
||||||
PRODUCT_ART_TARGET_INCLUDE_DEBUG_BUILD := \
|
ifeq (,$(filter eng userdebug,$(TARGET_BUILD_VARIANT)),)
|
||||||
$(strip $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_ART_TARGET_INCLUDE_DEBUG_BUILD))
|
PRODUCT_ADB_KEYS :=
|
||||||
|
|
||||||
# Make this art variable visible to soong_config.mk.
|
|
||||||
PRODUCT_ART_USE_READ_BARRIER := \
|
|
||||||
$(strip $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_ART_USE_READ_BARRIER))
|
|
||||||
|
|
||||||
# Whether the product is an Android Things variant.
|
|
||||||
PRODUCT_IOT := \
|
|
||||||
$(strip $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_IOT))
|
|
||||||
|
|
||||||
# Resource overlay list which must be excluded from enforcing RRO.
|
|
||||||
PRODUCT_ENFORCE_RRO_EXCLUDED_OVERLAYS := \
|
|
||||||
$(strip $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_ENFORCE_RRO_EXCLUDED_OVERLAYS))
|
|
||||||
|
|
||||||
# Package list to apply enforcing RRO.
|
|
||||||
PRODUCT_ENFORCE_RRO_TARGETS := \
|
|
||||||
$(strip $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_ENFORCE_RRO_TARGETS))
|
|
||||||
|
|
||||||
# Whether the product would like to check prebuilt ELF files.
|
|
||||||
PRODUCT_CHECK_ELF_FILES := \
|
|
||||||
$(strip $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_CHECK_ELF_FILES))
|
|
||||||
.KATI_READONLY := PRODUCT_CHECK_ELF_FILES
|
|
||||||
|
|
||||||
# Add reserved headroom to a system image.
|
|
||||||
PRODUCT_SYSTEM_HEADROOM := \
|
|
||||||
$(strip $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_SYSTEM_HEADROOM))
|
|
||||||
|
|
||||||
# Whether to save disk space by minimizing java debug info
|
|
||||||
PRODUCT_MINIMIZE_JAVA_DEBUG_INFO := \
|
|
||||||
$(strip $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_MINIMIZE_JAVA_DEBUG_INFO))
|
|
||||||
|
|
||||||
# Whether any paths are excluded from sanitization when SANITIZE_TARGET=integer_overflow
|
|
||||||
PRODUCT_INTEGER_OVERFLOW_EXCLUDE_PATHS := \
|
|
||||||
$(strip $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_INTEGER_OVERFLOW_EXCLUDE_PATHS))
|
|
||||||
|
|
||||||
# ADB keys for debuggable builds
|
|
||||||
PRODUCT_ADB_KEYS :=
|
|
||||||
ifneq ($(filter eng userdebug,$(TARGET_BUILD_VARIANT)),)
|
|
||||||
PRODUCT_ADB_KEYS := $(strip $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_ADB_KEYS))
|
|
||||||
endif
|
endif
|
||||||
ifneq ($(filter-out 0 1,$(words $(PRODUCT_ADB_KEYS))),)
|
ifneq ($(filter-out 0 1,$(words $(PRODUCT_ADB_KEYS))),)
|
||||||
$(error Only one file may be in PRODUCT_ADB_KEYS: $(PRODUCT_ADB_KEYS))
|
$(error Only one file may be in PRODUCT_ADB_KEYS: $(PRODUCT_ADB_KEYS))
|
||||||
endif
|
endif
|
||||||
.KATI_READONLY := PRODUCT_ADB_KEYS
|
|
||||||
|
|
||||||
# Whether any paths are excluded from sanitization when SANITIZE_TARGET=cfi
|
ifndef PRODUCT_USE_DYNAMIC_PARTITIONS
|
||||||
PRODUCT_CFI_EXCLUDE_PATHS := \
|
PRODUCT_USE_DYNAMIC_PARTITIONS := $(PRODUCT_RETROFIT_DYNAMIC_PARTITIONS)
|
||||||
$(strip $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_CFI_EXCLUDE_PATHS))
|
endif
|
||||||
|
|
||||||
# Whether any paths should have CFI enabled for components
|
|
||||||
PRODUCT_CFI_INCLUDE_PATHS := \
|
|
||||||
$(strip $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_CFI_INCLUDE_PATHS))
|
|
||||||
|
|
||||||
# Whether the Scudo hardened allocator is disabled platform-wide
|
|
||||||
PRODUCT_DISABLE_SCUDO := \
|
|
||||||
$(strip $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_DISABLE_SCUDO))
|
|
||||||
|
|
||||||
# Whether any paths are excluded from being set XOM when ENABLE_XOM=true
|
|
||||||
PRODUCT_XOM_EXCLUDE_PATHS := \
|
|
||||||
$(strip $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_XOM_EXCLUDE_PATHS))
|
|
||||||
|
|
||||||
# which Soong namespaces to export to Make
|
|
||||||
PRODUCT_SOONG_NAMESPACES := \
|
|
||||||
$(strip $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_SOONG_NAMESPACES))
|
|
||||||
|
|
||||||
# A flag to override PRODUCT_COMPATIBLE_PROPERTY
|
|
||||||
PRODUCT_COMPATIBLE_PROPERTY_OVERRIDE := \
|
|
||||||
$(strip $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_COMPATIBLE_PROPERTY_OVERRIDE))
|
|
||||||
|
|
||||||
# Whether the whitelist of actionable compatible properties should be disabled or not
|
|
||||||
PRODUCT_ACTIONABLE_COMPATIBLE_PROPERTY_DISABLE := \
|
|
||||||
$(strip $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_ACTIONABLE_COMPATIBLE_PROPERTY_DISABLE))
|
|
||||||
|
|
||||||
# Dynamic partition feature flags.
|
|
||||||
|
|
||||||
# When this is true, dynamic partitions is retrofitted on a device that has
|
|
||||||
# already been launched without dynamic partitions. Otherwise, the device
|
|
||||||
# is launched with dynamic partitions.
|
|
||||||
# This flag implies PRODUCT_USE_DYNAMIC_PARTITIONS.
|
|
||||||
PRODUCT_RETROFIT_DYNAMIC_PARTITIONS := \
|
|
||||||
$(strip $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_RETROFIT_DYNAMIC_PARTITIONS))
|
|
||||||
.KATI_READONLY := PRODUCT_RETROFIT_DYNAMIC_PARTITIONS
|
|
||||||
|
|
||||||
PRODUCT_USE_DYNAMIC_PARTITIONS := $(or \
|
|
||||||
$(strip $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_USE_DYNAMIC_PARTITIONS)), \
|
|
||||||
$(PRODUCT_RETROFIT_DYNAMIC_PARTITIONS))
|
|
||||||
.KATI_READONLY := PRODUCT_USE_DYNAMIC_PARTITIONS
|
|
||||||
|
|
||||||
# All requirements of PRODUCT_USE_DYNAMIC_PARTITIONS falls back to
|
# All requirements of PRODUCT_USE_DYNAMIC_PARTITIONS falls back to
|
||||||
# PRODUCT_USE_DYNAMIC_PARTITIONS if not defined.
|
# PRODUCT_USE_DYNAMIC_PARTITIONS if not defined.
|
||||||
PRODUCT_USE_DYNAMIC_PARTITION_SIZE := $(or \
|
ifndef PRODUCT_USE_DYNAMIC_PARTITION_SIZE
|
||||||
$(strip $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_USE_DYNAMIC_PARTITION_SIZE)),\
|
PRODUCT_USE_DYNAMIC_PARTITION_SIZE := $(PRODUCT_USE_DYNAMIC_PARTITIONS)
|
||||||
$(PRODUCT_USE_DYNAMIC_PARTITIONS))
|
endif
|
||||||
.KATI_READONLY := PRODUCT_USE_DYNAMIC_PARTITION_SIZE
|
|
||||||
PRODUCT_BUILD_SUPER_PARTITION := $(or \
|
|
||||||
$(strip $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_BUILD_SUPER_PARTITION)),\
|
|
||||||
$(PRODUCT_USE_DYNAMIC_PARTITIONS))
|
|
||||||
.KATI_READONLY := PRODUCT_BUILD_SUPER_PARTITION
|
|
||||||
|
|
||||||
# List of modules that should be forcefully unmarked from being LOCAL_PRODUCT_MODULE, and hence
|
ifndef PRODUCT_BUILD_SUPER_PARTITION
|
||||||
# installed on /system directory by default.
|
PRODUCT_BUILD_SUPER_PARTITION := $(PRODUCT_USE_DYNAMIC_PARTITIONS)
|
||||||
PRODUCT_FORCE_PRODUCT_MODULES_TO_SYSTEM_PARTITION := \
|
endif
|
||||||
$(strip $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_FORCE_PRODUCT_MODULES_TO_SYSTEM_PARTITION))
|
|
||||||
.KATI_READONLY := PRODUCT_FORCE_PRODUCT_MODULES_TO_SYSTEM_PARTITION
|
|
||||||
|
|
||||||
# If set, kernel configuration requirements are present in OTA package (and will be enforced
|
|
||||||
# during OTA). Otherwise, kernel configuration requirements are enforced in VTS.
|
|
||||||
# Devices that checks the running kernel (instead of the kernel in OTA package) should not
|
|
||||||
# set this variable to prevent OTA failures.
|
|
||||||
PRODUCT_OTA_ENFORCE_VINTF_KERNEL_REQUIREMENTS := \
|
|
||||||
$(strip $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_OTA_ENFORCE_VINTF_KERNEL_REQUIREMENTS))
|
|
||||||
|
|
||||||
define product-overrides-config
|
define product-overrides-config
|
||||||
PRODUCT_$(1)_OVERRIDES := $$(strip $$(PRODUCTS.$$(INTERNAL_PRODUCT).PRODUCT_$(1)_OVERRIDES))
|
|
||||||
.KATI_READONLY := PRODUCT_$(1)_OVERRIDES
|
|
||||||
$$(foreach rule,$$(PRODUCT_$(1)_OVERRIDES),\
|
$$(foreach rule,$$(PRODUCT_$(1)_OVERRIDES),\
|
||||||
$$(if $$(filter 2,$$(words $$(subst :,$$(space),$$(rule)))),,\
|
$$(if $$(filter 2,$$(words $$(subst :,$$(space),$$(rule)))),,\
|
||||||
$$(error Rule "$$(rule)" in PRODUCT_$(1)_OVERRIDE is not <module_name>:<new_value>)))
|
$$(error Rule "$$(rule)" in PRODUCT_$(1)_OVERRIDE is not <module_name>:<new_value>)))
|
||||||
|
@ -610,8 +390,7 @@ $(foreach var, \
|
||||||
|
|
||||||
# Macro to use below. $(1) is the name of the partition
|
# Macro to use below. $(1) is the name of the partition
|
||||||
define product-build-image-config
|
define product-build-image-config
|
||||||
PRODUCT_BUILD_$(1)_IMAGE := $$(firstword $$(strip $$(PRODUCTS.$$(INTERNAL_PRODUCT).PRODUCT_BUILD_$(1)_IMAGE)))
|
PRODUCT_BUILD_$(1)_IMAGE := $$(firstword $$(PRODUCT_BUILD_$(1)_IMAGE))
|
||||||
.KATI_READONLY := PRODUCT_BUILD_$(1)_IMAGE
|
|
||||||
ifneq ($$(filter-out true false,$$(PRODUCT_BUILD_$(1)_IMAGE)),)
|
ifneq ($$(filter-out true false,$$(PRODUCT_BUILD_$(1)_IMAGE)),)
|
||||||
$$(error Invalid PRODUCT_BUILD_$(1)_IMAGE: $$(PRODUCT_BUILD_$(1)_IMAGE) -- true false and empty are supported)
|
$$(error Invalid PRODUCT_BUILD_$(1)_IMAGE: $$(PRODUCT_BUILD_$(1)_IMAGE) -- true false and empty are supported)
|
||||||
endif
|
endif
|
||||||
|
@ -631,3 +410,5 @@ $(foreach image, \
|
||||||
$(eval $(call product-build-image-config,$(image))))
|
$(eval $(call product-build-image-config,$(image))))
|
||||||
|
|
||||||
product-build-image-config :=
|
product-build-image-config :=
|
||||||
|
|
||||||
|
$(call readonly-product-vars)
|
||||||
|
|
Loading…
Reference in a new issue