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