blob: 22d04120021b1a0ee18496ac98eb8724c6da6f58 [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 Hong366101c2018-04-25 14:36:00 -070021my_kernel_config_data := kernel/configs
Yifan Hong44c9b2e2018-01-23 14:34:41 -080022
Yifan Hong2d8442c2017-12-13 15:01:19 -080023# Install all compatibility_matrix.*.xml to /system/etc/vintf
24
25include $(CLEAR_VARS)
Yifan Hong366101c2018-04-25 14:36:00 -070026include $(LOCAL_PATH)/clear_vars.mk
Yifan Hong37ad8c42018-03-29 10:51:48 -070027LOCAL_MODULE := framework_compatibility_matrix.legacy.xml
Yifan Hong2d8442c2017-12-13 15:01:19 -080028LOCAL_MODULE_STEM := compatibility_matrix.legacy.xml
29LOCAL_SRC_FILES := $(LOCAL_MODULE_STEM)
Yifan Hong366101c2018-04-25 14:36:00 -070030LOCAL_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 Hong26e3a582018-04-12 14:50:09 -070034
Yifan Hong44c9b2e2018-01-23 14:34:41 -080035include $(BUILD_FRAMEWORK_COMPATIBILITY_MATRIX)
Yifan Hong2d8442c2017-12-13 15:01:19 -080036
37include $(CLEAR_VARS)
Yifan Hong366101c2018-04-25 14:36:00 -070038include $(LOCAL_PATH)/clear_vars.mk
Yifan Hong37ad8c42018-03-29 10:51:48 -070039LOCAL_MODULE := framework_compatibility_matrix.1.xml
Yifan Hong2d8442c2017-12-13 15:01:19 -080040LOCAL_MODULE_STEM := compatibility_matrix.1.xml
41LOCAL_SRC_FILES := $(LOCAL_MODULE_STEM)
Yifan Hong366101c2018-04-25 14:36:00 -070042LOCAL_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 Hong26e3a582018-04-12 14:50:09 -070046
Yifan Hong44c9b2e2018-01-23 14:34:41 -080047include $(BUILD_FRAMEWORK_COMPATIBILITY_MATRIX)
Yifan Hong2d8442c2017-12-13 15:01:19 -080048
49include $(CLEAR_VARS)
Yifan Hong366101c2018-04-25 14:36:00 -070050include $(LOCAL_PATH)/clear_vars.mk
Yifan Hong37ad8c42018-03-29 10:51:48 -070051LOCAL_MODULE := framework_compatibility_matrix.2.xml
Yifan Hong2d8442c2017-12-13 15:01:19 -080052LOCAL_MODULE_STEM := compatibility_matrix.2.xml
53LOCAL_SRC_FILES := $(LOCAL_MODULE_STEM)
Yifan Hong366101c2018-04-25 14:36:00 -070054LOCAL_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 Hong44c9b2e2018-01-23 14:34:41 -080058
Yifan Hong26e3a582018-04-12 14:50:09 -070059include $(BUILD_FRAMEWORK_COMPATIBILITY_MATRIX)
Yifan Hong2d8442c2017-12-13 15:01:19 -080060
61include $(CLEAR_VARS)
Yifan Hong366101c2018-04-25 14:36:00 -070062include $(LOCAL_PATH)/clear_vars.mk
Steven Moreland92ea6542018-04-03 09:38:41 -070063LOCAL_MODULE := framework_compatibility_matrix.3.xml
64LOCAL_MODULE_STEM := compatibility_matrix.3.xml
Yifan Hong2d8442c2017-12-13 15:01:19 -080065LOCAL_SRC_FILES := $(LOCAL_MODULE_STEM)
Yifan Hong366101c2018-04-25 14:36:00 -070066LOCAL_KERNEL_CONFIG_DATA_PATHS := \
Yifan Hong22af37d2018-05-16 11:07:28 -070067 4.4.107:$(my_kernel_config_data)/p/android-4.4 \
68 4.9.84:$(my_kernel_config_data)/p/android-4.9 \
Yifan Hong75c7e3d2018-05-23 14:59:15 -070069 4.14.42:$(my_kernel_config_data)/p/android-4.14 \
Yifan Hong26e3a582018-04-12 14:50:09 -070070
Yifan Hong44c9b2e2018-01-23 14:34:41 -080071include $(BUILD_FRAMEWORK_COMPATIBILITY_MATRIX)
Yifan Hong2d8442c2017-12-13 15:01:19 -080072
Steven Moreland3c86d9a2018-04-30 13:02:02 -070073include $(CLEAR_VARS)
74include $(LOCAL_PATH)/clear_vars.mk
75LOCAL_MODULE := framework_compatibility_matrix.current.xml
76LOCAL_MODULE_STEM := compatibility_matrix.current.xml
77LOCAL_SRC_FILES := $(LOCAL_MODULE_STEM)
78LOCAL_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
83include $(BUILD_FRAMEWORK_COMPATIBILITY_MATRIX)
84
Yifan Hong366101c2018-04-25 14:36:00 -070085my_kernel_config_data :=
86
Yifan Hong44c9b2e2018-01-23 14:34:41 -080087# Framework Compatibility Matrix (common to all FCM versions)
88
Yifan Hong2d8442c2017-12-13 15:01:19 -080089include $(CLEAR_VARS)
Yifan Hong366101c2018-04-25 14:36:00 -070090include $(LOCAL_PATH)/clear_vars.mk
Yifan Hong13df6282018-03-23 12:03:33 -070091LOCAL_MODULE := framework_compatibility_matrix.device.xml
Yifan Hong37ad8c42018-03-29 10:51:48 -070092LOCAL_MODULE_STEM := compatibility_matrix.device.xml
93# define LOCAL_MODULE_CLASS for local-generated-sources-dir.
Yifan Hong13df6282018-03-23 12:03:33 -070094LOCAL_MODULE_CLASS := ETC
95
96ifndef DEVICE_FRAMEWORK_COMPATIBILITY_MATRIX_FILE
97LOCAL_SRC_FILES := compatibility_matrix.empty.xml
98else
99
100# DEVICE_FRAMEWORK_COMPATIBILITY_MATRIX_FILE specify an absolute path
101LOCAL_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.
106my_manifest_src_file := $(LOCAL_PATH)/manifest.empty.xml
107my_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 Hongb2a83d12018-03-29 10:57:12 -0700111 VINTF_IGNORE_TARGET_FCM_VERSION=true \
Yifan Hong13df6282018-03-23 12:03:33 -0700112 $(HOST_OUT_EXECUTABLES)/assemble_vintf -i $(PRIVATE_SRC_FILE) -o $@
113
114LOCAL_GEN_FILE_DEPENDENCIES += $(my_gen_check_manifest)
115LOCAL_ASSEMBLE_VINTF_FLAGS += -c "$(my_gen_check_manifest)"
116
117my_gen_check_manifest :=
118my_manifest_src_file :=
119
120endif # DEVICE_FRAMEWORK_COMPATIBILITY_MATRIX_FILE
121
Yifan Hong44c9b2e2018-01-23 14:34:41 -0800122LOCAL_ADD_VBMETA_VERSION := true
123LOCAL_ASSEMBLE_VINTF_ENV_VARS := \
Yifan Hongb426af32018-02-02 12:47:48 -0800124 POLICYVERS \
125 PLATFORM_SEPOLICY_VERSION \
126 PLATFORM_SEPOLICY_COMPAT_VERSIONS
Yifan Hong2d8442c2017-12-13 15:01:19 -0800127
Yifan Hong44c9b2e2018-01-23 14:34:41 -0800128include $(BUILD_FRAMEWORK_COMPATIBILITY_MATRIX)
Yifan Hong2d8442c2017-12-13 15:01:19 -0800129
Yifan Hong774c2bf2018-06-11 18:07:53 -0700130my_system_matrix_deps := \
Yifan Hong2d8442c2017-12-13 15:01:19 -0800131 framework_compatibility_matrix.legacy.xml \
132 framework_compatibility_matrix.1.xml \
133 framework_compatibility_matrix.2.xml \
Steven Moreland92ea6542018-04-03 09:38:41 -0700134 framework_compatibility_matrix.3.xml \
Steven Moreland3c86d9a2018-04-30 13:02:02 -0700135 framework_compatibility_matrix.current.xml \
Yifan Hong13df6282018-03-23 12:03:33 -0700136 framework_compatibility_matrix.device.xml
Yifan Hong774c2bf2018-06-11 18:07:53 -0700137
138# Phony target that installs all framework compatibility matrix files
139include $(CLEAR_VARS)
140LOCAL_MODULE := framework_compatibility_matrix.xml
141LOCAL_REQUIRED_MODULES := $(my_system_matrix_deps)
142include $(BUILD_PHONY_PACKAGE)
143
Yifan Hong53891ac2018-08-13 12:33:42 -0700144# Final Framework Compatibility Matrix for OTA
Yifan Hong774c2bf2018-06-11 18:07:53 -0700145include $(CLEAR_VARS)
146include $(LOCAL_PATH)/clear_vars.mk
147LOCAL_MODULE := verified_assembled_system_matrix.xml
148LOCAL_MODULE_PATH := $(PRODUCT_OUT)
149LOCAL_REQUIRED_MODULES := $(my_system_matrix_deps)
Yifan Hong44c9b2e2018-01-23 14:34:41 -0800150LOCAL_GENERATED_SOURCES := $(call module-installed-files,$(LOCAL_REQUIRED_MODULES))
Yifan Hong53891ac2018-08-13 12:33:42 -0700151LOCAL_ADD_VBMETA_VERSION_OVERRIDE := true
Yifan Hong2d8442c2017-12-13 15:01:19 -0800152
153ifdef BUILT_VENDOR_MANIFEST
Yifan Hong44c9b2e2018-01-23 14:34:41 -0800154LOCAL_GEN_FILE_DEPENDENCIES += $(BUILT_VENDOR_MANIFEST)
155LOCAL_ASSEMBLE_VINTF_FLAGS += -c "$(BUILT_VENDOR_MANIFEST)"
Yifan Hong2d8442c2017-12-13 15:01:19 -0800156endif
157
Yifan Hongf529c342018-07-26 11:42:17 -0700158ifneq ($(PRODUCT_OTA_ENFORCE_VINTF_KERNEL_REQUIREMENTS),true)
159LOCAL_ASSEMBLE_VINTF_FLAGS += --no-kernel-requirements
160endif
161
Yifan Hong44c9b2e2018-01-23 14:34:41 -0800162include $(BUILD_FRAMEWORK_COMPATIBILITY_MATRIX)
Steven Moreland515324a2018-05-01 09:59:32 -0700163BUILT_SYSTEM_MATRIX := $(LOCAL_BUILT_MODULE)
Yifan Hong44c9b2e2018-01-23 14:34:41 -0800164
Yifan Hong774c2bf2018-06-11 18:07:53 -0700165my_system_matrix_deps :=
Yifan Hong44c9b2e2018-01-23 14:34:41 -0800166BUILD_FRAMEWORK_COMPATIBILITY_MATRIX :=