Add product manifest.
- Rename framework_manifest.xml to system_manifest.xml since that's more accurate. - Add product_manifest.xml to base_product.mk - Add product_manifest.xml to verified_assembled_framework_manifest.xml to check it at build time. Bug: 126770403 Bug: 130714844 Bug: 80547152 Test: build and inspect output Test: lshal Change-Id: I1b447d8c36f72768e28e9bcaa4d06afdeba08c2a
This commit is contained in:
@@ -2064,29 +2064,6 @@ endif
|
|||||||
|
|
||||||
FULL_SYSTEMIMAGE_DEPS += $(INTERNAL_ROOT_FILES) $(INSTALLED_FILES_FILE_ROOT)
|
FULL_SYSTEMIMAGE_DEPS += $(INTERNAL_ROOT_FILES) $(INSTALLED_FILES_FILE_ROOT)
|
||||||
|
|
||||||
# -----------------------------------------------------------------
|
|
||||||
# Final System VINTF manifest including fragments. This is not assembled
|
|
||||||
# on the device because it depends on everything in a given device
|
|
||||||
# image which defines a vintf_fragment.
|
|
||||||
|
|
||||||
ifdef BUILDING_SYSTEM_IMAGE
|
|
||||||
|
|
||||||
BUILT_ASSEMBLED_SYSTEM_MANIFEST := $(PRODUCT_OUT)/verified_assembled_system_manifest.xml
|
|
||||||
$(BUILT_ASSEMBLED_SYSTEM_MANIFEST): $(HOST_OUT_EXECUTABLES)/assemble_vintf
|
|
||||||
$(BUILT_ASSEMBLED_SYSTEM_MANIFEST): $(BUILT_VENDOR_MATRIX)
|
|
||||||
$(BUILT_ASSEMBLED_SYSTEM_MANIFEST): $(BUILT_SYSTEM_MANIFEST)
|
|
||||||
$(BUILT_ASSEMBLED_SYSTEM_MANIFEST): $(FULL_SYSTEMIMAGE_DEPS)
|
|
||||||
@echo "Verifying system VINTF manifest."
|
|
||||||
PRODUCT_ENFORCE_VINTF_MANIFEST=$(PRODUCT_ENFORCE_VINTF_MANIFEST) \
|
|
||||||
$(HOST_OUT_EXECUTABLES)/assemble_vintf \
|
|
||||||
-c $(BUILT_VENDOR_MATRIX) \
|
|
||||||
-i $(BUILT_SYSTEM_MANIFEST) \
|
|
||||||
$$([ -d $(TARGET_OUT)/etc/vintf/manifest ] && \
|
|
||||||
find $(TARGET_OUT)/etc/vintf/manifest -type f -name "*.xml" | \
|
|
||||||
sed "s/^/-i /" | tr '\n' ' ') -o $@
|
|
||||||
|
|
||||||
endif # BUILDING_SYSTEM_IMAGE
|
|
||||||
|
|
||||||
# -----------------------------------------------------------------
|
# -----------------------------------------------------------------
|
||||||
ifdef BUILDING_SYSTEM_IMAGE
|
ifdef BUILDING_SYSTEM_IMAGE
|
||||||
|
|
||||||
@@ -2279,7 +2256,6 @@ define build-systemimage-target
|
|||||||
exit 1 )
|
exit 1 )
|
||||||
endef
|
endef
|
||||||
|
|
||||||
$(BUILT_SYSTEMIMAGE): $(BUILT_ASSEMBLED_SYSTEM_MANIFEST)
|
|
||||||
$(BUILT_SYSTEMIMAGE): $(FULL_SYSTEMIMAGE_DEPS) $(INSTALLED_FILES_FILE) $(BUILD_IMAGE_SRCS)
|
$(BUILT_SYSTEMIMAGE): $(FULL_SYSTEMIMAGE_DEPS) $(INSTALLED_FILES_FILE) $(BUILD_IMAGE_SRCS)
|
||||||
$(call build-systemimage-target,$@)
|
$(call build-systemimage-target,$@)
|
||||||
|
|
||||||
@@ -2912,6 +2888,48 @@ INSTALLED_PRODUCTIMAGE_TARGET := $(PRODUCT_OUT)/product.img
|
|||||||
$(eval $(call copy-one-file,$(BOARD_PREBUILT_PRODUCTIMAGE),$(INSTALLED_PRODUCTIMAGE_TARGET)))
|
$(eval $(call copy-one-file,$(BOARD_PREBUILT_PRODUCTIMAGE),$(INSTALLED_PRODUCTIMAGE_TARGET)))
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
# -----------------------------------------------------------------
|
||||||
|
# Final Framework VINTF manifest including fragments. This is not assembled
|
||||||
|
# on the device because it depends on everything in a given device
|
||||||
|
# image which defines a vintf_fragment.
|
||||||
|
|
||||||
|
ifdef BUILDING_SYSTEM_IMAGE
|
||||||
|
|
||||||
|
ifndef BOARD_USES_PRODUCTIMAGE
|
||||||
|
# If no product image at all, check system manifest directly against device matrix.
|
||||||
|
check_framework_manifest := true
|
||||||
|
else ifdef BUILDING_PRODUCT_IMAGE
|
||||||
|
# If device has a product image, only check if the product image is built.
|
||||||
|
check_framework_manifest := true
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifeq ($(check_framework_manifest),true)
|
||||||
|
|
||||||
|
BUILT_ASSEMBLED_FRAMEWORK_MANIFEST := $(PRODUCT_OUT)/verified_assembled_framework_manifest.xml
|
||||||
|
$(BUILT_ASSEMBLED_FRAMEWORK_MANIFEST): $(HOST_OUT_EXECUTABLES)/assemble_vintf \
|
||||||
|
$(BUILT_VENDOR_MATRIX) \
|
||||||
|
$(BUILT_SYSTEM_MANIFEST) \
|
||||||
|
$(FULL_SYSTEMIMAGE_DEPS) \
|
||||||
|
$(BUILT_PRODUCT_MANIFEST) \
|
||||||
|
$(BUILT_PRODUCTIMAGE_TARGET)
|
||||||
|
@echo "Verifying framework VINTF manifest."
|
||||||
|
PRODUCT_ENFORCE_VINTF_MANIFEST=$(PRODUCT_ENFORCE_VINTF_MANIFEST) \
|
||||||
|
$(HOST_OUT_EXECUTABLES)/assemble_vintf \
|
||||||
|
-o $@ \
|
||||||
|
-c $(BUILT_VENDOR_MATRIX) \
|
||||||
|
-i $(BUILT_SYSTEM_MANIFEST) \
|
||||||
|
$(addprefix -i ,\
|
||||||
|
$(filter $(TARGET_OUT)/etc/vintf/manifest/%.xml,$(FULL_SYSTEMIMAGE_DEPS)) \
|
||||||
|
$(BUILT_PRODUCT_MANIFEST) \
|
||||||
|
$(filter $(TARGET_OUT_PRODUCT)/etc/vintf/manifest/%.xml,$(INTERNAL_PRODUCTIMAGE_FILES)))
|
||||||
|
|
||||||
|
droidcore: $(BUILT_ASSEMBLED_FRAMEWORK_MANIFEST)
|
||||||
|
|
||||||
|
endif # check_framework_manifest
|
||||||
|
check_framework_manifest :=
|
||||||
|
|
||||||
|
endif # BUILDING_SYSTEM_IMAGE
|
||||||
|
|
||||||
# -----------------------------------------------------------------
|
# -----------------------------------------------------------------
|
||||||
# product_services partition image
|
# product_services partition image
|
||||||
ifdef BUILDING_PRODUCT_SERVICES_IMAGE
|
ifdef BUILDING_PRODUCT_SERVICES_IMAGE
|
||||||
@@ -3804,7 +3822,7 @@ $(BUILT_TARGET_FILES_PACKAGE): \
|
|||||||
$(HOST_OUT_EXECUTABLES)/bsdiff \
|
$(HOST_OUT_EXECUTABLES)/bsdiff \
|
||||||
$(HOST_OUT_EXECUTABLES)/care_map_generator \
|
$(HOST_OUT_EXECUTABLES)/care_map_generator \
|
||||||
$(BUILD_IMAGE_SRCS) \
|
$(BUILD_IMAGE_SRCS) \
|
||||||
$(BUILT_ASSEMBLED_SYSTEM_MANIFEST) \
|
$(BUILT_ASSEMBLED_FRAMEWORK_MANIFEST) \
|
||||||
$(BUILT_ASSEMBLED_VENDOR_MANIFEST) \
|
$(BUILT_ASSEMBLED_VENDOR_MANIFEST) \
|
||||||
$(BUILT_SYSTEM_MATRIX) \
|
$(BUILT_SYSTEM_MATRIX) \
|
||||||
$(BUILT_VENDOR_MATRIX) \
|
$(BUILT_VENDOR_MATRIX) \
|
||||||
@@ -4151,8 +4169,8 @@ ifdef BUILDING_SYSTEM_OTHER_IMAGE
|
|||||||
endif
|
endif
|
||||||
@# Metadata for compatibility verification.
|
@# Metadata for compatibility verification.
|
||||||
$(hide) cp $(BUILT_SYSTEM_MATRIX) $(zip_root)/META/system_matrix.xml
|
$(hide) cp $(BUILT_SYSTEM_MATRIX) $(zip_root)/META/system_matrix.xml
|
||||||
ifdef BUILT_ASSEMBLED_SYSTEM_MANIFEST
|
ifdef BUILT_ASSEMBLED_FRAMEWORK_MANIFEST
|
||||||
$(hide) cp $(BUILT_ASSEMBLED_SYSTEM_MANIFEST) $(zip_root)/META/system_manifest.xml
|
$(hide) cp $(BUILT_ASSEMBLED_FRAMEWORK_MANIFEST) $(zip_root)/META/system_manifest.xml
|
||||||
endif
|
endif
|
||||||
ifdef BUILT_ASSEMBLED_VENDOR_MANIFEST
|
ifdef BUILT_ASSEMBLED_VENDOR_MANIFEST
|
||||||
$(hide) cp $(BUILT_ASSEMBLED_VENDOR_MANIFEST) $(zip_root)/META/vendor_manifest.xml
|
$(hide) cp $(BUILT_ASSEMBLED_VENDOR_MANIFEST) $(zip_root)/META/vendor_manifest.xml
|
||||||
|
@@ -19,3 +19,4 @@ PRODUCT_PACKAGES += \
|
|||||||
healthd \
|
healthd \
|
||||||
ModuleMetadata \
|
ModuleMetadata \
|
||||||
product_compatibility_matrix.xml \
|
product_compatibility_matrix.xml \
|
||||||
|
product_manifest.xml \
|
||||||
|
@@ -268,7 +268,7 @@ PRODUCT_PACKAGES += \
|
|||||||
|
|
||||||
# VINTF data for system image
|
# VINTF data for system image
|
||||||
PRODUCT_PACKAGES += \
|
PRODUCT_PACKAGES += \
|
||||||
framework_manifest.xml \
|
system_manifest.xml \
|
||||||
system_compatibility_matrix.xml \
|
system_compatibility_matrix.xml \
|
||||||
|
|
||||||
# Host tools to install
|
# Host tools to install
|
||||||
|
Reference in New Issue
Block a user