blob: 35a390a93a4529d8cf023589d11735b3a3e010f5 [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
21# Clear potential input variables to BUILD_FRAMEWORK_COMPATIBILITY_MATRIX
22LOCAL_ADD_VBMETA_VERSION :=
23LOCAL_ASSEMBLE_VINTF_ENV_VARS :=
24LOCAL_ASSEMBLE_VINTF_FLAGS :=
Yifan Hong13df6282018-03-23 12:03:33 -070025LOCAL_WARN_REQUIRED_HALS :=
Yifan Hong44c9b2e2018-01-23 14:34:41 -080026LOCAL_KERNEL_VERSIONS :=
27LOCAL_GEN_FILE_DEPENDENCIES :=
28
Yifan Hong2d8442c2017-12-13 15:01:19 -080029# Install all compatibility_matrix.*.xml to /system/etc/vintf
30
Yifan Hong44c9b2e2018-01-23 14:34:41 -080031
Yifan Hong2d8442c2017-12-13 15:01:19 -080032include $(CLEAR_VARS)
Yifan Hong37ad8c42018-03-29 10:51:48 -070033LOCAL_MODULE := framework_compatibility_matrix.legacy.xml
Yifan Hong2d8442c2017-12-13 15:01:19 -080034LOCAL_MODULE_STEM := compatibility_matrix.legacy.xml
35LOCAL_SRC_FILES := $(LOCAL_MODULE_STEM)
Yifan Hong94b7d2c2018-01-23 15:38:49 -080036LOCAL_KERNEL_VERSIONS := 3.18.0 4.4.0 4.9.0
Yifan Hong44c9b2e2018-01-23 14:34:41 -080037include $(BUILD_FRAMEWORK_COMPATIBILITY_MATRIX)
Yifan Hong2d8442c2017-12-13 15:01:19 -080038
39include $(CLEAR_VARS)
Yifan Hong37ad8c42018-03-29 10:51:48 -070040LOCAL_MODULE := framework_compatibility_matrix.1.xml
Yifan Hong2d8442c2017-12-13 15:01:19 -080041LOCAL_MODULE_STEM := compatibility_matrix.1.xml
42LOCAL_SRC_FILES := $(LOCAL_MODULE_STEM)
Yifan Hong94b7d2c2018-01-23 15:38:49 -080043LOCAL_KERNEL_VERSIONS := 3.18.0 4.4.0 4.9.0
Yifan Hong44c9b2e2018-01-23 14:34:41 -080044include $(BUILD_FRAMEWORK_COMPATIBILITY_MATRIX)
Yifan Hong2d8442c2017-12-13 15:01:19 -080045
46include $(CLEAR_VARS)
Yifan Hong37ad8c42018-03-29 10:51:48 -070047LOCAL_MODULE := framework_compatibility_matrix.2.xml
Yifan Hong2d8442c2017-12-13 15:01:19 -080048LOCAL_MODULE_STEM := compatibility_matrix.2.xml
49LOCAL_SRC_FILES := $(LOCAL_MODULE_STEM)
Yifan Hong94b7d2c2018-01-23 15:38:49 -080050LOCAL_KERNEL_VERSIONS := 3.18.0 4.4.0 4.9.0
Yifan Hong44c9b2e2018-01-23 14:34:41 -080051include $(BUILD_FRAMEWORK_COMPATIBILITY_MATRIX)
52
53# TODO(b/72409164): STOPSHIP: update kernel version requirements
Yifan Hong2d8442c2017-12-13 15:01:19 -080054
55include $(CLEAR_VARS)
Yifan Hong37ad8c42018-03-29 10:51:48 -070056LOCAL_MODULE := framework_compatibility_matrix.current.xml
Yifan Hong2d8442c2017-12-13 15:01:19 -080057LOCAL_MODULE_STEM := compatibility_matrix.current.xml
58LOCAL_SRC_FILES := $(LOCAL_MODULE_STEM)
Yifan Hong94b7d2c2018-01-23 15:38:49 -080059LOCAL_KERNEL_VERSIONS := 4.4.0 4.9.0
Yifan Hong44c9b2e2018-01-23 14:34:41 -080060include $(BUILD_FRAMEWORK_COMPATIBILITY_MATRIX)
Yifan Hong2d8442c2017-12-13 15:01:19 -080061
Yifan Hong44c9b2e2018-01-23 14:34:41 -080062# Framework Compatibility Matrix (common to all FCM versions)
63
Yifan Hong2d8442c2017-12-13 15:01:19 -080064include $(CLEAR_VARS)
Yifan Hong13df6282018-03-23 12:03:33 -070065LOCAL_MODULE := framework_compatibility_matrix.device.xml
Yifan Hong37ad8c42018-03-29 10:51:48 -070066LOCAL_MODULE_STEM := compatibility_matrix.device.xml
67# define LOCAL_MODULE_CLASS for local-generated-sources-dir.
Yifan Hong13df6282018-03-23 12:03:33 -070068LOCAL_MODULE_CLASS := ETC
69
70ifndef DEVICE_FRAMEWORK_COMPATIBILITY_MATRIX_FILE
71LOCAL_SRC_FILES := compatibility_matrix.empty.xml
72else
73
74# DEVICE_FRAMEWORK_COMPATIBILITY_MATRIX_FILE specify an absolute path
75LOCAL_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.
80my_manifest_src_file := $(LOCAL_PATH)/manifest.empty.xml
81my_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) \
85 IGNORE_TARGET_FCM_VERSION=true \
86 $(HOST_OUT_EXECUTABLES)/assemble_vintf -i $(PRIVATE_SRC_FILE) -o $@
87
88LOCAL_GEN_FILE_DEPENDENCIES += $(my_gen_check_manifest)
89LOCAL_ASSEMBLE_VINTF_FLAGS += -c "$(my_gen_check_manifest)"
90
91my_gen_check_manifest :=
92my_manifest_src_file :=
93
94endif # DEVICE_FRAMEWORK_COMPATIBILITY_MATRIX_FILE
95
Yifan Hong44c9b2e2018-01-23 14:34:41 -080096LOCAL_ADD_VBMETA_VERSION := true
97LOCAL_ASSEMBLE_VINTF_ENV_VARS := \
Yifan Hongb426af32018-02-02 12:47:48 -080098 POLICYVERS \
99 PLATFORM_SEPOLICY_VERSION \
100 PLATFORM_SEPOLICY_COMPAT_VERSIONS
Yifan Hong2d8442c2017-12-13 15:01:19 -0800101
Yifan Hong13df6282018-03-23 12:03:33 -0700102LOCAL_WARN_REQUIRED_HALS := \
103 "Error: DEVICE_FRAMEWORK_COMPATIBILITY_MATRIX cannot contain required HALs."
104
Yifan Hong44c9b2e2018-01-23 14:34:41 -0800105include $(BUILD_FRAMEWORK_COMPATIBILITY_MATRIX)
Yifan Hong2d8442c2017-12-13 15:01:19 -0800106
107# Framework Compatibility Matrix
Yifan Hong2d8442c2017-12-13 15:01:19 -0800108
Yifan Hong44c9b2e2018-01-23 14:34:41 -0800109include $(CLEAR_VARS)
110LOCAL_MODULE := framework_compatibility_matrix.xml
111LOCAL_MODULE_STEM := compatibility_matrix.xml
112LOCAL_MODULE_PATH := $(TARGET_OUT)
Yifan Hong2d8442c2017-12-13 15:01:19 -0800113LOCAL_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 Hong13df6282018-03-23 12:03:33 -0700118 framework_compatibility_matrix.device.xml
Yifan Hong44c9b2e2018-01-23 14:34:41 -0800119LOCAL_GENERATED_SOURCES := $(call module-installed-files,$(LOCAL_REQUIRED_MODULES))
Yifan Hong2d8442c2017-12-13 15:01:19 -0800120
121ifdef BUILT_VENDOR_MANIFEST
Yifan Hong44c9b2e2018-01-23 14:34:41 -0800122LOCAL_GEN_FILE_DEPENDENCIES += $(BUILT_VENDOR_MANIFEST)
123LOCAL_ASSEMBLE_VINTF_FLAGS += -c "$(BUILT_VENDOR_MANIFEST)"
Yifan Hong2d8442c2017-12-13 15:01:19 -0800124endif
125
Yifan Hong44c9b2e2018-01-23 14:34:41 -0800126LOCAL_ASSEMBLE_VINTF_ENV_VARS := PRODUCT_ENFORCE_VINTF_MANIFEST
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 -0800129BUILT_SYSTEM_COMPATIBILITY_MATRIX := $(LOCAL_BUILT_MODULE)
Yifan Hong44c9b2e2018-01-23 14:34:41 -0800130
131BUILD_FRAMEWORK_COMPATIBILITY_MATRIX :=