From b14b530f829c73c157dff4def0a594f365895866 Mon Sep 17 00:00:00 2001 From: Steven Moreland Date: Wed, 20 Dec 2017 10:44:10 -0800 Subject: [PATCH] Allow devices to extend the system manifest. Introduces DEVICE_FRAMEWORK_MANIFEST_FILE, a list of files which are added to system/manifest.xml. This is required for devices to properly display what hals they implement and also therefore for them to pass vts_treble_vintf_test since it now tests manifests based on hal origin. Notice, this is named singularly to match DEVICE_MANIFEST_FILE which is also a list of files. They may be better both named "FILES", but for consistency and legacy reasons, they can be thought of as "everything that composes the X manifest file". Fixes: 70042049 Test: add system manifest extension which needs it and it no longer fails vts_treble_vintf_test for hals being served from the wrong partitions. Change-Id: I1f59d5c3cadb7a7d4576b73196ca7b41103a49c5 --- core/config.mk | 7 ++++++- target/board/Android.mk | 7 +++++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/core/config.mk b/core/config.mk index dc2b16a25..50c2baa2a 100644 --- a/core/config.mk +++ b/core/config.mk @@ -816,7 +816,12 @@ else DEFAULT_SYSTEM_DEV_CERTIFICATE := build/target/product/security/testkey endif -FRAMEWORK_MANIFEST_FILE := system/libhidl/manifest.xml +FRAMEWORK_MANIFEST_INPUT_FILES := system/libhidl/manifest.xml +ifdef DEVICE_FRAMEWORK_MANIFEST_FILE + FRAMEWORK_MANIFEST_INPUT_FILES += $(DEVICE_FRAMEWORK_MANIFEST_FILE) +endif +$(.KATI_obsolete_var DEVICE_FRAMEWORK_MANIFEST_FILE,No one should ever need to use this.) + FRAMEWORK_COMPATIBILITY_MATRIX_FILES := $(wildcard hardware/interfaces/compatibility_matrix.*.xml) BUILD_NUMBER_FROM_FILE := $$(cat $(OUT_DIR)/build_number.txt) diff --git a/target/board/Android.mk b/target/board/Android.mk index fc32cd9db..f4d6b9351 100644 --- a/target/board/Android.mk +++ b/target/board/Android.mk @@ -89,8 +89,11 @@ $(GEN): PRIVATE_FLAGS += -c "$(BUILT_VENDOR_MATRIX)" endif endif -$(GEN): $(FRAMEWORK_MANIFEST_FILE) $(HOST_OUT_EXECUTABLES)/assemble_vintf - BOARD_SEPOLICY_VERS=$(BOARD_SEPOLICY_VERS) $(HOST_OUT_EXECUTABLES)/assemble_vintf -i $< -o $@ $(PRIVATE_FLAGS) +$(GEN): PRIVATE_FRAMEWORK_MANIFEST_INPUT_FILES := $(FRAMEWORK_MANIFEST_INPUT_FILES) +$(GEN): $(FRAMEWORK_MANIFEST_INPUT_FILES) $(HOST_OUT_EXECUTABLES)/assemble_vintf + BOARD_SEPOLICY_VERS=$(BOARD_SEPOLICY_VERS) $(HOST_OUT_EXECUTABLES)/assemble_vintf \ + -i $(call normalize-path-list,$(PRIVATE_FRAMEWORK_MANIFEST_INPUT_FILES)) \ + -o $@ $(PRIVATE_FLAGS) LOCAL_PREBUILT_MODULE_FILE := $(GEN) include $(BUILD_PREBUILT)