Build product/odm build.prop with Soong
Bug: 322090587 Test: compare build.prop before and after, boot Change-Id: Iab157cf313d62c1c95ef66dd0a2b9563ee60ab46
This commit is contained in:
parent
65b9ee2040
commit
45a7c8cf92
7 changed files with 19 additions and 108 deletions
|
@ -1268,7 +1268,11 @@ ifeq ($(TARGET_SYSTEM_EXT_PROP),)
|
||||||
TARGET_SYSTEM_EXT_PROP := $(wildcard $(TARGET_DEVICE_DIR)/system_ext.prop)
|
TARGET_SYSTEM_EXT_PROP := $(wildcard $(TARGET_DEVICE_DIR)/system_ext.prop)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
.KATI_READONLY += TARGET_SYSTEM_PROP TARGET_SYSTEM_EXT_PROP
|
ifeq ($(TARGET_PRODUCT_PROP),)
|
||||||
|
TARGET_PRODUCT_PROP := $(wildcard $(TARGET_DEVICE_DIR)/product.prop)
|
||||||
|
endif
|
||||||
|
|
||||||
|
.KATI_READONLY := TARGET_SYSTEM_PROP TARGET_SYSTEM_EXT_PROP TARGET_PRODUCT_PROP
|
||||||
|
|
||||||
include $(BUILD_SYSTEM)/sysprop_config.mk
|
include $(BUILD_SYSTEM)/sysprop_config.mk
|
||||||
|
|
||||||
|
|
|
@ -365,6 +365,7 @@ $(call add_json_list, OemProperties, $(PRODUCT_OEM_PROPERTIES))
|
||||||
|
|
||||||
$(call add_json_list, SystemPropFiles, $(TARGET_SYSTEM_PROP))
|
$(call add_json_list, SystemPropFiles, $(TARGET_SYSTEM_PROP))
|
||||||
$(call add_json_list, SystemExtPropFiles, $(TARGET_SYSTEM_EXT_PROP))
|
$(call add_json_list, SystemExtPropFiles, $(TARGET_SYSTEM_EXT_PROP))
|
||||||
|
$(call add_json_list, ProductPropFiles, $(TARGET_PRODUCT_PROP))
|
||||||
|
|
||||||
# Do not set ArtTargetIncludeDebugBuild into any value if PRODUCT_ART_TARGET_INCLUDE_DEBUG_BUILD is not set,
|
# Do not set ArtTargetIncludeDebugBuild into any value if PRODUCT_ART_TARGET_INCLUDE_DEBUG_BUILD is not set,
|
||||||
# to have the same behavior from runtime_libart.mk.
|
# to have the same behavior from runtime_libart.mk.
|
||||||
|
|
|
@ -90,6 +90,10 @@ $(call add_json_list, BuildVersionTags, $(BUILD_VERSION_TAGS))
|
||||||
|
|
||||||
$(call add_json_bool, ProductNotDebuggableInUserdebug, $(PRODUCT_NOT_DEBUGGABLE_IN_USERDEBUG))
|
$(call add_json_bool, ProductNotDebuggableInUserdebug, $(PRODUCT_NOT_DEBUGGABLE_IN_USERDEBUG))
|
||||||
|
|
||||||
|
$(call add_json_bool, UsesProductImage, $(filter true,$(BOARD_USES_PRODUCTIMAGE)))
|
||||||
|
|
||||||
|
$(call add_json_bool, TargetBoots16K, $(filter true,$(TARGET_BOOTS_16K)))
|
||||||
|
|
||||||
$(call json_end)
|
$(call json_end)
|
||||||
|
|
||||||
$(shell mkdir -p $(dir $(SOONG_EXTRA_VARIABLES)))
|
$(shell mkdir -p $(dir $(SOONG_EXTRA_VARIABLES)))
|
||||||
|
|
|
@ -266,83 +266,18 @@ $(eval $(call declare-1p-target,$(INSTALLED_VENDOR_BUILD_PROP_TARGET)))
|
||||||
# -----------------------------------------------------------------
|
# -----------------------------------------------------------------
|
||||||
# product/etc/build.prop
|
# product/etc/build.prop
|
||||||
#
|
#
|
||||||
|
# product/etc/build.prop is built by Soong. See product-build.prop module in
|
||||||
_prop_files_ := $(if $(TARGET_PRODUCT_PROP),\
|
# build/soong/Android.bp.
|
||||||
$(TARGET_PRODUCT_PROP),\
|
|
||||||
$(wildcard $(TARGET_DEVICE_DIR)/product.prop))
|
|
||||||
|
|
||||||
# Order matters here. When there are duplicates, the last one wins.
|
|
||||||
# TODO(b/117892318): don't allow duplicates so that the ordering doesn't matter
|
|
||||||
_prop_vars_ := \
|
|
||||||
ADDITIONAL_PRODUCT_PROPERTIES \
|
|
||||||
PRODUCT_PRODUCT_PROPERTIES
|
|
||||||
|
|
||||||
INSTALLED_PRODUCT_BUILD_PROP_TARGET := $(TARGET_OUT_PRODUCT)/etc/build.prop
|
INSTALLED_PRODUCT_BUILD_PROP_TARGET := $(TARGET_OUT_PRODUCT)/etc/build.prop
|
||||||
|
|
||||||
ifdef PRODUCT_OEM_PROPERTIES
|
|
||||||
import_oem_prop := $(call intermediates-dir-for,ETC,import_oem_prop)/oem.prop
|
|
||||||
|
|
||||||
$(import_oem_prop):
|
|
||||||
$(hide) echo "####################################" >> $@; \
|
|
||||||
echo "# PRODUCT_OEM_PROPERTIES" >> $@; \
|
|
||||||
echo "####################################" >> $@;
|
|
||||||
$(hide) $(foreach prop,$(PRODUCT_OEM_PROPERTIES), \
|
|
||||||
echo "import /oem/oem.prop $(prop)" >> $@;)
|
|
||||||
|
|
||||||
_footers_ := $(import_oem_prop)
|
|
||||||
else
|
|
||||||
_footers_ :=
|
|
||||||
endif
|
|
||||||
|
|
||||||
# Skip common /product properties generation if device released before R and
|
|
||||||
# has no product partition. This is the first part of the check.
|
|
||||||
ifeq ($(call math_lt,$(if $(PRODUCT_SHIPPING_API_LEVEL),$(PRODUCT_SHIPPING_API_LEVEL),30),30), true)
|
|
||||||
_skip_common_properties := true
|
|
||||||
endif
|
|
||||||
|
|
||||||
# The second part of the check - always generate common properties for the
|
|
||||||
# devices with product partition regardless of shipping level.
|
|
||||||
ifneq ($(BOARD_USES_PRODUCTIMAGE),)
|
|
||||||
_skip_common_properties :=
|
|
||||||
endif
|
|
||||||
|
|
||||||
$(eval $(call build-properties,\
|
|
||||||
product,\
|
|
||||||
$(INSTALLED_PRODUCT_BUILD_PROP_TARGET),\
|
|
||||||
$(_prop_files_),\
|
|
||||||
$(_prop_vars_),\
|
|
||||||
$(empty),\
|
|
||||||
$(_footers_),\
|
|
||||||
$(_skip_common_properties)))
|
|
||||||
|
|
||||||
$(eval $(call declare-1p-target,$(INSTALLED_PRODUCT_BUILD_PROP_TARGET)))
|
|
||||||
|
|
||||||
_skip_common_properties :=
|
|
||||||
|
|
||||||
# ----------------------------------------------------------------
|
# ----------------------------------------------------------------
|
||||||
# odm/etc/build.prop
|
# odm/etc/build.prop
|
||||||
#
|
#
|
||||||
_prop_files_ := $(if $(TARGET_ODM_PROP),\
|
# odm/etc/build.prop is built by Soong. See odm-build.prop module in
|
||||||
$(TARGET_ODM_PROP),\
|
# build/soong/Android.bp.
|
||||||
$(wildcard $(TARGET_DEVICE_DIR)/odm.prop))
|
|
||||||
|
|
||||||
# Order matters here. When there are duplicates, the last one wins.
|
|
||||||
# TODO(b/117892318): don't allow duplicates so that the ordering doesn't matter
|
|
||||||
_prop_vars_ := \
|
|
||||||
ADDITIONAL_ODM_PROPERTIES \
|
|
||||||
PRODUCT_ODM_PROPERTIES
|
|
||||||
|
|
||||||
INSTALLED_ODM_BUILD_PROP_TARGET := $(TARGET_OUT_ODM)/etc/build.prop
|
INSTALLED_ODM_BUILD_PROP_TARGET := $(TARGET_OUT_ODM)/etc/build.prop
|
||||||
$(eval $(call build-properties,\
|
|
||||||
odm,\
|
|
||||||
$(INSTALLED_ODM_BUILD_PROP_TARGET),\
|
|
||||||
$(_prop_files_),\
|
|
||||||
$(_prop_vars_),\
|
|
||||||
$(empty),\
|
|
||||||
$(empty),\
|
|
||||||
$(empty)))
|
|
||||||
|
|
||||||
$(eval $(call declare-1p-target,$(INSTALLED_ODM_BUILD_PROP_TARGET)))
|
|
||||||
|
|
||||||
# ----------------------------------------------------------------
|
# ----------------------------------------------------------------
|
||||||
# vendor_dlkm/etc/build.prop
|
# vendor_dlkm/etc/build.prop
|
||||||
|
@ -395,7 +330,7 @@ $(eval $(call declare-1p-target,$(INSTALLED_SYSTEM_DLKM_BUILD_PROP_TARGET)))
|
||||||
# -----------------------------------------------------------------
|
# -----------------------------------------------------------------
|
||||||
# system_ext/etc/build.prop
|
# system_ext/etc/build.prop
|
||||||
#
|
#
|
||||||
# system_ext/build.prop is built by Soong. See system-build.prop module in
|
# system_ext/etc/build.prop is built by Soong. See system-build.prop module in
|
||||||
# build/soong/Android.bp.
|
# build/soong/Android.bp.
|
||||||
|
|
||||||
INSTALLED_SYSTEM_EXT_BUILD_PROP_TARGET := $(TARGET_OUT_SYSTEM_EXT)/etc/build.prop
|
INSTALLED_SYSTEM_EXT_BUILD_PROP_TARGET := $(TARGET_OUT_SYSTEM_EXT)/etc/build.prop
|
||||||
|
|
|
@ -16,24 +16,8 @@ $(foreach name, $(_additional_prop_var_names),\
|
||||||
_additional_prop_var_names :=
|
_additional_prop_var_names :=
|
||||||
|
|
||||||
$(KATI_obsolete_var ADDITIONAL_SYSTEM_PROPERTIES,Use build/soong/scripts/gen_build_prop.py instead)
|
$(KATI_obsolete_var ADDITIONAL_SYSTEM_PROPERTIES,Use build/soong/scripts/gen_build_prop.py instead)
|
||||||
|
$(KATI_obsolete_var ADDITIONAL_ODM_PROPERTIES,Use build/soong/scripts/gen_build_prop.py instead)
|
||||||
# Add the system server compiler filter if they are specified for the product.
|
$(KATI_obsolete_var ADDITIONAL_PRODUCT_PROPERTIES,Use build/soong/scripts/gen_build_prop.py instead)
|
||||||
ifneq (,$(PRODUCT_SYSTEM_SERVER_COMPILER_FILTER))
|
|
||||||
ADDITIONAL_PRODUCT_PROPERTIES += dalvik.vm.systemservercompilerfilter=$(PRODUCT_SYSTEM_SERVER_COMPILER_FILTER)
|
|
||||||
endif
|
|
||||||
|
|
||||||
# Add the 16K developer option if it is defined for the product.
|
|
||||||
ifeq ($(PRODUCT_16K_DEVELOPER_OPTION),true)
|
|
||||||
ADDITIONAL_PRODUCT_PROPERTIES += ro.product.build.16k_page.enabled=true
|
|
||||||
else
|
|
||||||
ADDITIONAL_PRODUCT_PROPERTIES += ro.product.build.16k_page.enabled=false
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(TARGET_BOOTS_16K),true)
|
|
||||||
ADDITIONAL_PRODUCT_PROPERTIES += ro.product.page_size=16384
|
|
||||||
else
|
|
||||||
ADDITIONAL_PRODUCT_PROPERTIES += ro.product.page_size=4096
|
|
||||||
endif
|
|
||||||
|
|
||||||
# Add cpu properties for bionic and ART.
|
# Add cpu properties for bionic and ART.
|
||||||
ADDITIONAL_VENDOR_PROPERTIES += ro.bionic.arch=$(TARGET_ARCH)
|
ADDITIONAL_VENDOR_PROPERTIES += ro.bionic.arch=$(TARGET_ARCH)
|
||||||
|
@ -146,35 +130,16 @@ ADDITIONAL_VENDOR_PROPERTIES += \
|
||||||
ro.build.ab_update=$(AB_OTA_UPDATER)
|
ro.build.ab_update=$(AB_OTA_UPDATER)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ADDITIONAL_PRODUCT_PROPERTIES += ro.build.characteristics=$(TARGET_AAPT_CHARACTERISTICS)
|
|
||||||
|
|
||||||
ifeq ($(AB_OTA_UPDATER),true)
|
ifeq ($(AB_OTA_UPDATER),true)
|
||||||
ADDITIONAL_PRODUCT_PROPERTIES += ro.product.ab_ota_partitions=$(subst $(space),$(comma),$(sort $(AB_OTA_PARTITIONS)))
|
|
||||||
ADDITIONAL_VENDOR_PROPERTIES += ro.vendor.build.ab_ota_partitions=$(subst $(space),$(comma),$(sort $(AB_OTA_PARTITIONS)))
|
ADDITIONAL_VENDOR_PROPERTIES += ro.vendor.build.ab_ota_partitions=$(subst $(space),$(comma),$(sort $(AB_OTA_PARTITIONS)))
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Set this property for VTS to skip large page size tests on unsupported devices.
|
|
||||||
ADDITIONAL_PRODUCT_PROPERTIES += \
|
|
||||||
ro.product.cpu.pagesize.max=$(TARGET_MAX_PAGE_SIZE_SUPPORTED)
|
|
||||||
|
|
||||||
ifeq ($(PRODUCT_NO_BIONIC_PAGE_SIZE_MACRO),true)
|
|
||||||
ADDITIONAL_PRODUCT_PROPERTIES += ro.product.build.no_bionic_page_size_macro=true
|
|
||||||
endif
|
|
||||||
|
|
||||||
user_variant := $(filter user userdebug,$(TARGET_BUILD_VARIANT))
|
user_variant := $(filter user userdebug,$(TARGET_BUILD_VARIANT))
|
||||||
|
|
||||||
config_enable_uffd_gc := \
|
config_enable_uffd_gc := \
|
||||||
$(firstword $(OVERRIDE_ENABLE_UFFD_GC) $(PRODUCT_ENABLE_UFFD_GC) default)
|
$(firstword $(OVERRIDE_ENABLE_UFFD_GC) $(PRODUCT_ENABLE_UFFD_GC) default)
|
||||||
|
|
||||||
# This is a temporary system property that controls the ART module. The plan is
|
|
||||||
# to remove it by Aug 2025, at which time Mainline updates of the ART module
|
|
||||||
# will ignore it as well.
|
|
||||||
# If the value is "default", it will be mangled by post_process_props.py.
|
|
||||||
ADDITIONAL_PRODUCT_PROPERTIES += ro.dalvik.vm.enable_uffd_gc=$(config_enable_uffd_gc)
|
|
||||||
|
|
||||||
ADDITIONAL_PRODUCT_PROPERTIES := $(strip $(ADDITIONAL_PRODUCT_PROPERTIES))
|
|
||||||
ADDITIONAL_VENDOR_PROPERTIES := $(strip $(ADDITIONAL_VENDOR_PROPERTIES))
|
ADDITIONAL_VENDOR_PROPERTIES := $(strip $(ADDITIONAL_VENDOR_PROPERTIES))
|
||||||
|
|
||||||
.KATI_READONLY += \
|
.KATI_READONLY += \
|
||||||
ADDITIONAL_PRODUCT_PROPERTIES \
|
|
||||||
ADDITIONAL_VENDOR_PROPERTIES
|
ADDITIONAL_VENDOR_PROPERTIES
|
||||||
|
|
|
@ -25,3 +25,4 @@ PRODUCT_PACKAGES += \
|
||||||
product_compatibility_matrix.xml \
|
product_compatibility_matrix.xml \
|
||||||
product_manifest.xml \
|
product_manifest.xml \
|
||||||
selinux_policy_product \
|
selinux_policy_product \
|
||||||
|
product-build.prop \
|
||||||
|
|
|
@ -72,6 +72,7 @@ PRODUCT_PACKAGES += \
|
||||||
passwd_vendor \
|
passwd_vendor \
|
||||||
selinux_policy_nonsystem \
|
selinux_policy_nonsystem \
|
||||||
shell_and_utilities_vendor \
|
shell_and_utilities_vendor \
|
||||||
|
odm-build.prop \
|
||||||
|
|
||||||
# Base modules when shipping api level is less than or equal to 34
|
# Base modules when shipping api level is less than or equal to 34
|
||||||
PRODUCT_PACKAGES_SHIPPING_API_LEVEL_34 += \
|
PRODUCT_PACKAGES_SHIPPING_API_LEVEL_34 += \
|
||||||
|
|
Loading…
Reference in a new issue