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 |
| 20 | |
Yifan Hong | 366101c | 2018-04-25 14:36:00 -0700 | [diff] [blame] | 21 | my_kernel_config_data := kernel/configs |
Yifan Hong | 44c9b2e | 2018-01-23 14:34:41 -0800 | [diff] [blame] | 22 | |
Yifan Hong | 2d8442c | 2017-12-13 15:01:19 -0800 | [diff] [blame] | 23 | # Install all compatibility_matrix.*.xml to /system/etc/vintf |
| 24 | |
| 25 | include $(CLEAR_VARS) |
Yifan Hong | 366101c | 2018-04-25 14:36:00 -0700 | [diff] [blame] | 26 | include $(LOCAL_PATH)/clear_vars.mk |
Yifan Hong | 37ad8c4 | 2018-03-29 10:51:48 -0700 | [diff] [blame] | 27 | LOCAL_MODULE := framework_compatibility_matrix.legacy.xml |
Yifan Hong | 2d8442c | 2017-12-13 15:01:19 -0800 | [diff] [blame] | 28 | LOCAL_MODULE_STEM := compatibility_matrix.legacy.xml |
| 29 | LOCAL_SRC_FILES := $(LOCAL_MODULE_STEM) |
Yifan Hong | 366101c | 2018-04-25 14:36:00 -0700 | [diff] [blame] | 30 | LOCAL_KERNEL_CONFIG_DATA_PATHS := \ |
| 31 | 3.18.0:$(my_kernel_config_data)/o/android-3.18 \ |
| 32 | 4.4.0:$(my_kernel_config_data)/o/android-4.4 \ |
| 33 | 4.9.0:$(my_kernel_config_data)/o/android-4.9 \ |
Yifan Hong | 26e3a58 | 2018-04-12 14:50:09 -0700 | [diff] [blame] | 34 | |
Yifan Hong | 44c9b2e | 2018-01-23 14:34:41 -0800 | [diff] [blame] | 35 | include $(BUILD_FRAMEWORK_COMPATIBILITY_MATRIX) |
Yifan Hong | 2d8442c | 2017-12-13 15:01:19 -0800 | [diff] [blame] | 36 | |
| 37 | include $(CLEAR_VARS) |
Yifan Hong | 366101c | 2018-04-25 14:36:00 -0700 | [diff] [blame] | 38 | include $(LOCAL_PATH)/clear_vars.mk |
Yifan Hong | 37ad8c4 | 2018-03-29 10:51:48 -0700 | [diff] [blame] | 39 | LOCAL_MODULE := framework_compatibility_matrix.1.xml |
Yifan Hong | 2d8442c | 2017-12-13 15:01:19 -0800 | [diff] [blame] | 40 | LOCAL_MODULE_STEM := compatibility_matrix.1.xml |
| 41 | LOCAL_SRC_FILES := $(LOCAL_MODULE_STEM) |
Yifan Hong | 366101c | 2018-04-25 14:36:00 -0700 | [diff] [blame] | 42 | LOCAL_KERNEL_CONFIG_DATA_PATHS := \ |
| 43 | 3.18.0:$(my_kernel_config_data)/o/android-3.18 \ |
| 44 | 4.4.0:$(my_kernel_config_data)/o/android-4.4 \ |
| 45 | 4.9.0:$(my_kernel_config_data)/o/android-4.9 \ |
Yifan Hong | 26e3a58 | 2018-04-12 14:50:09 -0700 | [diff] [blame] | 46 | |
Yifan Hong | 44c9b2e | 2018-01-23 14:34:41 -0800 | [diff] [blame] | 47 | include $(BUILD_FRAMEWORK_COMPATIBILITY_MATRIX) |
Yifan Hong | 2d8442c | 2017-12-13 15:01:19 -0800 | [diff] [blame] | 48 | |
| 49 | include $(CLEAR_VARS) |
Yifan Hong | 366101c | 2018-04-25 14:36:00 -0700 | [diff] [blame] | 50 | include $(LOCAL_PATH)/clear_vars.mk |
Yifan Hong | 37ad8c4 | 2018-03-29 10:51:48 -0700 | [diff] [blame] | 51 | LOCAL_MODULE := framework_compatibility_matrix.2.xml |
Yifan Hong | 2d8442c | 2017-12-13 15:01:19 -0800 | [diff] [blame] | 52 | LOCAL_MODULE_STEM := compatibility_matrix.2.xml |
| 53 | LOCAL_SRC_FILES := $(LOCAL_MODULE_STEM) |
Yifan Hong | 366101c | 2018-04-25 14:36:00 -0700 | [diff] [blame] | 54 | LOCAL_KERNEL_CONFIG_DATA_PATHS := \ |
| 55 | 3.18.0:$(my_kernel_config_data)/o-mr1/android-3.18 \ |
| 56 | 4.4.0:$(my_kernel_config_data)/o-mr1/android-4.4 \ |
| 57 | 4.9.0:$(my_kernel_config_data)/o-mr1/android-4.9 \ |
Yifan Hong | 44c9b2e | 2018-01-23 14:34:41 -0800 | [diff] [blame] | 58 | |
Yifan Hong | 26e3a58 | 2018-04-12 14:50:09 -0700 | [diff] [blame] | 59 | include $(BUILD_FRAMEWORK_COMPATIBILITY_MATRIX) |
Yifan Hong | 2d8442c | 2017-12-13 15:01:19 -0800 | [diff] [blame] | 60 | |
| 61 | include $(CLEAR_VARS) |
Yifan Hong | 366101c | 2018-04-25 14:36:00 -0700 | [diff] [blame] | 62 | include $(LOCAL_PATH)/clear_vars.mk |
Steven Moreland | 92ea654 | 2018-04-03 09:38:41 -0700 | [diff] [blame] | 63 | LOCAL_MODULE := framework_compatibility_matrix.3.xml |
| 64 | LOCAL_MODULE_STEM := compatibility_matrix.3.xml |
Yifan Hong | 2d8442c | 2017-12-13 15:01:19 -0800 | [diff] [blame] | 65 | LOCAL_SRC_FILES := $(LOCAL_MODULE_STEM) |
Yifan Hong | 366101c | 2018-04-25 14:36:00 -0700 | [diff] [blame] | 66 | LOCAL_KERNEL_CONFIG_DATA_PATHS := \ |
| 67 | 4.4.0:$(my_kernel_config_data)/android-4.4 \ |
| 68 | 4.9.0:$(my_kernel_config_data)/android-4.9 \ |
| 69 | 4.14.0:$(my_kernel_config_data)/android-4.14 \ |
Yifan Hong | 26e3a58 | 2018-04-12 14:50:09 -0700 | [diff] [blame] | 70 | |
Yifan Hong | 44c9b2e | 2018-01-23 14:34:41 -0800 | [diff] [blame] | 71 | include $(BUILD_FRAMEWORK_COMPATIBILITY_MATRIX) |
Yifan Hong | 2d8442c | 2017-12-13 15:01:19 -0800 | [diff] [blame] | 72 | |
Steven Moreland | 2d2e2d5 | 2018-04-30 13:02:02 -0700 | [diff] [blame^] | 73 | include $(CLEAR_VARS) |
| 74 | include $(LOCAL_PATH)/clear_vars.mk |
| 75 | LOCAL_MODULE := framework_compatibility_matrix.current.xml |
| 76 | LOCAL_MODULE_STEM := compatibility_matrix.current.xml |
| 77 | LOCAL_SRC_FILES := $(LOCAL_MODULE_STEM) |
| 78 | LOCAL_KERNEL_CONFIG_DATA_PATHS := \ |
| 79 | 4.4.0:$(my_kernel_config_data)/android-4.4 \ |
| 80 | 4.9.0:$(my_kernel_config_data)/android-4.9 \ |
| 81 | 4.14.0:$(my_kernel_config_data)/android-4.14 \ |
| 82 | |
| 83 | include $(BUILD_FRAMEWORK_COMPATIBILITY_MATRIX) |
| 84 | |
Yifan Hong | 366101c | 2018-04-25 14:36:00 -0700 | [diff] [blame] | 85 | my_kernel_config_data := |
| 86 | |
Yifan Hong | 44c9b2e | 2018-01-23 14:34:41 -0800 | [diff] [blame] | 87 | # Framework Compatibility Matrix (common to all FCM versions) |
| 88 | |
Yifan Hong | 2d8442c | 2017-12-13 15:01:19 -0800 | [diff] [blame] | 89 | include $(CLEAR_VARS) |
Yifan Hong | 366101c | 2018-04-25 14:36:00 -0700 | [diff] [blame] | 90 | include $(LOCAL_PATH)/clear_vars.mk |
Yifan Hong | 13df628 | 2018-03-23 12:03:33 -0700 | [diff] [blame] | 91 | LOCAL_MODULE := framework_compatibility_matrix.device.xml |
Yifan Hong | 37ad8c4 | 2018-03-29 10:51:48 -0700 | [diff] [blame] | 92 | LOCAL_MODULE_STEM := compatibility_matrix.device.xml |
| 93 | # define LOCAL_MODULE_CLASS for local-generated-sources-dir. |
Yifan Hong | 13df628 | 2018-03-23 12:03:33 -0700 | [diff] [blame] | 94 | LOCAL_MODULE_CLASS := ETC |
| 95 | |
| 96 | ifndef DEVICE_FRAMEWORK_COMPATIBILITY_MATRIX_FILE |
| 97 | LOCAL_SRC_FILES := compatibility_matrix.empty.xml |
| 98 | else |
| 99 | |
| 100 | # DEVICE_FRAMEWORK_COMPATIBILITY_MATRIX_FILE specify an absolute path |
| 101 | LOCAL_GENERATED_SOURCES := $(DEVICE_FRAMEWORK_COMPATIBILITY_MATRIX_FILE) |
| 102 | |
| 103 | # Enforce that DEVICE_FRAMEWORK_COMPATIBILITY_MATRIX_FILE does not specify required HALs |
| 104 | # by checking it against an empty manifest. But the empty manifest needs to contain |
| 105 | # BOARD_SEPOLICY_VERS to be compatible with DEVICE_FRAMEWORK_COMPATIBILITY_MATRIX_FILE. |
| 106 | my_manifest_src_file := $(LOCAL_PATH)/manifest.empty.xml |
| 107 | my_gen_check_manifest := $(local-generated-sources-dir)/manifest.check.xml |
| 108 | $(my_gen_check_manifest): PRIVATE_SRC_FILE := $(my_manifest_src_file) |
| 109 | $(my_gen_check_manifest): $(my_manifest_src_file) $(HOST_OUT_EXECUTABLES)/assemble_vintf |
| 110 | BOARD_SEPOLICY_VERS=$(BOARD_SEPOLICY_VERS) \ |
Yifan Hong | b2a83d1 | 2018-03-29 10:57:12 -0700 | [diff] [blame] | 111 | VINTF_IGNORE_TARGET_FCM_VERSION=true \ |
Yifan Hong | 13df628 | 2018-03-23 12:03:33 -0700 | [diff] [blame] | 112 | $(HOST_OUT_EXECUTABLES)/assemble_vintf -i $(PRIVATE_SRC_FILE) -o $@ |
| 113 | |
| 114 | LOCAL_GEN_FILE_DEPENDENCIES += $(my_gen_check_manifest) |
| 115 | LOCAL_ASSEMBLE_VINTF_FLAGS += -c "$(my_gen_check_manifest)" |
| 116 | |
| 117 | my_gen_check_manifest := |
| 118 | my_manifest_src_file := |
| 119 | |
| 120 | endif # DEVICE_FRAMEWORK_COMPATIBILITY_MATRIX_FILE |
| 121 | |
Yifan Hong | 44c9b2e | 2018-01-23 14:34:41 -0800 | [diff] [blame] | 122 | LOCAL_ADD_VBMETA_VERSION := true |
| 123 | LOCAL_ASSEMBLE_VINTF_ENV_VARS := \ |
Yifan Hong | b426af3 | 2018-02-02 12:47:48 -0800 | [diff] [blame] | 124 | POLICYVERS \ |
| 125 | PLATFORM_SEPOLICY_VERSION \ |
| 126 | PLATFORM_SEPOLICY_COMPAT_VERSIONS |
Yifan Hong | 2d8442c | 2017-12-13 15:01:19 -0800 | [diff] [blame] | 127 | |
Yifan Hong | 4d6c4a9 | 2018-03-29 10:06:10 -0700 | [diff] [blame] | 128 | LOCAL_ASSEMBLE_VINTF_ENV_VARS_OVERRIDE := PRODUCT_ENFORCE_VINTF_MANIFEST=true |
| 129 | LOCAL_ASSEMBLE_VINTF_ERROR_MESSAGE := \ |
Yifan Hong | 13df628 | 2018-03-23 12:03:33 -0700 | [diff] [blame] | 130 | "Error: DEVICE_FRAMEWORK_COMPATIBILITY_MATRIX cannot contain required HALs." |
| 131 | |
Yifan Hong | 44c9b2e | 2018-01-23 14:34:41 -0800 | [diff] [blame] | 132 | include $(BUILD_FRAMEWORK_COMPATIBILITY_MATRIX) |
Yifan Hong | 2d8442c | 2017-12-13 15:01:19 -0800 | [diff] [blame] | 133 | |
| 134 | # Framework Compatibility Matrix |
Yifan Hong | 2d8442c | 2017-12-13 15:01:19 -0800 | [diff] [blame] | 135 | |
Yifan Hong | 44c9b2e | 2018-01-23 14:34:41 -0800 | [diff] [blame] | 136 | include $(CLEAR_VARS) |
Yifan Hong | 366101c | 2018-04-25 14:36:00 -0700 | [diff] [blame] | 137 | include $(LOCAL_PATH)/clear_vars.mk |
Yifan Hong | 44c9b2e | 2018-01-23 14:34:41 -0800 | [diff] [blame] | 138 | LOCAL_MODULE := framework_compatibility_matrix.xml |
| 139 | LOCAL_MODULE_STEM := compatibility_matrix.xml |
| 140 | LOCAL_MODULE_PATH := $(TARGET_OUT) |
Yifan Hong | 2d8442c | 2017-12-13 15:01:19 -0800 | [diff] [blame] | 141 | LOCAL_REQUIRED_MODULES := \ |
| 142 | framework_compatibility_matrix.legacy.xml \ |
| 143 | framework_compatibility_matrix.1.xml \ |
| 144 | framework_compatibility_matrix.2.xml \ |
Steven Moreland | 92ea654 | 2018-04-03 09:38:41 -0700 | [diff] [blame] | 145 | framework_compatibility_matrix.3.xml \ |
Steven Moreland | 2d2e2d5 | 2018-04-30 13:02:02 -0700 | [diff] [blame^] | 146 | framework_compatibility_matrix.current.xml \ |
Yifan Hong | 13df628 | 2018-03-23 12:03:33 -0700 | [diff] [blame] | 147 | framework_compatibility_matrix.device.xml |
Yifan Hong | 44c9b2e | 2018-01-23 14:34:41 -0800 | [diff] [blame] | 148 | LOCAL_GENERATED_SOURCES := $(call module-installed-files,$(LOCAL_REQUIRED_MODULES)) |
Yifan Hong | 2d8442c | 2017-12-13 15:01:19 -0800 | [diff] [blame] | 149 | |
| 150 | ifdef BUILT_VENDOR_MANIFEST |
Yifan Hong | 44c9b2e | 2018-01-23 14:34:41 -0800 | [diff] [blame] | 151 | LOCAL_GEN_FILE_DEPENDENCIES += $(BUILT_VENDOR_MANIFEST) |
| 152 | LOCAL_ASSEMBLE_VINTF_FLAGS += -c "$(BUILT_VENDOR_MANIFEST)" |
Yifan Hong | 2d8442c | 2017-12-13 15:01:19 -0800 | [diff] [blame] | 153 | endif |
| 154 | |
Yifan Hong | 44c9b2e | 2018-01-23 14:34:41 -0800 | [diff] [blame] | 155 | LOCAL_ASSEMBLE_VINTF_ENV_VARS := PRODUCT_ENFORCE_VINTF_MANIFEST |
Yifan Hong | 2d8442c | 2017-12-13 15:01:19 -0800 | [diff] [blame] | 156 | |
Yifan Hong | e62d476 | 2018-03-28 10:27:10 -0700 | [diff] [blame] | 157 | # TODO(b/65028233): Enforce no "unused HALs" for devices that does not define |
| 158 | # DEVICE_FRAMEWORK_COMPATIBILITY_MATRIX_FILE as well |
| 159 | ifeq (true,$(strip $(PRODUCT_ENFORCE_VINTF_MANIFEST))) |
| 160 | ifdef DEVICE_FRAMEWORK_COMPATIBILITY_MATRIX_FILE |
| 161 | LOCAL_ASSEMBLE_VINTF_ENV_VARS_OVERRIDE := VINTF_ENFORCE_NO_UNUSED_HALS=true |
| 162 | endif |
| 163 | endif |
| 164 | |
Yifan Hong | 44c9b2e | 2018-01-23 14:34:41 -0800 | [diff] [blame] | 165 | include $(BUILD_FRAMEWORK_COMPATIBILITY_MATRIX) |
Yifan Hong | 2d8442c | 2017-12-13 15:01:19 -0800 | [diff] [blame] | 166 | BUILT_SYSTEM_COMPATIBILITY_MATRIX := $(LOCAL_BUILT_MODULE) |
Yifan Hong | 44c9b2e | 2018-01-23 14:34:41 -0800 | [diff] [blame] | 167 | |
| 168 | BUILD_FRAMEWORK_COMPATIBILITY_MATRIX := |