Move fwk comp mat level logic into assemble_vintf
Deprecation schedule requirements is specified in assemble_vintf. Move all checking logic to assemble_vintf. Test: builds Bug: 69636193 Change-Id: I2d62555633494014dc0005931de6c8ae9e6877fa Merged-In: I2d62555633494014dc0005931de6c8ae9e6877fa
This commit is contained in:
parent
97de88c14e
commit
ed42caf94d
2 changed files with 8 additions and 42 deletions
|
@ -785,44 +785,7 @@ else
|
|||
endif
|
||||
|
||||
FRAMEWORK_MANIFEST_FILE := system/libhidl/manifest.xml
|
||||
|
||||
# Compatibility matrix versioning:
|
||||
# MATRIX_LEVEL_OVERRIDE defined: MATRIX_LEVEL = MATRIX_LEVEL_OVERRIDE
|
||||
# MATRIX_LEVEL_OVERRIDE undefined:
|
||||
# FULL_TREBLE != true: MATRIX_LEVEL = legacy
|
||||
# FULL_TREBLE == true:
|
||||
# SHIPPING_API_LEVEL defined: MATRIX_LEVEL = SHIPPING_API_LEVEL
|
||||
# SHIPPING_API_LEVEL undefined: MATRIX_LEVEL = PLATFORM_SDK_VERSION
|
||||
# MATRIX_LEVEL == legacy => legacy.xml
|
||||
# MATRIX_LEVEL <= 26 => 26.xml
|
||||
# MATRIX_LEVEL == 27 => 27.xml # define when 27 releases
|
||||
# MATRIX_LEVEL == 28 => 28.xml # define when 28 releases
|
||||
# ...
|
||||
# otherwise => current.xml
|
||||
|
||||
ifneq ($(PRODUCT_COMPATIBILITY_MATRIX_LEVEL_OVERRIDE),)
|
||||
PRODUCT_COMPATIBILITY_MATRIX_LEVEL := $(PRODUCT_COMPATIBILITY_MATRIX_LEVEL_OVERRIDE)
|
||||
else ifneq ($(PRODUCT_FULL_TREBLE),true)
|
||||
PRODUCT_COMPATIBILITY_MATRIX_LEVEL := legacy
|
||||
else ifneq ($(PRODUCT_SHIPPING_API_LEVEL),)
|
||||
PRODUCT_COMPATIBILITY_MATRIX_LEVEL := $(PRODUCT_SHIPPING_API_LEVEL)
|
||||
else
|
||||
PRODUCT_COMPATIBILITY_MATRIX_LEVEL := $(PLATFORM_SDK_VERSION)
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(PRODUCT_COMPATIBILITY_MATRIX_LEVEL)),legacy)
|
||||
FRAMEWORK_COMPATIBILITY_MATRIX_FILE := hardware/interfaces/compatibility_matrix.legacy.xml
|
||||
else ifeq ($(call math_gt_or_eq,$(PRODUCT_COMPATIBILITY_MATRIX_LEVEL),26),)
|
||||
# All PRODUCT_FULL_TREBLE devices with shipping API levels < 26 get the level 26 manifest
|
||||
# as that is the first.
|
||||
FRAMEWORK_COMPATIBILITY_MATRIX_FILE := hardware/interfaces/compatibility_matrix.26.xml
|
||||
else ifeq ($(call math_gt_or_eq,$(PRODUCT_COMPATIBILITY_MATRIX_LEVEL),28),)
|
||||
# All shipping API levels with released compatibility matrices get the corresponding matrix.
|
||||
FRAMEWORK_COMPATIBILITY_MATRIX_FILE := \
|
||||
hardware/interfaces/compatibility_matrix.$(PRODUCT_COMPATIBILITY_MATRIX_LEVEL).xml
|
||||
else
|
||||
FRAMEWORK_COMPATIBILITY_MATRIX_FILE := hardware/interfaces/compatibility_matrix.current.xml
|
||||
endif
|
||||
FRAMEWORK_COMPATIBILITY_MATRIX_FILES := $(wildcard hardware/interfaces/compatibility_matrix.*.xml)
|
||||
|
||||
BUILD_NUMBER_FROM_FILE := $$(cat $(OUT_DIR)/build_number.txt)
|
||||
BUILD_DATETIME_FROM_FILE := $$(cat $(OUT_DIR)/build_date.txt)
|
||||
|
|
|
@ -42,6 +42,8 @@ GEN := $(local-generated-sources-dir)/manifest.xml
|
|||
$(GEN): PRIVATE_DEVICE_MANIFEST_FILE := $(DEVICE_MANIFEST_FILE)
|
||||
$(GEN): $(DEVICE_MANIFEST_FILE) $(HOST_OUT_EXECUTABLES)/assemble_vintf
|
||||
BOARD_SEPOLICY_VERS=$(BOARD_SEPOLICY_VERS) \
|
||||
PRODUCT_ENFORCE_VINTF_MANIFEST=$(PRODUCT_ENFORCE_VINTF_MANIFEST) \
|
||||
PRODUCT_SHIPPING_API_LEVEL=$(PRODUCT_SHIPPING_API_LEVEL) \
|
||||
$(HOST_OUT_EXECUTABLES)/assemble_vintf -o $@ \
|
||||
-i $(call normalize-path-list,$(PRIVATE_DEVICE_MANIFEST_FILE))
|
||||
|
||||
|
@ -103,12 +105,10 @@ GEN := $(local-generated-sources-dir)/compatibility_matrix.xml
|
|||
|
||||
$(GEN): PRIVATE_FLAGS :=
|
||||
|
||||
ifeq ($(PRODUCT_ENFORCE_VINTF_MANIFEST),true)
|
||||
ifdef BUILT_VENDOR_MANIFEST
|
||||
$(GEN): $(BUILT_VENDOR_MANIFEST)
|
||||
$(GEN): PRIVATE_FLAGS += -c "$(BUILT_VENDOR_MANIFEST)"
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq (true,$(BOARD_AVB_ENABLE))
|
||||
$(GEN): $(AVBTOOL)
|
||||
|
@ -139,12 +139,15 @@ $(GEN): PRIVATE_FLAGS += $(foreach version,$(KERNEL_VERSIONS),\
|
|||
KERNEL_VERSIONS :=
|
||||
KERNEL_CONFIG_DATA :=
|
||||
|
||||
$(GEN): $(FRAMEWORK_COMPATIBILITY_MATRIX_FILE) $(HOST_OUT_EXECUTABLES)/assemble_vintf
|
||||
$(GEN): $(FRAMEWORK_COMPATIBILITY_MATRIX_FILES) $(HOST_OUT_EXECUTABLES)/assemble_vintf
|
||||
# TODO(b/37405869) (b/37715375) inject avb versions as well for devices that have avb enabled.
|
||||
POLICYVERS=$(POLICYVERS) \
|
||||
BOARD_SEPOLICY_VERS=$(BOARD_SEPOLICY_VERS) \
|
||||
FRAMEWORK_VBMETA_VERSION=$(FRAMEWORK_VBMETA_VERSION) \
|
||||
$(HOST_OUT_EXECUTABLES)/assemble_vintf -i $< -o $@ $(PRIVATE_FLAGS)
|
||||
PRODUCT_ENFORCE_VINTF_MANIFEST=$(PRODUCT_ENFORCE_VINTF_MANIFEST) \
|
||||
$(HOST_OUT_EXECUTABLES)/assemble_vintf \
|
||||
-i $(call normalize-path-list,$(FRAMEWORK_COMPATIBILITY_MATRIX_FILES)) \
|
||||
-o $@ $(PRIVATE_FLAGS)
|
||||
LOCAL_PREBUILT_MODULE_FILE := $(GEN)
|
||||
include $(BUILD_PREBUILT)
|
||||
BUILT_SYSTEM_COMPATIBILITY_MATRIX := $(LOCAL_BUILT_MODULE)
|
||||
|
|
Loading…
Reference in a new issue