Yifan Hong | 2d8442c | 2017-12-13 15:01:19 -0800 | [diff] [blame] | 1 | # |
| 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 | |
| 17 | LOCAL_PATH := $(call my-dir) |
| 18 | |
Yifan Hong | 44c9b2e | 2018-01-23 14:34:41 -0800 | [diff] [blame] | 19 | BUILD_FRAMEWORK_COMPATIBILITY_MATRIX := $(LOCAL_PATH)/compatibility_matrix.mk |
Yifan Hong | fee037a | 2019-01-22 14:27:50 -0800 | [diff] [blame] | 20 | my_empty_manifest := $(LOCAL_PATH)/manifest.empty.xml |
Yifan Hong | 44c9b2e | 2018-01-23 14:34:41 -0800 | [diff] [blame] | 21 | |
Yifan Hong | fee037a | 2019-01-22 14:27:50 -0800 | [diff] [blame] | 22 | # System Compatibility Matrix (common to all FCM versions) |
Yifan Hong | 44c9b2e | 2018-01-23 14:34:41 -0800 | [diff] [blame] | 23 | |
Yifan Hong | 2d8442c | 2017-12-13 15:01:19 -0800 | [diff] [blame] | 24 | include $(CLEAR_VARS) |
Yifan Hong | 366101c | 2018-04-25 14:36:00 -0700 | [diff] [blame] | 25 | include $(LOCAL_PATH)/clear_vars.mk |
Yifan Hong | 13df628 | 2018-03-23 12:03:33 -0700 | [diff] [blame] | 26 | LOCAL_MODULE := framework_compatibility_matrix.device.xml |
Yifan Hong | 37ad8c4 | 2018-03-29 10:51:48 -0700 | [diff] [blame] | 27 | LOCAL_MODULE_STEM := compatibility_matrix.device.xml |
| 28 | # define LOCAL_MODULE_CLASS for local-generated-sources-dir. |
Yifan Hong | 13df628 | 2018-03-23 12:03:33 -0700 | [diff] [blame] | 29 | LOCAL_MODULE_CLASS := ETC |
Yifan Hong | fee037a | 2019-01-22 14:27:50 -0800 | [diff] [blame] | 30 | LOCAL_MODULE_RELATIVE_PATH := vintf |
Yifan Hong | 13df628 | 2018-03-23 12:03:33 -0700 | [diff] [blame] | 31 | |
| 32 | ifndef DEVICE_FRAMEWORK_COMPATIBILITY_MATRIX_FILE |
| 33 | LOCAL_SRC_FILES := compatibility_matrix.empty.xml |
| 34 | else |
| 35 | |
| 36 | # DEVICE_FRAMEWORK_COMPATIBILITY_MATRIX_FILE specify an absolute path |
| 37 | LOCAL_GENERATED_SOURCES := $(DEVICE_FRAMEWORK_COMPATIBILITY_MATRIX_FILE) |
| 38 | |
| 39 | # Enforce that DEVICE_FRAMEWORK_COMPATIBILITY_MATRIX_FILE does not specify required HALs |
| 40 | # by checking it against an empty manifest. But the empty manifest needs to contain |
| 41 | # BOARD_SEPOLICY_VERS to be compatible with DEVICE_FRAMEWORK_COMPATIBILITY_MATRIX_FILE. |
Yifan Hong | 13df628 | 2018-03-23 12:03:33 -0700 | [diff] [blame] | 42 | my_gen_check_manifest := $(local-generated-sources-dir)/manifest.check.xml |
Yifan Hong | fee037a | 2019-01-22 14:27:50 -0800 | [diff] [blame] | 43 | $(my_gen_check_manifest): PRIVATE_SRC_FILE := $(my_empty_manifest) |
| 44 | $(my_gen_check_manifest): $(my_empty_manifest) $(HOST_OUT_EXECUTABLES)/assemble_vintf |
Yifan Hong | 13df628 | 2018-03-23 12:03:33 -0700 | [diff] [blame] | 45 | BOARD_SEPOLICY_VERS=$(BOARD_SEPOLICY_VERS) \ |
Yifan Hong | b2a83d1 | 2018-03-29 10:57:12 -0700 | [diff] [blame] | 46 | VINTF_IGNORE_TARGET_FCM_VERSION=true \ |
Yifan Hong | 13df628 | 2018-03-23 12:03:33 -0700 | [diff] [blame] | 47 | $(HOST_OUT_EXECUTABLES)/assemble_vintf -i $(PRIVATE_SRC_FILE) -o $@ |
| 48 | |
| 49 | LOCAL_GEN_FILE_DEPENDENCIES += $(my_gen_check_manifest) |
| 50 | LOCAL_ASSEMBLE_VINTF_FLAGS += -c "$(my_gen_check_manifest)" |
| 51 | |
| 52 | my_gen_check_manifest := |
Yifan Hong | 13df628 | 2018-03-23 12:03:33 -0700 | [diff] [blame] | 53 | |
| 54 | endif # DEVICE_FRAMEWORK_COMPATIBILITY_MATRIX_FILE |
| 55 | |
Yifan Hong | 44c9b2e | 2018-01-23 14:34:41 -0800 | [diff] [blame] | 56 | LOCAL_ADD_VBMETA_VERSION := true |
| 57 | LOCAL_ASSEMBLE_VINTF_ENV_VARS := \ |
Yifan Hong | b426af3 | 2018-02-02 12:47:48 -0800 | [diff] [blame] | 58 | POLICYVERS \ |
| 59 | PLATFORM_SEPOLICY_VERSION \ |
| 60 | PLATFORM_SEPOLICY_COMPAT_VERSIONS |
Yifan Hong | 2d8442c | 2017-12-13 15:01:19 -0800 | [diff] [blame] | 61 | |
Yifan Hong | 44c9b2e | 2018-01-23 14:34:41 -0800 | [diff] [blame] | 62 | include $(BUILD_FRAMEWORK_COMPATIBILITY_MATRIX) |
Yifan Hong | 2d8442c | 2017-12-13 15:01:19 -0800 | [diff] [blame] | 63 | |
Yifan Hong | fee037a | 2019-01-22 14:27:50 -0800 | [diff] [blame] | 64 | # Product Compatibility Matrix |
| 65 | |
| 66 | include $(CLEAR_VARS) |
| 67 | include $(LOCAL_PATH)/clear_vars.mk |
| 68 | LOCAL_MODULE := product_compatibility_matrix.xml |
| 69 | |
| 70 | ifndef DEVICE_PRODUCT_COMPATIBILITY_MATRIX_FILE |
| 71 | my_framework_matrix_deps := |
| 72 | include $(BUILD_PHONY_PACKAGE) |
| 73 | else # DEVICE_PRODUCT_COMPATIBILITY_MATRIX_FILE |
| 74 | |
| 75 | LOCAL_MODULE_STEM := compatibility_matrix.xml |
| 76 | LOCAL_PRODUCT_MODULE := true |
| 77 | LOCAL_MODULE_CLASS := ETC |
| 78 | LOCAL_MODULE_RELATIVE_PATH := vintf |
| 79 | |
| 80 | # DEVICE_PRODUCT_COMPATIBILITY_MATRIX_FILE specify an absolute path |
| 81 | LOCAL_GENERATED_SOURCES := $(DEVICE_PRODUCT_COMPATIBILITY_MATRIX_FILE) |
| 82 | |
| 83 | # Enforce that DEVICE_PRODUCT_COMPATIBILITY_MATRIX_FILE does not specify required HALs |
| 84 | # by checking it against an empty manifest. |
| 85 | LOCAL_GEN_FILE_DEPENDENCIES += $(my_empty_manifest) |
| 86 | LOCAL_ASSEMBLE_VINTF_FLAGS += -c "$(my_empty_manifest)" |
| 87 | |
| 88 | my_framework_matrix_deps := $(LOCAL_MODULE) |
| 89 | |
| 90 | include $(BUILD_FRAMEWORK_COMPATIBILITY_MATRIX) |
| 91 | |
| 92 | endif # DEVICE_PRODUCT_COMPATIBILITY_MATRIX_FILE |
| 93 | |
Yifan Hong | 774c2bf | 2018-06-11 18:07:53 -0700 | [diff] [blame] | 94 | my_system_matrix_deps := \ |
Yifan Hong | 2d8442c | 2017-12-13 15:01:19 -0800 | [diff] [blame] | 95 | framework_compatibility_matrix.legacy.xml \ |
| 96 | framework_compatibility_matrix.1.xml \ |
| 97 | framework_compatibility_matrix.2.xml \ |
Steven Moreland | 92ea654 | 2018-04-03 09:38:41 -0700 | [diff] [blame] | 98 | framework_compatibility_matrix.3.xml \ |
Steven Moreland | 86eb7fc | 2019-04-09 14:08:40 -0700 | [diff] [blame] | 99 | framework_compatibility_matrix.4.xml \ |
Yifan Hong | fee037a | 2019-01-22 14:27:50 -0800 | [diff] [blame] | 100 | framework_compatibility_matrix.device.xml \ |
Yifan Hong | 774c2bf | 2018-06-11 18:07:53 -0700 | [diff] [blame] | 101 | |
Yifan Hong | fee037a | 2019-01-22 14:27:50 -0800 | [diff] [blame] | 102 | my_framework_matrix_deps += \ |
| 103 | $(my_system_matrix_deps) |
| 104 | |
| 105 | # Phony target that installs all system compatibility matrix files |
| 106 | include $(CLEAR_VARS) |
| 107 | LOCAL_MODULE := system_compatibility_matrix.xml |
| 108 | LOCAL_REQUIRED_MODULES := $(my_system_matrix_deps) |
| 109 | include $(BUILD_PHONY_PACKAGE) |
| 110 | |
| 111 | # Phony target that installs all framework compatibility matrix files (system + product) |
Yifan Hong | 774c2bf | 2018-06-11 18:07:53 -0700 | [diff] [blame] | 112 | include $(CLEAR_VARS) |
| 113 | LOCAL_MODULE := framework_compatibility_matrix.xml |
Yifan Hong | fee037a | 2019-01-22 14:27:50 -0800 | [diff] [blame] | 114 | LOCAL_REQUIRED_MODULES := $(my_framework_matrix_deps) |
Yifan Hong | 774c2bf | 2018-06-11 18:07:53 -0700 | [diff] [blame] | 115 | include $(BUILD_PHONY_PACKAGE) |
| 116 | |
Yifan Hong | 53891ac | 2018-08-13 12:33:42 -0700 | [diff] [blame] | 117 | # Final Framework Compatibility Matrix for OTA |
Yifan Hong | 774c2bf | 2018-06-11 18:07:53 -0700 | [diff] [blame] | 118 | include $(CLEAR_VARS) |
| 119 | include $(LOCAL_PATH)/clear_vars.mk |
| 120 | LOCAL_MODULE := verified_assembled_system_matrix.xml |
| 121 | LOCAL_MODULE_PATH := $(PRODUCT_OUT) |
Yifan Hong | fee037a | 2019-01-22 14:27:50 -0800 | [diff] [blame] | 122 | LOCAL_REQUIRED_MODULES := $(my_framework_matrix_deps) |
Yifan Hong | 44c9b2e | 2018-01-23 14:34:41 -0800 | [diff] [blame] | 123 | LOCAL_GENERATED_SOURCES := $(call module-installed-files,$(LOCAL_REQUIRED_MODULES)) |
Yifan Hong | 53891ac | 2018-08-13 12:33:42 -0700 | [diff] [blame] | 124 | LOCAL_ADD_VBMETA_VERSION_OVERRIDE := true |
Yifan Hong | 2d8442c | 2017-12-13 15:01:19 -0800 | [diff] [blame] | 125 | |
| 126 | ifdef BUILT_VENDOR_MANIFEST |
Yifan Hong | 44c9b2e | 2018-01-23 14:34:41 -0800 | [diff] [blame] | 127 | LOCAL_GEN_FILE_DEPENDENCIES += $(BUILT_VENDOR_MANIFEST) |
| 128 | LOCAL_ASSEMBLE_VINTF_FLAGS += -c "$(BUILT_VENDOR_MANIFEST)" |
Yifan Hong | 2d8442c | 2017-12-13 15:01:19 -0800 | [diff] [blame] | 129 | endif |
| 130 | |
Yifan Hong | f529c34 | 2018-07-26 11:42:17 -0700 | [diff] [blame] | 131 | ifneq ($(PRODUCT_OTA_ENFORCE_VINTF_KERNEL_REQUIREMENTS),true) |
| 132 | LOCAL_ASSEMBLE_VINTF_FLAGS += --no-kernel-requirements |
| 133 | endif |
| 134 | |
Yifan Hong | 44c9b2e | 2018-01-23 14:34:41 -0800 | [diff] [blame] | 135 | include $(BUILD_FRAMEWORK_COMPATIBILITY_MATRIX) |
Steven Moreland | 515324a | 2018-05-01 09:59:32 -0700 | [diff] [blame] | 136 | BUILT_SYSTEM_MATRIX := $(LOCAL_BUILT_MODULE) |
Yifan Hong | 44c9b2e | 2018-01-23 14:34:41 -0800 | [diff] [blame] | 137 | |
Yifan Hong | 774c2bf | 2018-06-11 18:07:53 -0700 | [diff] [blame] | 138 | my_system_matrix_deps := |
Yifan Hong | fee037a | 2019-01-22 14:27:50 -0800 | [diff] [blame] | 139 | my_framework_matrix_deps := |
| 140 | my_empty_manifest := |
Yifan Hong | 44c9b2e | 2018-01-23 14:34:41 -0800 | [diff] [blame] | 141 | BUILD_FRAMEWORK_COMPATIBILITY_MATRIX := |