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 | |
| 21 | # Clear potential input variables to BUILD_FRAMEWORK_COMPATIBILITY_MATRIX |
| 22 | LOCAL_ADD_VBMETA_VERSION := |
| 23 | LOCAL_ASSEMBLE_VINTF_ENV_VARS := |
| 24 | LOCAL_ASSEMBLE_VINTF_FLAGS := |
Yifan Hong | fee9ea4 | 2018-03-23 12:03:33 -0700 | [diff] [blame] | 25 | LOCAL_WARN_REQUIRED_HALS := |
Yifan Hong | 44c9b2e | 2018-01-23 14:34:41 -0800 | [diff] [blame] | 26 | LOCAL_KERNEL_VERSIONS := |
| 27 | LOCAL_GEN_FILE_DEPENDENCIES := |
| 28 | |
Yifan Hong | 2d8442c | 2017-12-13 15:01:19 -0800 | [diff] [blame] | 29 | # Install all compatibility_matrix.*.xml to /system/etc/vintf |
| 30 | |
Yifan Hong | 44c9b2e | 2018-01-23 14:34:41 -0800 | [diff] [blame] | 31 | |
Yifan Hong | 2d8442c | 2017-12-13 15:01:19 -0800 | [diff] [blame] | 32 | include $(CLEAR_VARS) |
Yifan Hong | 7831d43 | 2018-03-29 10:51:48 -0700 | [diff] [blame] | 33 | LOCAL_MODULE := framework_compatibility_matrix.legacy.xml |
Yifan Hong | 2d8442c | 2017-12-13 15:01:19 -0800 | [diff] [blame] | 34 | LOCAL_MODULE_STEM := compatibility_matrix.legacy.xml |
| 35 | LOCAL_SRC_FILES := $(LOCAL_MODULE_STEM) |
Yifan Hong | 94b7d2c | 2018-01-23 15:38:49 -0800 | [diff] [blame] | 36 | LOCAL_KERNEL_VERSIONS := 3.18.0 4.4.0 4.9.0 |
Yifan Hong | 44c9b2e | 2018-01-23 14:34:41 -0800 | [diff] [blame] | 37 | include $(BUILD_FRAMEWORK_COMPATIBILITY_MATRIX) |
Yifan Hong | 2d8442c | 2017-12-13 15:01:19 -0800 | [diff] [blame] | 38 | |
| 39 | include $(CLEAR_VARS) |
Yifan Hong | 7831d43 | 2018-03-29 10:51:48 -0700 | [diff] [blame] | 40 | LOCAL_MODULE := framework_compatibility_matrix.1.xml |
Yifan Hong | 2d8442c | 2017-12-13 15:01:19 -0800 | [diff] [blame] | 41 | LOCAL_MODULE_STEM := compatibility_matrix.1.xml |
| 42 | LOCAL_SRC_FILES := $(LOCAL_MODULE_STEM) |
Yifan Hong | 94b7d2c | 2018-01-23 15:38:49 -0800 | [diff] [blame] | 43 | LOCAL_KERNEL_VERSIONS := 3.18.0 4.4.0 4.9.0 |
Yifan Hong | 44c9b2e | 2018-01-23 14:34:41 -0800 | [diff] [blame] | 44 | include $(BUILD_FRAMEWORK_COMPATIBILITY_MATRIX) |
Yifan Hong | 2d8442c | 2017-12-13 15:01:19 -0800 | [diff] [blame] | 45 | |
| 46 | include $(CLEAR_VARS) |
Yifan Hong | 7831d43 | 2018-03-29 10:51:48 -0700 | [diff] [blame] | 47 | LOCAL_MODULE := framework_compatibility_matrix.2.xml |
Yifan Hong | 2d8442c | 2017-12-13 15:01:19 -0800 | [diff] [blame] | 48 | LOCAL_MODULE_STEM := compatibility_matrix.2.xml |
| 49 | LOCAL_SRC_FILES := $(LOCAL_MODULE_STEM) |
Yifan Hong | 94b7d2c | 2018-01-23 15:38:49 -0800 | [diff] [blame] | 50 | LOCAL_KERNEL_VERSIONS := 3.18.0 4.4.0 4.9.0 |
Yifan Hong | 44c9b2e | 2018-01-23 14:34:41 -0800 | [diff] [blame] | 51 | include $(BUILD_FRAMEWORK_COMPATIBILITY_MATRIX) |
| 52 | |
| 53 | # TODO(b/72409164): STOPSHIP: update kernel version requirements |
Yifan Hong | 2d8442c | 2017-12-13 15:01:19 -0800 | [diff] [blame] | 54 | |
| 55 | include $(CLEAR_VARS) |
Yifan Hong | 7831d43 | 2018-03-29 10:51:48 -0700 | [diff] [blame] | 56 | LOCAL_MODULE := framework_compatibility_matrix.current.xml |
Yifan Hong | 2d8442c | 2017-12-13 15:01:19 -0800 | [diff] [blame] | 57 | LOCAL_MODULE_STEM := compatibility_matrix.current.xml |
| 58 | LOCAL_SRC_FILES := $(LOCAL_MODULE_STEM) |
Yifan Hong | 94b7d2c | 2018-01-23 15:38:49 -0800 | [diff] [blame] | 59 | LOCAL_KERNEL_VERSIONS := 4.4.0 4.9.0 |
Yifan Hong | 44c9b2e | 2018-01-23 14:34:41 -0800 | [diff] [blame] | 60 | include $(BUILD_FRAMEWORK_COMPATIBILITY_MATRIX) |
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 | # Framework Compatibility Matrix (common to all FCM versions) |
| 63 | |
Yifan Hong | 2d8442c | 2017-12-13 15:01:19 -0800 | [diff] [blame] | 64 | include $(CLEAR_VARS) |
Yifan Hong | fee9ea4 | 2018-03-23 12:03:33 -0700 | [diff] [blame] | 65 | LOCAL_MODULE := framework_compatibility_matrix.device.xml |
Yifan Hong | 7831d43 | 2018-03-29 10:51:48 -0700 | [diff] [blame] | 66 | LOCAL_MODULE_STEM := compatibility_matrix.device.xml |
| 67 | # define LOCAL_MODULE_CLASS for local-generated-sources-dir. |
Yifan Hong | fee9ea4 | 2018-03-23 12:03:33 -0700 | [diff] [blame] | 68 | LOCAL_MODULE_CLASS := ETC |
| 69 | |
| 70 | ifndef DEVICE_FRAMEWORK_COMPATIBILITY_MATRIX_FILE |
| 71 | LOCAL_SRC_FILES := compatibility_matrix.empty.xml |
| 72 | else |
| 73 | |
| 74 | # DEVICE_FRAMEWORK_COMPATIBILITY_MATRIX_FILE specify an absolute path |
| 75 | LOCAL_GENERATED_SOURCES := $(DEVICE_FRAMEWORK_COMPATIBILITY_MATRIX_FILE) |
| 76 | |
| 77 | # Enforce that DEVICE_FRAMEWORK_COMPATIBILITY_MATRIX_FILE does not specify required HALs |
| 78 | # by checking it against an empty manifest. But the empty manifest needs to contain |
| 79 | # BOARD_SEPOLICY_VERS to be compatible with DEVICE_FRAMEWORK_COMPATIBILITY_MATRIX_FILE. |
| 80 | my_manifest_src_file := $(LOCAL_PATH)/manifest.empty.xml |
| 81 | my_gen_check_manifest := $(local-generated-sources-dir)/manifest.check.xml |
| 82 | $(my_gen_check_manifest): PRIVATE_SRC_FILE := $(my_manifest_src_file) |
| 83 | $(my_gen_check_manifest): $(my_manifest_src_file) $(HOST_OUT_EXECUTABLES)/assemble_vintf |
| 84 | BOARD_SEPOLICY_VERS=$(BOARD_SEPOLICY_VERS) \ |
Yifan Hong | e0cad7a | 2018-03-29 10:57:12 -0700 | [diff] [blame^] | 85 | VINTF_IGNORE_TARGET_FCM_VERSION=true \ |
Yifan Hong | fee9ea4 | 2018-03-23 12:03:33 -0700 | [diff] [blame] | 86 | $(HOST_OUT_EXECUTABLES)/assemble_vintf -i $(PRIVATE_SRC_FILE) -o $@ |
| 87 | |
| 88 | LOCAL_GEN_FILE_DEPENDENCIES += $(my_gen_check_manifest) |
| 89 | LOCAL_ASSEMBLE_VINTF_FLAGS += -c "$(my_gen_check_manifest)" |
| 90 | |
| 91 | my_gen_check_manifest := |
| 92 | my_manifest_src_file := |
| 93 | |
| 94 | endif # DEVICE_FRAMEWORK_COMPATIBILITY_MATRIX_FILE |
| 95 | |
Yifan Hong | 44c9b2e | 2018-01-23 14:34:41 -0800 | [diff] [blame] | 96 | LOCAL_ADD_VBMETA_VERSION := true |
| 97 | LOCAL_ASSEMBLE_VINTF_ENV_VARS := \ |
Yifan Hong | b426af3 | 2018-02-02 12:47:48 -0800 | [diff] [blame] | 98 | POLICYVERS \ |
| 99 | PLATFORM_SEPOLICY_VERSION \ |
| 100 | PLATFORM_SEPOLICY_COMPAT_VERSIONS |
Yifan Hong | 2d8442c | 2017-12-13 15:01:19 -0800 | [diff] [blame] | 101 | |
Yifan Hong | fee9ea4 | 2018-03-23 12:03:33 -0700 | [diff] [blame] | 102 | LOCAL_WARN_REQUIRED_HALS := \ |
| 103 | "Error: DEVICE_FRAMEWORK_COMPATIBILITY_MATRIX cannot contain required HALs." |
| 104 | |
Yifan Hong | 44c9b2e | 2018-01-23 14:34:41 -0800 | [diff] [blame] | 105 | include $(BUILD_FRAMEWORK_COMPATIBILITY_MATRIX) |
Yifan Hong | 2d8442c | 2017-12-13 15:01:19 -0800 | [diff] [blame] | 106 | |
| 107 | # Framework Compatibility Matrix |
Yifan Hong | 2d8442c | 2017-12-13 15:01:19 -0800 | [diff] [blame] | 108 | |
Yifan Hong | 44c9b2e | 2018-01-23 14:34:41 -0800 | [diff] [blame] | 109 | include $(CLEAR_VARS) |
| 110 | LOCAL_MODULE := framework_compatibility_matrix.xml |
| 111 | LOCAL_MODULE_STEM := compatibility_matrix.xml |
| 112 | LOCAL_MODULE_PATH := $(TARGET_OUT) |
Yifan Hong | 2d8442c | 2017-12-13 15:01:19 -0800 | [diff] [blame] | 113 | LOCAL_REQUIRED_MODULES := \ |
| 114 | framework_compatibility_matrix.legacy.xml \ |
| 115 | framework_compatibility_matrix.1.xml \ |
| 116 | framework_compatibility_matrix.2.xml \ |
| 117 | framework_compatibility_matrix.current.xml \ |
Yifan Hong | fee9ea4 | 2018-03-23 12:03:33 -0700 | [diff] [blame] | 118 | framework_compatibility_matrix.device.xml |
Yifan Hong | 44c9b2e | 2018-01-23 14:34:41 -0800 | [diff] [blame] | 119 | LOCAL_GENERATED_SOURCES := $(call module-installed-files,$(LOCAL_REQUIRED_MODULES)) |
Yifan Hong | 2d8442c | 2017-12-13 15:01:19 -0800 | [diff] [blame] | 120 | |
| 121 | ifdef BUILT_VENDOR_MANIFEST |
Yifan Hong | 44c9b2e | 2018-01-23 14:34:41 -0800 | [diff] [blame] | 122 | LOCAL_GEN_FILE_DEPENDENCIES += $(BUILT_VENDOR_MANIFEST) |
| 123 | LOCAL_ASSEMBLE_VINTF_FLAGS += -c "$(BUILT_VENDOR_MANIFEST)" |
Yifan Hong | 2d8442c | 2017-12-13 15:01:19 -0800 | [diff] [blame] | 124 | endif |
| 125 | |
Yifan Hong | 44c9b2e | 2018-01-23 14:34:41 -0800 | [diff] [blame] | 126 | LOCAL_ASSEMBLE_VINTF_ENV_VARS := PRODUCT_ENFORCE_VINTF_MANIFEST |
Yifan Hong | 2d8442c | 2017-12-13 15:01:19 -0800 | [diff] [blame] | 127 | |
Yifan Hong | 44c9b2e | 2018-01-23 14:34:41 -0800 | [diff] [blame] | 128 | include $(BUILD_FRAMEWORK_COMPATIBILITY_MATRIX) |
Yifan Hong | 2d8442c | 2017-12-13 15:01:19 -0800 | [diff] [blame] | 129 | BUILT_SYSTEM_COMPATIBILITY_MATRIX := $(LOCAL_BUILT_MODULE) |
Yifan Hong | 44c9b2e | 2018-01-23 14:34:41 -0800 | [diff] [blame] | 130 | |
| 131 | BUILD_FRAMEWORK_COMPATIBILITY_MATRIX := |