2017-12-14 00:01:19 +01:00
|
|
|
#
|
|
|
|
# Copyright (C) 2017 The Android Open Source Project
|
|
|
|
#
|
|
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
# you may not use this file except in compliance with the License.
|
|
|
|
# You may obtain a copy of the License at
|
|
|
|
#
|
|
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
#
|
|
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
# See the License for the specific language governing permissions and
|
|
|
|
# limitations under the License.
|
|
|
|
#
|
|
|
|
|
|
|
|
LOCAL_PATH := $(call my-dir)
|
|
|
|
|
2018-01-23 23:34:41 +01:00
|
|
|
BUILD_FRAMEWORK_COMPATIBILITY_MATRIX := $(LOCAL_PATH)/compatibility_matrix.mk
|
2019-01-22 23:27:50 +01:00
|
|
|
my_empty_manifest := $(LOCAL_PATH)/manifest.empty.xml
|
2018-01-23 23:34:41 +01:00
|
|
|
|
2019-01-22 23:27:50 +01:00
|
|
|
# System Compatibility Matrix (common to all FCM versions)
|
2017-12-14 00:01:19 +01:00
|
|
|
|
|
|
|
include $(CLEAR_VARS)
|
2018-04-25 23:36:00 +02:00
|
|
|
include $(LOCAL_PATH)/clear_vars.mk
|
2018-03-23 20:03:33 +01:00
|
|
|
LOCAL_MODULE := framework_compatibility_matrix.device.xml
|
2018-03-29 19:51:48 +02:00
|
|
|
LOCAL_MODULE_STEM := compatibility_matrix.device.xml
|
|
|
|
# define LOCAL_MODULE_CLASS for local-generated-sources-dir.
|
2018-03-23 20:03:33 +01:00
|
|
|
LOCAL_MODULE_CLASS := ETC
|
2019-01-22 23:27:50 +01:00
|
|
|
LOCAL_MODULE_RELATIVE_PATH := vintf
|
2018-03-23 20:03:33 +01:00
|
|
|
|
|
|
|
ifndef DEVICE_FRAMEWORK_COMPATIBILITY_MATRIX_FILE
|
|
|
|
LOCAL_SRC_FILES := compatibility_matrix.empty.xml
|
|
|
|
else
|
|
|
|
|
|
|
|
# DEVICE_FRAMEWORK_COMPATIBILITY_MATRIX_FILE specify an absolute path
|
|
|
|
LOCAL_GENERATED_SOURCES := $(DEVICE_FRAMEWORK_COMPATIBILITY_MATRIX_FILE)
|
|
|
|
|
|
|
|
# Enforce that DEVICE_FRAMEWORK_COMPATIBILITY_MATRIX_FILE does not specify required HALs
|
|
|
|
# by checking it against an empty manifest. But the empty manifest needs to contain
|
|
|
|
# BOARD_SEPOLICY_VERS to be compatible with DEVICE_FRAMEWORK_COMPATIBILITY_MATRIX_FILE.
|
|
|
|
my_gen_check_manifest := $(local-generated-sources-dir)/manifest.check.xml
|
2019-01-22 23:27:50 +01:00
|
|
|
$(my_gen_check_manifest): PRIVATE_SRC_FILE := $(my_empty_manifest)
|
|
|
|
$(my_gen_check_manifest): $(my_empty_manifest) $(HOST_OUT_EXECUTABLES)/assemble_vintf
|
2018-03-23 20:03:33 +01:00
|
|
|
BOARD_SEPOLICY_VERS=$(BOARD_SEPOLICY_VERS) \
|
2018-03-29 19:57:12 +02:00
|
|
|
VINTF_IGNORE_TARGET_FCM_VERSION=true \
|
2018-03-23 20:03:33 +01:00
|
|
|
$(HOST_OUT_EXECUTABLES)/assemble_vintf -i $(PRIVATE_SRC_FILE) -o $@
|
|
|
|
|
|
|
|
LOCAL_GEN_FILE_DEPENDENCIES += $(my_gen_check_manifest)
|
|
|
|
LOCAL_ASSEMBLE_VINTF_FLAGS += -c "$(my_gen_check_manifest)"
|
|
|
|
|
|
|
|
my_gen_check_manifest :=
|
|
|
|
|
|
|
|
endif # DEVICE_FRAMEWORK_COMPATIBILITY_MATRIX_FILE
|
|
|
|
|
2018-01-23 23:34:41 +01:00
|
|
|
LOCAL_ADD_VBMETA_VERSION := true
|
|
|
|
LOCAL_ASSEMBLE_VINTF_ENV_VARS := \
|
2018-02-02 21:47:48 +01:00
|
|
|
POLICYVERS \
|
|
|
|
PLATFORM_SEPOLICY_VERSION \
|
|
|
|
PLATFORM_SEPOLICY_COMPAT_VERSIONS
|
2017-12-14 00:01:19 +01:00
|
|
|
|
2018-01-23 23:34:41 +01:00
|
|
|
include $(BUILD_FRAMEWORK_COMPATIBILITY_MATRIX)
|
2017-12-14 00:01:19 +01:00
|
|
|
|
2019-01-22 23:27:50 +01:00
|
|
|
# Product Compatibility Matrix
|
|
|
|
|
|
|
|
include $(CLEAR_VARS)
|
|
|
|
include $(LOCAL_PATH)/clear_vars.mk
|
|
|
|
LOCAL_MODULE := product_compatibility_matrix.xml
|
|
|
|
|
|
|
|
ifndef DEVICE_PRODUCT_COMPATIBILITY_MATRIX_FILE
|
|
|
|
my_framework_matrix_deps :=
|
|
|
|
include $(BUILD_PHONY_PACKAGE)
|
|
|
|
else # DEVICE_PRODUCT_COMPATIBILITY_MATRIX_FILE
|
|
|
|
|
|
|
|
LOCAL_MODULE_STEM := compatibility_matrix.xml
|
|
|
|
LOCAL_PRODUCT_MODULE := true
|
|
|
|
LOCAL_MODULE_CLASS := ETC
|
|
|
|
LOCAL_MODULE_RELATIVE_PATH := vintf
|
|
|
|
|
|
|
|
# DEVICE_PRODUCT_COMPATIBILITY_MATRIX_FILE specify an absolute path
|
|
|
|
LOCAL_GENERATED_SOURCES := $(DEVICE_PRODUCT_COMPATIBILITY_MATRIX_FILE)
|
|
|
|
|
|
|
|
# Enforce that DEVICE_PRODUCT_COMPATIBILITY_MATRIX_FILE does not specify required HALs
|
|
|
|
# by checking it against an empty manifest.
|
|
|
|
LOCAL_GEN_FILE_DEPENDENCIES += $(my_empty_manifest)
|
|
|
|
LOCAL_ASSEMBLE_VINTF_FLAGS += -c "$(my_empty_manifest)"
|
|
|
|
|
|
|
|
my_framework_matrix_deps := $(LOCAL_MODULE)
|
|
|
|
|
|
|
|
include $(BUILD_FRAMEWORK_COMPATIBILITY_MATRIX)
|
|
|
|
|
|
|
|
endif # DEVICE_PRODUCT_COMPATIBILITY_MATRIX_FILE
|
|
|
|
|
2018-06-12 03:07:53 +02:00
|
|
|
my_system_matrix_deps := \
|
2017-12-14 00:01:19 +01:00
|
|
|
framework_compatibility_matrix.legacy.xml \
|
|
|
|
framework_compatibility_matrix.1.xml \
|
|
|
|
framework_compatibility_matrix.2.xml \
|
2018-04-03 18:38:41 +02:00
|
|
|
framework_compatibility_matrix.3.xml \
|
2018-04-30 22:02:02 +02:00
|
|
|
framework_compatibility_matrix.current.xml \
|
2019-01-22 23:27:50 +01:00
|
|
|
framework_compatibility_matrix.device.xml \
|
2018-06-12 03:07:53 +02:00
|
|
|
|
2019-01-22 23:27:50 +01:00
|
|
|
my_framework_matrix_deps += \
|
|
|
|
$(my_system_matrix_deps)
|
|
|
|
|
|
|
|
# Phony target that installs all system compatibility matrix files
|
2018-06-12 03:07:53 +02:00
|
|
|
include $(CLEAR_VARS)
|
2019-01-22 23:27:50 +01:00
|
|
|
LOCAL_MODULE := system_compatibility_matrix.xml
|
2018-06-12 03:07:53 +02:00
|
|
|
LOCAL_REQUIRED_MODULES := $(my_system_matrix_deps)
|
|
|
|
include $(BUILD_PHONY_PACKAGE)
|
|
|
|
|
2019-01-22 23:27:50 +01:00
|
|
|
# Phony target that installs all framework compatibility matrix files (system + product)
|
|
|
|
include $(CLEAR_VARS)
|
|
|
|
LOCAL_MODULE := framework_compatibility_matrix.xml
|
|
|
|
LOCAL_REQUIRED_MODULES := $(my_framework_matrix_deps)
|
|
|
|
include $(BUILD_PHONY_PACKAGE)
|
|
|
|
|
2018-08-13 21:33:42 +02:00
|
|
|
# Final Framework Compatibility Matrix for OTA
|
2018-06-12 03:07:53 +02:00
|
|
|
include $(CLEAR_VARS)
|
|
|
|
include $(LOCAL_PATH)/clear_vars.mk
|
|
|
|
LOCAL_MODULE := verified_assembled_system_matrix.xml
|
|
|
|
LOCAL_MODULE_PATH := $(PRODUCT_OUT)
|
2019-01-22 23:27:50 +01:00
|
|
|
LOCAL_REQUIRED_MODULES := $(my_framework_matrix_deps)
|
2018-01-23 23:34:41 +01:00
|
|
|
LOCAL_GENERATED_SOURCES := $(call module-installed-files,$(LOCAL_REQUIRED_MODULES))
|
2018-08-13 21:33:42 +02:00
|
|
|
LOCAL_ADD_VBMETA_VERSION_OVERRIDE := true
|
2017-12-14 00:01:19 +01:00
|
|
|
|
|
|
|
ifdef BUILT_VENDOR_MANIFEST
|
2018-01-23 23:34:41 +01:00
|
|
|
LOCAL_GEN_FILE_DEPENDENCIES += $(BUILT_VENDOR_MANIFEST)
|
|
|
|
LOCAL_ASSEMBLE_VINTF_FLAGS += -c "$(BUILT_VENDOR_MANIFEST)"
|
2017-12-14 00:01:19 +01:00
|
|
|
endif
|
|
|
|
|
2018-07-26 20:42:17 +02:00
|
|
|
ifneq ($(PRODUCT_OTA_ENFORCE_VINTF_KERNEL_REQUIREMENTS),true)
|
|
|
|
LOCAL_ASSEMBLE_VINTF_FLAGS += --no-kernel-requirements
|
|
|
|
endif
|
|
|
|
|
2018-01-23 23:34:41 +01:00
|
|
|
include $(BUILD_FRAMEWORK_COMPATIBILITY_MATRIX)
|
2018-05-01 18:59:32 +02:00
|
|
|
BUILT_SYSTEM_MATRIX := $(LOCAL_BUILT_MODULE)
|
2018-01-23 23:34:41 +01:00
|
|
|
|
2018-06-12 03:07:53 +02:00
|
|
|
my_system_matrix_deps :=
|
2019-01-22 23:27:50 +01:00
|
|
|
my_framework_matrix_deps :=
|
|
|
|
my_empty_manifest :=
|
2018-01-23 23:34:41 +01:00
|
|
|
BUILD_FRAMEWORK_COMPATIBILITY_MATRIX :=
|