Add device/fwk compatibility matrices to device.

Also renamed matrix.xml to compatibility_matrix.xml.

Test: make and ensure vendor/compatibility_matrix.xml is there.
Test: adb shell vintf (see matrices, compatible = true)

Bug: 37321309
Change-Id: I4ebbedf47a576a50a42df53b72e507ed31ef2e56
This commit is contained in:
Yifan Hong 2017-04-28 14:39:50 -07:00
parent 3b7560bf88
commit b5cbe22b84
4 changed files with 31 additions and 3 deletions

View File

@ -2341,6 +2341,7 @@ ifdef INSTALLED_SYSTEMOTHERIMAGE_TARGET
endif
@# Metadata for compatibility verification.
$(hide) cp $(BUILT_SYSTEM_MANIFEST) $(zip_root)/META/system_manifest.xml
$(hide) cp $(BUILT_SYSTEM_COMPATIBILITY_MATRIX) $(zip_root)/META/system_compatibility_matrix.xml
ifdef BUILT_VENDOR_MANIFEST
$(hide) cp $(BUILT_VENDOR_MANIFEST) $(zip_root)/META/vendor_manifest.xml
endif

View File

@ -687,6 +687,7 @@ else
endif
FRAMEWORK_MANIFEST_FILE := system/libhidl/manifest.xml
FRAMEWORK_COMPATIBILITY_MATRIX_FILE := hardware/interfaces/compatibility_matrix.xml
# ###############################################################
# Set up final options.

View File

@ -30,6 +30,7 @@ endif
# Copy compatibility metadata to the device.
# Device Manifest
ifdef DEVICE_MANIFEST_FILE
include $(CLEAR_VARS)
LOCAL_MODULE := manifest.xml
@ -45,16 +46,24 @@ include $(BUILD_PREBUILT)
BUILT_VENDOR_MANIFEST := $(LOCAL_BUILT_MODULE)
endif
# Device Compatibility Matrix
ifdef DEVICE_MATRIX_FILE
include $(CLEAR_VARS)
LOCAL_MODULE := matrix.xml
LOCAL_MODULE := compatibility_matrix.xml
LOCAL_MODULE_CLASS := ETC
LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR)
LOCAL_PREBUILT_MODULE_FILE := $(DEVICE_MATRIX_FILE)
GEN := $(local-generated-sources-dir)/compatibility_matrix.xml
$(GEN): $(DEVICE_MATRIX_FILE) $(HOST_OUT_EXECUTABLES)/assemble_vintf
# TODO(b/37342627): put BOARD_VNDK_VERSION & BOARD_VNDK_LIBRARIES into device matrix.
$(HOST_OUT_EXECUTABLES)/assemble_vintf -i $< -o $@
LOCAL_PREBUILT_MODULE_FILE := $(GEN)
include $(BUILD_PREBUILT)
BUILT_VENDOR_MATRIX := $(LOCAL_BUILT_MODULE)
endif
# Framework Manifest
include $(CLEAR_VARS)
LOCAL_MODULE := system_manifest.xml
LOCAL_MODULE_STEM := manifest.xml
@ -68,3 +77,19 @@ $(GEN): $(FRAMEWORK_MANIFEST_FILE) $(HOST_OUT_EXECUTABLES)/assemble_vintf
LOCAL_PREBUILT_MODULE_FILE := $(GEN)
include $(BUILD_PREBUILT)
BUILT_SYSTEM_MANIFEST := $(LOCAL_BUILT_MODULE)
# Framework Compatibility Matrix
include $(CLEAR_VARS)
LOCAL_MODULE := system_compatibility_matrix.xml
LOCAL_MODULE_STEM := compatibility_matrix.xml
LOCAL_MODULE_CLASS := ETC
LOCAL_MODULE_PATH := $(TARGET_OUT)
GEN := $(local-generated-sources-dir)/compatibility_matrix.xml
$(GEN): $(FRAMEWORK_COMPATIBILITY_MATRIX_FILE) $(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) $(HOST_OUT_EXECUTABLES)/assemble_vintf -i $< -o $@
LOCAL_PREBUILT_MODULE_FILE := $(GEN)
include $(BUILD_PREBUILT)
BUILT_SYSTEM_COMPATIBILITY_MATRIX := $(LOCAL_BUILT_MODULE)

View File

@ -86,9 +86,10 @@ PRODUCT_PACKAGES += \
tzdatacheck \
vndservice \
vndservicemanager \
matrix.xml \
compatibility_matrix.xml \
manifest.xml \
system_manifest.xml \
system_compatibility_matrix.xml \
# SELinux packages
PRODUCT_PACKAGES += \