Merge "Organize product vars for adding properties"

This commit is contained in:
Jiyong Park 2020-06-15 10:00:22 +00:00 committed by Gerrit Code Review
commit cd0c931b89
32 changed files with 72 additions and 69 deletions

View File

@ -54,10 +54,13 @@ PRELOADED_CLASSES := $(call word-colon,1,$(firstword \
DIRTY_IMAGE_OBJECTS := $(call word-colon,1,$(firstword \
$(filter %system/etc/dirty-image-objects,$(PRODUCT_COPY_FILES))))
# Get value of a property. It is first searched from PRODUCT_VENDOR_PROPERTIES
# and then falls back to PRODUCT_SYSTEM_PROPERTIES
# $1: name of the property
define get-product-default-property
$(strip \
$(eval _prop := $(patsubst $(1)=%,%,$(filter $(1)=%,$(PRODUCT_DEFAULT_PROPERTY_OVERRIDES))))\
$(if $(_prop),$(_prop),$(patsubst $(1)=%,%,$(filter $(1)=%,$(PRODUCT_SYSTEM_DEFAULT_PROPERTIES)))))
$(eval _prop := $(patsubst $(1)=%,%,$(filter $(1)=%,$(PRODUCT_VENDOR_PROPERTIES))))\
$(if $(_prop),$(_prop),$(patsubst $(1)=%,%,$(filter $(1)=%,$(PRODUCT_SYSTEM_PROPERTIES)))))
endef
DEX2OAT_IMAGE_XMS := $(call get-product-default-property,dalvik.vm.image-dex2oat-Xms)

View File

@ -242,8 +242,6 @@ else
ADDITIONAL_VENDOR_PROPERTIES := ro.vndk.version=$(PLATFORM_VNDK_VERSION)
ADDITIONAL_VENDOR_PROPERTIES += ro.vndk.lite=true
endif
ADDITIONAL_VENDOR_PROPERTIES += \
$(call collapse-pairs, $(PRODUCT_DEFAULT_PROPERTY_OVERRIDES))
# Add cpu properties for bionic and ART.
ADDITIONAL_VENDOR_PROPERTIES += ro.bionic.arch=$(TARGET_ARCH)

View File

@ -145,25 +145,27 @@ _product_single_value_vars += \
PRODUCT_SYSTEM_BRAND \
PRODUCT_SYSTEM_MANUFACTURER \
# A list of property assignments, like "key = value", with zero or more
# whitespace characters on either side of the '='.
_product_list_vars += PRODUCT_PROPERTY_OVERRIDES
# PRODUCT_<PARTITION>_PROPERTIES are lists of property assignments
# that go to <partition>/build.prop. Each property assignment is
# "key = value" with zero or more whitespace characters on either
# side of the '='.
_product_list_vars += \
PRODUCT_SYSTEM_PROPERTIES \
PRODUCT_SYSTEM_EXT_PROPERTIES \
PRODUCT_VENDOR_PROPERTIES \
PRODUCT_ODM_PROPERTIES \
PRODUCT_PRODUCT_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
# TODO(b/117892318) deprecate these:
# ... in favor or PRODUCT_SYSTEM_PROPERTIES
_product_list_vars += PRODUCT_SYSTEM_DEFAULT_PROPERTIES
# ... in favor of PRODUCT_VENDOR_PROPERTIES
_product_list_vars += PRODUCT_PROPERTY_OVERRIDES
_product_list_vars += 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 build.prop of product partition
_product_list_vars += PRODUCT_PRODUCT_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 system_ext and odm partitions
_product_list_vars += PRODUCT_SYSTEM_EXT_PROPERTIES
_product_list_vars += PRODUCT_ODM_PROPERTIES
# TODO(b/117892318) consider deprecating these too
_product_list_vars += PRODUCT_SYSTEM_PROPERTY_BLACKLIST
_product_list_vars += PRODUCT_VENDOR_PROPERTY_BLACKLIST
# The characteristics of the product, which among other things is passed to aapt
_product_single_value_vars += PRODUCT_CHARACTERISTICS
@ -226,15 +228,6 @@ _product_list_vars += PRODUCT_SUPPORTS_BOOT_SIGNER
_product_list_vars += PRODUCT_SUPPORTS_VBOOT
_product_list_vars += PRODUCT_SUPPORTS_VERITY
_product_list_vars += PRODUCT_SUPPORTS_VERITY_FEC
_product_list_vars += 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_list_vars += PRODUCT_SYSTEM_DEFAULT_PROPERTIES
_product_list_vars += PRODUCT_SYSTEM_PROPERTY_BLACKLIST
_product_list_vars += PRODUCT_VENDOR_PROPERTY_BLACKLIST
_product_list_vars += PRODUCT_SYSTEM_SERVER_APPS
_product_list_vars += PRODUCT_SYSTEM_SERVER_JARS
# List of system_server jars delivered via apex. Format = <apex name>:<jar name>.

View File

@ -280,6 +280,10 @@ _prop_files_ := \
# TODO(b/117892318): don't allow duplicates so that the ordering doesn't matter
_prop_vars_ := \
ADDITIONAL_SYSTEM_PROPERTIES \
PRODUCT_SYSTEM_PROPERTIES
# TODO(b/117892318): deprecate this
_prop_vars_ += \
PRODUCT_SYSTEM_DEFAULT_PROPERTIES
ifndef property_overrides_split_enabled
@ -316,6 +320,11 @@ ifdef property_overrides_split_enabled
# TODO(b/117892318): don't allow duplicates so that the ordering doesn't matter
_prop_vars_ := \
ADDITIONAL_VENDOR_PROPERTIES \
PRODUCT_VENDOR_PROPERTIES
# TODO(b/117892318): deprecate this
_prop_vars_ += \
PRODUCT_DEFAULT_PROPERTY_OVERRIDES \
PRODUCT_PROPERTY_OVERRIDES
else
_prop_vars_ :=

View File

@ -58,7 +58,7 @@ endif
BOARD_CACHEIMAGE_FILE_SYSTEM_TYPE := ext4
BOARD_CACHEIMAGE_PARTITION_SIZE := 16777216
# Setup a vendor image to let PRODUCT_PROPERTY_OVERRIDES does not affect GSI
# Setup a vendor image to let PRODUCT_VENDOR_PROPERTIES does not affect GSI
BOARD_VENDORIMAGE_FILE_SYSTEM_TYPE := ext4
# Disable 64 bit mediadrmserver

View File

@ -18,7 +18,7 @@ PRODUCT_SOONG_NAMESPACES += device/generic/goldfish # for libwifi-hal-emu
PRODUCT_SOONG_NAMESPACES += device/generic/goldfish-opengl # for goldfish deps.
ifdef NET_ETH0_STARTONBOOT
PRODUCT_PROPERTY_OVERRIDES += net.eth0.startonboot=1
PRODUCT_VENDOR_PROPERTIES += net.eth0.startonboot=1
endif
# Ensure we package the BIOS files too.

View File

@ -18,7 +18,7 @@ PRODUCT_SOONG_NAMESPACES += device/generic/goldfish # for libwifi-hal-emu
PRODUCT_SOONG_NAMESPACES += device/generic/goldfish-opengl # for goldfish deps.
ifdef NET_ETH0_STARTONBOOT
PRODUCT_PROPERTY_OVERRIDES += net.eth0.startonboot=1
PRODUCT_VENDOR_PROPERTIES += net.eth0.startonboot=1
endif
# Ensure we package the BIOS files too.

View File

@ -18,7 +18,7 @@ PRODUCT_SOONG_NAMESPACES += device/generic/goldfish # for libwifi-hal-emu
PRODUCT_SOONG_NAMESPACES += device/generic/goldfish-opengl # for goldfish deps.
ifdef NET_ETH0_STARTONBOOT
PRODUCT_PROPERTY_OVERRIDES += net.eth0.startonboot=1
PRODUCT_VENDOR_PROPERTIES += net.eth0.startonboot=1
endif
# Ensure we package the BIOS files too.

View File

@ -18,7 +18,7 @@ PRODUCT_SOONG_NAMESPACES += device/generic/goldfish # for libwifi-hal-emu
PRODUCT_SOONG_NAMESPACES += device/generic/goldfish-opengl # for goldfish deps.
ifdef NET_ETH0_STARTONBOOT
PRODUCT_PROPERTY_OVERRIDES += net.eth0.startonboot=1
PRODUCT_VENDOR_PROPERTIES += net.eth0.startonboot=1
endif
# Ensure we package the BIOS files too.

View File

@ -14,7 +14,7 @@
# limitations under the License.
#
# PRODUCT_PROPERTY_OVERRIDES cannot be used here because sysprops will be at
# PRODUCT_VENDOR_PROPERTIES cannot be used here because sysprops will be at
# /vendor/[build|default].prop when build split is on. In order to have sysprops
# on the generic system image, place them in build/make/target/board/
# gsi_system.prop.

View File

@ -14,7 +14,7 @@
# limitations under the License.
#
# PRODUCT_PROPERTY_OVERRIDES cannot be used here because sysprops will be at
# PRODUCT_VENDOR_PROPERTIES cannot be used here because sysprops will be at
# /vendor/[build|default].prop when build split is on. In order to have sysprops
# on the generic system image, place them in build/make/target/board/
# gsi_system.prop.

View File

@ -14,7 +14,7 @@
# limitations under the License.
#
# PRODUCT_PROPERTY_OVERRIDES cannot be used here because sysprops will be at
# PRODUCT_VENDOR_PROPERTIES cannot be used here because sysprops will be at
# /vendor/[build|default].prop when build split is on. In order to have sysprops
# on the generic system image, place them in build/make/target/board/
# gsi_system.prop.

View File

@ -14,7 +14,7 @@
# limitations under the License.
#
# PRODUCT_PROPERTY_OVERRIDES cannot be used here because sysprops will be at
# PRODUCT_VENDOR_PROPERTIES cannot be used here because sysprops will be at
# /vendor/[build|default].prop when build split is on. In order to have sysprops
# on the generic system image, place them in build/make/target/board/
# gsi_system.prop.

View File

@ -348,9 +348,9 @@ PRODUCT_BOOT_JARS += android.test.base
endif
PRODUCT_COPY_FILES += system/core/rootdir/init.zygote32.rc:system/etc/init/hw/init.zygote32.rc
PRODUCT_DEFAULT_PROPERTY_OVERRIDES += ro.zygote=zygote32
PRODUCT_SYSTEM_PROPERTIES += ro.zygote=zygote32
PRODUCT_SYSTEM_DEFAULT_PROPERTIES += debug.atrace.tags.enableflags=0
PRODUCT_SYSTEM_PROPERTIES += debug.atrace.tags.enableflags=0
# Packages included only for eng or userdebug builds, previously debug tagged
PRODUCT_PACKAGES_DEBUG := \

View File

@ -27,7 +27,7 @@ PRODUCT_COPY_FILES += system/core/rootdir/init.zygote64_32.rc:system/etc/init/hw
# Set the zygote property to select the 64-bit primary, 32-bit secondary script
# This line must be parsed before the one in core_minimal.mk
PRODUCT_DEFAULT_PROPERTY_OVERRIDES += ro.zygote=zygote64_32
PRODUCT_SYSTEM_PROPERTIES += ro.zygote=zygote64_32
TARGET_SUPPORTS_32_BIT_APPS := true
TARGET_SUPPORTS_64_BIT_APPS := true

View File

@ -24,7 +24,7 @@ PRODUCT_COPY_FILES += system/core/rootdir/init.zygote64.rc:system/etc/init/hw/in
# Set the zygote property to select the 64-bit script.
# This line must be parsed before the one in core_minimal.mk
PRODUCT_DEFAULT_PROPERTY_OVERRIDES += ro.zygote=zygote64
PRODUCT_SYSTEM_PROPERTIES += ro.zygote=zygote64
TARGET_SUPPORTS_32_BIT_APPS := false
TARGET_SUPPORTS_64_BIT_APPS := true

View File

@ -15,7 +15,7 @@
#
PRODUCT_QUOTA_PROJID := 1
PRODUCT_PROPERTY_OVERRIDES += external_storage.projid.enabled=1
PRODUCT_VENDOR_PROPERTIES += external_storage.projid.enabled=1
PRODUCT_FS_CASEFOLD := 1
PRODUCT_PROPERTY_OVERRIDES += external_storage.casefold.enabled=1
PRODUCT_VENDOR_PROPERTIES += external_storage.casefold.enabled=1

View File

@ -47,7 +47,7 @@ $(call inherit-product-if-exists, device/generic/goldfish/vendor.mk)
#responding, disble it for now.
#still keep it on internal master as it is still working
#once it is fixed in aosp, remove this block of comment.
#PRODUCT_DEFAULT_PROPERTY_OVERRIDES += \
#PRODUCT_VENDOR_PROPERTIES += \
#config.disable_location=true
# Enable Perfetto traced

View File

@ -39,7 +39,7 @@ $(call inherit-product-if-exists, device/generic/goldfish/vendor.mk)
#responding, disble it for now.
#still keep it on internal master as it is still working
#once it is fixed in aosp, remove this block of comment.
#PRODUCT_DEFAULT_PROPERTY_OVERRIDES += \
#PRODUCT_VENDOR_PROPERTIES += \
#config.disable_location=true
# Enable Perfetto traced

View File

@ -42,7 +42,7 @@ PRODUCT_PACKAGES += \
netutils-wrapper-1.0
# Additional settings used in all AOSP builds
PRODUCT_PROPERTY_OVERRIDES := \
PRODUCT_VENDOR_PROPERTIES := \
ro.config.ringtone=Ring_Synth_04.ogg \
ro.config.notification_sound=pixiedust.ogg

View File

@ -19,7 +19,7 @@
# build quite specifically for the emulator, and might not be
# entirely appropriate to inherit from for on-device configurations.
PRODUCT_PROPERTY_OVERRIDES := \
PRODUCT_VENDOR_PROPERTIES := \
keyguard.no_require_sim=true \
ro.com.android.dataroaming=true

View File

@ -28,7 +28,7 @@ $(call inherit-product, $(SRC_TARGET_DIR)/product/aosp_base_telephony.mk)
$(call inherit-product, $(SRC_TARGET_DIR)/board/generic_x86/device.mk)
ifdef NET_ETH0_STARTONBOOT
PRODUCT_PROPERTY_OVERRIDES += net.eth0.startonboot=1
PRODUCT_VENDOR_PROPERTIES += net.eth0.startonboot=1
endif
# Ensure we package the BIOS files too.

View File

@ -18,7 +18,7 @@
# Set lowram options and enable traced by default
PRODUCT_PROPERTY_OVERRIDES += \
PRODUCT_VENDOR_PROPERTIES += \
ro.config.low_ram=true \
persist.traced.enable=1 \

View File

@ -83,7 +83,7 @@ PRODUCT_SYSTEM_SERVER_APPS += \
PRODUCT_COPY_FILES += \
frameworks/av/media/libeffects/data/audio_effects.conf:system/etc/audio_effects.conf
PRODUCT_PROPERTY_OVERRIDES += \
PRODUCT_VENDOR_PROPERTIES += \
ro.carrier=unknown \
ro.config.notification_sound=OnTheHunt.ogg \
ro.config.alarm_alert=Alarm_Classic.ogg

View File

@ -73,11 +73,11 @@ PRODUCT_COPY_FILES += $(call add-to-product-copy-files-if-exists,\
# On userdebug builds, collect more tombstones by default.
ifneq (,$(filter userdebug eng,$(TARGET_BUILD_VARIANT)))
PRODUCT_SYSTEM_DEFAULT_PROPERTIES += \
PRODUCT_VENDOR_PROPERTIES += \
tombstoned.max_tombstone_count=50
endif
PRODUCT_DEFAULT_PROPERTY_OVERRIDES += \
PRODUCT_VENDOR_PROPERTIES += \
ro.logd.size.stats=64K \
log.tag.stats_log=I

View File

@ -23,7 +23,7 @@ PRODUCT_DEX_PREOPT_BOOT_IMAGE_PROFILE_LOCATION := build/make/target/product/empt
DEX_PREOPT_DEFAULT := nostripping
# Boot image property overrides.
PRODUCT_PROPERTY_OVERRIDES += \
PRODUCT_VENDOR_PROPERTIES += \
dalvik.vm.profilesystemserver=true \
dalvik.vm.profilebootclasspath=true

View File

@ -40,7 +40,7 @@ PRODUCT_PACKAGES += \
PRODUCT_PACKAGES += \
hiddenapi-package-whitelist.xml \
PRODUCT_SYSTEM_DEFAULT_PROPERTIES += \
PRODUCT_SYSTEM_PROPERTIES += \
dalvik.vm.image-dex2oat-Xms=64m \
dalvik.vm.image-dex2oat-Xmx=64m \
dalvik.vm.dex2oat-Xms=64m \
@ -50,17 +50,17 @@ PRODUCT_SYSTEM_DEFAULT_PROPERTIES += \
dalvik.vm.dexopt.secondary=true \
dalvik.vm.appimageformat=lz4
PRODUCT_SYSTEM_DEFAULT_PROPERTIES += \
PRODUCT_SYSTEM_PROPERTIES += \
ro.dalvik.vm.native.bridge=0
# Different dexopt types for different package update/install times.
# On eng builds, make "boot" reasons only extract for faster turnaround.
ifeq (eng,$(TARGET_BUILD_VARIANT))
PRODUCT_SYSTEM_DEFAULT_PROPERTIES += \
PRODUCT_SYSTEM_PROPERTIES += \
pm.dexopt.first-boot=extract \
pm.dexopt.boot=extract
else
PRODUCT_SYSTEM_DEFAULT_PROPERTIES += \
PRODUCT_SYSTEM_PROPERTIES += \
pm.dexopt.first-boot=quicken \
pm.dexopt.boot=verify
endif
@ -68,7 +68,7 @@ endif
# The install filter is speed-profile in order to enable the use of
# profiles from the dex metadata files. Note that if a profile is not provided
# or if it is empty speed-profile is equivalent to (quicken + empty app image).
PRODUCT_SYSTEM_DEFAULT_PROPERTIES += \
PRODUCT_SYSTEM_PROPERTIES += \
pm.dexopt.install=speed-profile \
pm.dexopt.bg-dexopt=speed-profile \
pm.dexopt.ab-ota=speed-profile \
@ -76,24 +76,24 @@ PRODUCT_SYSTEM_DEFAULT_PROPERTIES += \
pm.dexopt.shared=speed
# Pass file with the list of updatable boot class path packages to dex2oat.
PRODUCT_SYSTEM_DEFAULT_PROPERTIES += \
PRODUCT_SYSTEM_PROPERTIES += \
dalvik.vm.dex2oat-updatable-bcp-packages-file=/system/etc/updatable-bcp-packages.txt
# Enable resolution of startup const strings.
PRODUCT_SYSTEM_DEFAULT_PROPERTIES += \
PRODUCT_SYSTEM_PROPERTIES += \
dalvik.vm.dex2oat-resolve-startup-strings=true
# Specify default block size of 512K to enable parallel image decompression.
PRODUCT_SYSTEM_DEFAULT_PROPERTIES += \
PRODUCT_SYSTEM_PROPERTIES += \
dalvik.vm.dex2oat-max-image-block-size=524288
# Enable minidebuginfo generation unless overridden.
PRODUCT_SYSTEM_DEFAULT_PROPERTIES += \
PRODUCT_SYSTEM_PROPERTIES += \
dalvik.vm.minidebuginfo=true \
dalvik.vm.dex2oat-minidebuginfo=true
# Disable iorapd by default
PRODUCT_SYSTEM_DEFAULT_PROPERTIES += \
PRODUCT_SYSTEM_PROPERTIES += \
ro.iorapd.enable=false
PRODUCT_USES_DEFAULT_ART_CONFIG := true

View File

@ -18,6 +18,6 @@
ifneq ($(OVERRIDE_TARGET_FLATTEN_APEX),true)
PRODUCT_PACKAGES += com.android.apex.cts.shim.v1_prebuilt
PRODUCT_PROPERTY_OVERRIDES := ro.apex.updatable=true
PRODUCT_VENDOR_PROPERTIES := ro.apex.updatable=true
TARGET_FLATTEN_APEX := false
endif

View File

@ -16,4 +16,4 @@
# Inherit this when the target supports userspace reboot
PRODUCT_PROPERTY_OVERRIDES := init.userspace_reboot.is_supported=true
PRODUCT_VENDOR_PROPERTIES := init.userspace_reboot.is_supported=true

View File

@ -16,6 +16,6 @@
PRODUCT_VIRTUAL_AB_OTA := true
PRODUCT_PROPERTY_OVERRIDES += ro.virtual_ab.enabled=true
PRODUCT_VENDOR_PROPERTIES += ro.virtual_ab.enabled=true
PRODUCT_PACKAGES += e2fsck_ramdisk

View File

@ -18,4 +18,4 @@ $(call inherit-product, $(SRC_TARGET_DIR)/product/virtual_ab_ota.mk)
PRODUCT_OTA_FORCE_NON_AB_PACKAGE := true
PRODUCT_PROPERTY_OVERRIDES += ro.virtual_ab.allow_non_ab=true
PRODUCT_VENDOR_PROPERTIES += ro.virtual_ab.allow_non_ab=true

View File

@ -18,4 +18,4 @@ $(call inherit-product, $(SRC_TARGET_DIR)/product/virtual_ab_ota.mk)
PRODUCT_VIRTUAL_AB_OTA_RETROFIT := true
PRODUCT_PROPERTY_OVERRIDES += ro.virtual_ab.retrofit=true
PRODUCT_VENDOR_PROPERTIES += ro.virtual_ab.retrofit=true