blob: 6be69300236baa647a6d6fc069cc371e00e0391b [file] [log] [blame]
Yifan Hong2d8442c2017-12-13 15:01:19 -08001#
2# Copyright (C) 2017 The Android Open Source Project
3#
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8# http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
15#
16
17LOCAL_PATH := $(call my-dir)
18
Yifan Hong44c9b2e2018-01-23 14:34:41 -080019BUILD_FRAMEWORK_COMPATIBILITY_MATRIX := $(LOCAL_PATH)/compatibility_matrix.mk
20
Yifan Hong44c9b2e2018-01-23 14:34:41 -080021# Framework Compatibility Matrix (common to all FCM versions)
22
Yifan Hong2d8442c2017-12-13 15:01:19 -080023include $(CLEAR_VARS)
Yifan Hong366101c2018-04-25 14:36:00 -070024include $(LOCAL_PATH)/clear_vars.mk
Yifan Hong13df6282018-03-23 12:03:33 -070025LOCAL_MODULE := framework_compatibility_matrix.device.xml
Yifan Hong37ad8c42018-03-29 10:51:48 -070026LOCAL_MODULE_STEM := compatibility_matrix.device.xml
27# define LOCAL_MODULE_CLASS for local-generated-sources-dir.
Yifan Hong13df6282018-03-23 12:03:33 -070028LOCAL_MODULE_CLASS := ETC
29
30ifndef DEVICE_FRAMEWORK_COMPATIBILITY_MATRIX_FILE
31LOCAL_SRC_FILES := compatibility_matrix.empty.xml
32else
33
34# DEVICE_FRAMEWORK_COMPATIBILITY_MATRIX_FILE specify an absolute path
35LOCAL_GENERATED_SOURCES := $(DEVICE_FRAMEWORK_COMPATIBILITY_MATRIX_FILE)
36
37# Enforce that DEVICE_FRAMEWORK_COMPATIBILITY_MATRIX_FILE does not specify required HALs
38# by checking it against an empty manifest. But the empty manifest needs to contain
39# BOARD_SEPOLICY_VERS to be compatible with DEVICE_FRAMEWORK_COMPATIBILITY_MATRIX_FILE.
40my_manifest_src_file := $(LOCAL_PATH)/manifest.empty.xml
41my_gen_check_manifest := $(local-generated-sources-dir)/manifest.check.xml
42$(my_gen_check_manifest): PRIVATE_SRC_FILE := $(my_manifest_src_file)
43$(my_gen_check_manifest): $(my_manifest_src_file) $(HOST_OUT_EXECUTABLES)/assemble_vintf
44 BOARD_SEPOLICY_VERS=$(BOARD_SEPOLICY_VERS) \
Yifan Hongb2a83d12018-03-29 10:57:12 -070045 VINTF_IGNORE_TARGET_FCM_VERSION=true \
Yifan Hong13df6282018-03-23 12:03:33 -070046 $(HOST_OUT_EXECUTABLES)/assemble_vintf -i $(PRIVATE_SRC_FILE) -o $@
47
48LOCAL_GEN_FILE_DEPENDENCIES += $(my_gen_check_manifest)
49LOCAL_ASSEMBLE_VINTF_FLAGS += -c "$(my_gen_check_manifest)"
50
51my_gen_check_manifest :=
52my_manifest_src_file :=
53
54endif # DEVICE_FRAMEWORK_COMPATIBILITY_MATRIX_FILE
55
Yifan Hong44c9b2e2018-01-23 14:34:41 -080056LOCAL_ADD_VBMETA_VERSION := true
57LOCAL_ASSEMBLE_VINTF_ENV_VARS := \
Yifan Hongb426af32018-02-02 12:47:48 -080058 POLICYVERS \
59 PLATFORM_SEPOLICY_VERSION \
60 PLATFORM_SEPOLICY_COMPAT_VERSIONS
Yifan Hong2d8442c2017-12-13 15:01:19 -080061
Yifan Hong44c9b2e2018-01-23 14:34:41 -080062include $(BUILD_FRAMEWORK_COMPATIBILITY_MATRIX)
Yifan Hong2d8442c2017-12-13 15:01:19 -080063
Yifan Hong774c2bf2018-06-11 18:07:53 -070064my_system_matrix_deps := \
Yifan Hong2d8442c2017-12-13 15:01:19 -080065 framework_compatibility_matrix.legacy.xml \
66 framework_compatibility_matrix.1.xml \
67 framework_compatibility_matrix.2.xml \
Steven Moreland92ea6542018-04-03 09:38:41 -070068 framework_compatibility_matrix.3.xml \
Steven Moreland3c86d9a2018-04-30 13:02:02 -070069 framework_compatibility_matrix.current.xml \
Yifan Hong13df6282018-03-23 12:03:33 -070070 framework_compatibility_matrix.device.xml
Yifan Hong774c2bf2018-06-11 18:07:53 -070071
72# Phony target that installs all framework compatibility matrix files
73include $(CLEAR_VARS)
74LOCAL_MODULE := framework_compatibility_matrix.xml
75LOCAL_REQUIRED_MODULES := $(my_system_matrix_deps)
76include $(BUILD_PHONY_PACKAGE)
77
Yifan Hong53891ac2018-08-13 12:33:42 -070078# Final Framework Compatibility Matrix for OTA
Yifan Hong774c2bf2018-06-11 18:07:53 -070079include $(CLEAR_VARS)
80include $(LOCAL_PATH)/clear_vars.mk
81LOCAL_MODULE := verified_assembled_system_matrix.xml
82LOCAL_MODULE_PATH := $(PRODUCT_OUT)
83LOCAL_REQUIRED_MODULES := $(my_system_matrix_deps)
Yifan Hong44c9b2e2018-01-23 14:34:41 -080084LOCAL_GENERATED_SOURCES := $(call module-installed-files,$(LOCAL_REQUIRED_MODULES))
Yifan Hong53891ac2018-08-13 12:33:42 -070085LOCAL_ADD_VBMETA_VERSION_OVERRIDE := true
Yifan Hong2d8442c2017-12-13 15:01:19 -080086
87ifdef BUILT_VENDOR_MANIFEST
Yifan Hong44c9b2e2018-01-23 14:34:41 -080088LOCAL_GEN_FILE_DEPENDENCIES += $(BUILT_VENDOR_MANIFEST)
89LOCAL_ASSEMBLE_VINTF_FLAGS += -c "$(BUILT_VENDOR_MANIFEST)"
Yifan Hong2d8442c2017-12-13 15:01:19 -080090endif
91
Yifan Hongf529c342018-07-26 11:42:17 -070092ifneq ($(PRODUCT_OTA_ENFORCE_VINTF_KERNEL_REQUIREMENTS),true)
93LOCAL_ASSEMBLE_VINTF_FLAGS += --no-kernel-requirements
94endif
95
Yifan Hong44c9b2e2018-01-23 14:34:41 -080096include $(BUILD_FRAMEWORK_COMPATIBILITY_MATRIX)
Steven Moreland515324a2018-05-01 09:59:32 -070097BUILT_SYSTEM_MATRIX := $(LOCAL_BUILT_MODULE)
Yifan Hong44c9b2e2018-01-23 14:34:41 -080098
Yifan Hong774c2bf2018-06-11 18:07:53 -070099my_system_matrix_deps :=
Yifan Hong44c9b2e2018-01-23 14:34:41 -0800100BUILD_FRAMEWORK_COMPATIBILITY_MATRIX :=