Merge changes I1459d62f,I4c2b975e
* changes:
Build image for super partition
productservices => product_services
diff --git a/core/Makefile b/core/Makefile
index 830c714..4d4570b 100644
--- a/core/Makefile
+++ b/core/Makefile
@@ -443,7 +443,7 @@
ALL_DEFAULT_INSTALLED_MODULES += $(INSTALLED_PRODUCT_BUILD_PROP_TARGET)
FINAL_PRODUCT_PROPERTIES += \
- $(call collapse-pairs, $(PRODUCT_PRODUCT_PROPERTIES))
+ $(call collapse-pairs, $(PRODUCT_PRODUCT_PROPERTIES) $(ADDITIONAL_PRODUCT_PROPERTIES))
FINAL_PRODUCT_PROPERTIES := $(call uniq-pairs-by-first-component, \
$(FINAL_PRODUCT_PROPERTIES),=)
diff --git a/core/autogen_test_config.mk b/core/autogen_test_config.mk
index 5feec2b..bf87c9d 100644
--- a/core/autogen_test_config.mk
+++ b/core/autogen_test_config.mk
@@ -29,9 +29,10 @@
autogen_test_config_template := $(NATIVE_TEST_CONFIG_TEMPLATE)
endif
# Auto generating test config file for native test
+$(autogen_test_config_file): PRIVATE_MODULE_NAME := $(LOCAL_MODULE)
$(autogen_test_config_file) : $(autogen_test_config_template)
@echo "Auto generating test config $(notdir $@)"
- $(hide) sed 's&{MODULE}&$(PRIVATE_MODULE)&g' $< > $@
+ $(hide) sed 's&{MODULE}&$(PRIVATE_MODULE_NAME)&g' $< > $@
my_auto_generate_config := true
else
# Auto generating test config file for instrumentation test
@@ -52,6 +53,7 @@
LOCAL_INTERMEDIATE_TARGETS += $(autogen_test_config_file)
$(LOCAL_BUILT_MODULE): $(autogen_test_config_file)
ALL_MODULES.$(my_register_name).auto_test_config := true
+ $(my_prefix)$(LOCAL_MODULE_CLASS)_$(LOCAL_MODULE)_autogen := true
else
autogen_test_config_file :=
endif
diff --git a/core/base_rules.mk b/core/base_rules.mk
index 744740f..770a16c 100644
--- a/core/base_rules.mk
+++ b/core/base_rules.mk
@@ -566,69 +566,74 @@
$(LOCAL_BUILT_MODULE):$(dir)/$(my_installed_module_stem))) \
$(eval my_compat_dist_config_$(suite) := ))
+
# Make sure we only add the files once for multilib modules.
-ifndef $(my_prefix)$(LOCAL_MODULE_CLASS)_$(LOCAL_MODULE)_compat_files
-$(my_prefix)$(LOCAL_MODULE_CLASS)_$(LOCAL_MODULE)_compat_files := true
-
-# LOCAL_COMPATIBILITY_SUPPORT_FILES is a list of <src>[:<dest>].
-$(foreach suite, $(LOCAL_COMPATIBILITY_SUITE), \
- $(eval my_compat_dist_$(suite) += $(foreach f, $(LOCAL_COMPATIBILITY_SUPPORT_FILES), \
- $(eval p := $(subst :,$(space),$(f))) \
- $(eval s := $(word 1,$(p))) \
- $(eval n := $(or $(word 2,$(p)),$(notdir $(word 1, $(p))))) \
- $(foreach dir, $(call compatibility_suite_dirs,$(suite)), \
- $(s):$(dir)/$(n)))))
-
-test_config := $(wildcard $(LOCAL_PATH)/AndroidTest.xml)
-ifeq (,$(test_config))
- ifneq (true,$(is_native))
- is_instrumentation_test := true
- ifeq (true, $(LOCAL_IS_HOST_MODULE))
- is_instrumentation_test := false
- endif
- # If LOCAL_MODULE_CLASS is not APPS, it's certainly not an instrumentation
- # test. However, some packages for test data also have LOCAL_MODULE_CLASS
- # set to APPS. These will require flag LOCAL_DISABLE_AUTO_GENERATE_TEST_CONFIG
- # to disable auto-generating test config file.
- ifneq (APPS, $(LOCAL_MODULE_CLASS))
- is_instrumentation_test := false
- endif
+ifdef $(my_prefix)$(LOCAL_MODULE_CLASS)_$(LOCAL_MODULE)_compat_files
+ # Sync the auto_test_config value for multilib modules.
+ ifdef $(my_prefix)$(LOCAL_MODULE_CLASS)_$(LOCAL_MODULE)_autogen
+ ALL_MODULES.$(my_register_name).auto_test_config := true
endif
- # CTS modules can be used for test data, so test config files must be
- # explicitly created using AndroidTest.xml
- ifeq (,$(filter cts, $(LOCAL_COMPATIBILITY_SUITE)))
- ifneq (true, $(LOCAL_DISABLE_AUTO_GENERATE_TEST_CONFIG))
- ifeq (true, $(filter true,$(is_native) $(is_instrumentation_test)))
- include $(BUILD_SYSTEM)/autogen_test_config.mk
- test_config := $(autogen_test_config_file)
- autogen_test_config_file :=
+else
+ $(my_prefix)$(LOCAL_MODULE_CLASS)_$(LOCAL_MODULE)_compat_files := true
+ # LOCAL_COMPATIBILITY_SUPPORT_FILES is a list of <src>[:<dest>].
+ $(foreach suite, $(LOCAL_COMPATIBILITY_SUITE), \
+ $(eval my_compat_dist_$(suite) += $(foreach f, $(LOCAL_COMPATIBILITY_SUPPORT_FILES), \
+ $(eval p := $(subst :,$(space),$(f))) \
+ $(eval s := $(word 1,$(p))) \
+ $(eval n := $(or $(word 2,$(p)),$(notdir $(word 1, $(p))))) \
+ $(foreach dir, $(call compatibility_suite_dirs,$(suite)), \
+ $(s):$(dir)/$(n)))))
+
+ test_config := $(wildcard $(LOCAL_PATH)/AndroidTest.xml)
+ ifeq (,$(test_config))
+ ifneq (true,$(is_native))
+ is_instrumentation_test := true
+ ifeq (true, $(LOCAL_IS_HOST_MODULE))
+ is_instrumentation_test := false
+ endif
+ # If LOCAL_MODULE_CLASS is not APPS, it's certainly not an instrumentation
+ # test. However, some packages for test data also have LOCAL_MODULE_CLASS
+ # set to APPS. These will require flag LOCAL_DISABLE_AUTO_GENERATE_TEST_CONFIG
+ # to disable auto-generating test config file.
+ ifneq (APPS, $(LOCAL_MODULE_CLASS))
+ is_instrumentation_test := false
+ endif
+ endif
+ # CTS modules can be used for test data, so test config files must be
+ # explicitly created using AndroidTest.xml
+ ifeq (,$(filter cts, $(LOCAL_COMPATIBILITY_SUITE)))
+ ifneq (true, $(LOCAL_DISABLE_AUTO_GENERATE_TEST_CONFIG))
+ ifeq (true, $(filter true,$(is_native) $(is_instrumentation_test)))
+ include $(BUILD_SYSTEM)/autogen_test_config.mk
+ test_config := $(autogen_test_config_file)
+ autogen_test_config_file :=
+ endif
endif
endif
endif
-endif
-is_instrumentation_test :=
+ is_instrumentation_test :=
-ifneq (,$(test_config))
-$(foreach suite, $(LOCAL_COMPATIBILITY_SUITE), \
- $(eval my_compat_dist_config_$(suite) += $(foreach dir, $(call compatibility_suite_dirs,$(suite)), \
- $(test_config):$(dir)/$(LOCAL_MODULE).config)))
-endif
+ ifneq (,$(test_config))
+ $(foreach suite, $(LOCAL_COMPATIBILITY_SUITE), \
+ $(eval my_compat_dist_config_$(suite) += $(foreach dir, $(call compatibility_suite_dirs,$(suite)), \
+ $(test_config):$(dir)/$(LOCAL_MODULE).config)))
+ endif
-test_config :=
+ test_config :=
-ifneq (,$(wildcard $(LOCAL_PATH)/DynamicConfig.xml))
-$(foreach suite, $(LOCAL_COMPATIBILITY_SUITE), \
- $(eval my_compat_dist_config_$(suite) += $(foreach dir, $(call compatibility_suite_dirs,$(suite)), \
- $(LOCAL_PATH)/DynamicConfig.xml:$(dir)/$(LOCAL_MODULE).dynamic)))
-endif
+ ifneq (,$(wildcard $(LOCAL_PATH)/DynamicConfig.xml))
+ $(foreach suite, $(LOCAL_COMPATIBILITY_SUITE), \
+ $(eval my_compat_dist_config_$(suite) += $(foreach dir, $(call compatibility_suite_dirs,$(suite)), \
+ $(LOCAL_PATH)/DynamicConfig.xml:$(dir)/$(LOCAL_MODULE).dynamic)))
+ endif
-ifneq (,$(wildcard $(LOCAL_PATH)/$(LOCAL_MODULE)_*.config))
-$(foreach extra_config, $(wildcard $(LOCAL_PATH)/$(LOCAL_MODULE)_*.config), \
- $(foreach suite, $(LOCAL_COMPATIBILITY_SUITE), \
- $(eval my_compat_dist_config_$(suite) += $(foreach dir, $(call compatibility_suite_dirs,$(suite)), \
- $(extra_config):$(dir)/$(notdir $(extra_config))))))
-endif
+ ifneq (,$(wildcard $(LOCAL_PATH)/$(LOCAL_MODULE)_*.config))
+ $(foreach extra_config, $(wildcard $(LOCAL_PATH)/$(LOCAL_MODULE)_*.config), \
+ $(foreach suite, $(LOCAL_COMPATIBILITY_SUITE), \
+ $(eval my_compat_dist_config_$(suite) += $(foreach dir, $(call compatibility_suite_dirs,$(suite)), \
+ $(extra_config):$(dir)/$(notdir $(extra_config))))))
+ endif
endif # $(my_prefix)$(LOCAL_MODULE_CLASS)_$(LOCAL_MODULE)_compat_files
ifneq ($(my_test_data_file_pairs),)
diff --git a/core/config.mk b/core/config.mk
index 5c6b271..0a23ef9 100644
--- a/core/config.mk
+++ b/core/config.mk
@@ -911,6 +911,20 @@
PLATFORM_SEPOLICY_VERSION \
TOT_SEPOLICY_VERSION \
+# If true, 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.
+ifndef PRODUCT_OTA_ENFORCE_VINTF_KERNEL_REQUIREMENTS
+ PRODUCT_OTA_ENFORCE_VINTF_KERNEL_REQUIREMENTS :=
+ ifdef PRODUCT_SHIPPING_API_LEVEL
+ ifeq (true,$(call math_gt_or_eq,$(PRODUCT_SHIPPING_API_LEVEL),29))
+ PRODUCT_OTA_ENFORCE_VINTF_KERNEL_REQUIREMENTS := true
+ endif
+ endif
+endif
+.KATI_READONLY := PRODUCT_OTA_ENFORCE_VINTF_KERNEL_REQUIREMENTS
+
ifndef USE_LOGICAL_PARTITIONS
USE_LOGICAL_PARTITIONS := $(PRODUCT_USE_LOGICAL_PARTITIONS)
endif
diff --git a/core/definitions.mk b/core/definitions.mk
index 1550206..3512598 100644
--- a/core/definitions.mk
+++ b/core/definitions.mk
@@ -796,8 +796,8 @@
define collapse-pairs
$(eval _cpSEP := $(strip $(if $(2),$(2),=)))\
-$(subst $(space)$(_cpSEP)$(space),$(_cpSEP),$(strip \
- $(subst $(_cpSEP), $(_cpSEP) ,$(1))))
+$(strip $(subst $(space)$(_cpSEP)$(space),$(_cpSEP),$(strip \
+ $(subst $(_cpSEP), $(_cpSEP) ,$(1)))$(space)))
endef
###########################################################
diff --git a/core/main.mk b/core/main.mk
index de23e49..ae9781b 100644
--- a/core/main.mk
+++ b/core/main.mk
@@ -146,6 +146,15 @@
#
# -----------------------------------------------------------------
+# Validate ADDITIONAL_PRODUCT_PROPERTIES.
+ifneq ($(ADDITIONAL_PRODUCT_PROPERTIES),)
+$(error ADDITIONAL_PRODUCT_PROPERTIES must not be set before here: $(ADDITIONAL_PRODUCT_PROPERTIES))
+endif
+
+ADDITIONAL_PRODUCT_PROPERTIES :=
+
+#
+# -----------------------------------------------------------------
# Add the product-defined properties to the build properties.
ifdef PRODUCT_SHIPPING_API_LEVEL
ADDITIONAL_BUILD_PROPERTIES += \
@@ -231,7 +240,7 @@
ADDITIONAL_DEFAULT_PROPERTIES += ro.actionable_compatible_property.enabled=${PRODUCT_COMPATIBLE_PROPERTY}
endif
-ADDITIONAL_BUILD_PROPERTIES += ro.boot.logical_partitions=${USE_LOGICAL_PARTITIONS}
+ADDITIONAL_PRODUCT_PROPERTIES += ro.boot.logical_partitions=${USE_LOGICAL_PARTITIONS}
# -----------------------------------------------------------------
###
@@ -402,6 +411,8 @@
.KATI_READONLY := ADDITIONAL_DEFAULT_PROPERTIES
ADDITIONAL_BUILD_PROPERTIES := $(strip $(ADDITIONAL_BUILD_PROPERTIES))
.KATI_READONLY := ADDITIONAL_BUILD_PROPERTIES
+ADDITIONAL_PRODUCT_PROPERTIES := $(strip $(ADDITIONAL_PRODUCT_PROPERTIES))
+.KATI_READONLY := ADDITIONAL_PRODUCT_PROPERTIES
ifneq ($(PRODUCT_ENFORCE_RRO_TARGETS),)
ENFORCE_RRO_SOURCES :=
diff --git a/core/tasks/vndk.mk b/core/tasks/vndk.mk
index 1bde7a6..9420638 100644
--- a/core/tasks/vndk.mk
+++ b/core/tasks/vndk.mk
@@ -23,19 +23,6 @@
# BOARD_VNDK_RUNTIME_DISABLE must not be set to 'true'.
ifneq ($(BOARD_VNDK_RUNTIME_DISABLE),true)
-# Returns arch-specific libclang_rt.ubsan* library name.
-# Because VNDK_CORE_LIBRARIES includes all arch variants for libclang_rt.ubsan*
-# libs, the arch-specific libs are selected separately.
-#
-# Args:
-# $(1): if not empty, evaluates for TARGET_2ND_ARCH
-define clang-ubsan-vndk-core
-$(strip \
- $(eval prefix := $(if $(1),2ND_,)) \
- $(addsuffix .vendor,$($(addprefix $(prefix),UBSAN_RUNTIME_LIBRARY))) \
-)
-endef
-
# Returns list of src:dest paths of the intermediate objs
#
# Args:
@@ -70,20 +57,7 @@
$(if $(notice),$(notice):$(subst .vendor,,$(lib)).so.txt)))
endef
-# If in the future libclang_rt.ubsan* is removed from the VNDK-core list,
-# need to update the related logic in this file.
-ifeq (,$(filter libclang_rt.ubsan%,$(VNDK_CORE_LIBRARIES)))
- $(warning libclang_rt.ubsan* is no longer a VNDK-core library. Please update this file.)
- vndk_core_libs := $(addsuffix .vendor,$(VNDK_CORE_LIBRARIES))
-else
- vndk_core_libs := $(addsuffix .vendor,$(filter-out libclang_rt.ubsan%,$(VNDK_CORE_LIBRARIES)))
-
- vndk_core_libs += $(call clang-ubsan-vndk-core)
- ifdef TARGET_2ND_ARCH
- vndk_core_libs += $(call clang-ubsan-vndk-core,true)
- endif
-endif
-
+vndk_core_libs := $(addsuffix .vendor,$(VNDK_CORE_LIBRARIES))
vndk_sp_libs := $(addsuffix .vendor,$(VNDK_SAMEPROCESS_LIBRARIES))
vndk_private_libs := $(addsuffix .vendor,$(VNDK_PRIVATE_LIBRARIES))