blob: a10d808d3364fd3d22a97383dc884b6758d85104 [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 Hong2d8442c2017-12-13 15:01:19 -080033LOCAL_MODULE_STEM := compatibility_matrix.legacy.xml
34LOCAL_SRC_FILES := $(LOCAL_MODULE_STEM)
Yifan Hong94b7d2c2018-01-23 15:38:49 -080035LOCAL_KERNEL_VERSIONS := 3.18.0 4.4.0 4.9.0
Yifan Hong44c9b2e2018-01-23 14:34:41 -080036include $(BUILD_FRAMEWORK_COMPATIBILITY_MATRIX)
Yifan Hong2d8442c2017-12-13 15:01:19 -080037
38include $(CLEAR_VARS)
Yifan Hong2d8442c2017-12-13 15:01:19 -080039LOCAL_MODULE_STEM := compatibility_matrix.1.xml
40LOCAL_SRC_FILES := $(LOCAL_MODULE_STEM)
Yifan Hong94b7d2c2018-01-23 15:38:49 -080041LOCAL_KERNEL_VERSIONS := 3.18.0 4.4.0 4.9.0
Yifan Hong44c9b2e2018-01-23 14:34:41 -080042include $(BUILD_FRAMEWORK_COMPATIBILITY_MATRIX)
Yifan Hong2d8442c2017-12-13 15:01:19 -080043
44include $(CLEAR_VARS)
Yifan Hong2d8442c2017-12-13 15:01:19 -080045LOCAL_MODULE_STEM := compatibility_matrix.2.xml
46LOCAL_SRC_FILES := $(LOCAL_MODULE_STEM)
Yifan Hong94b7d2c2018-01-23 15:38:49 -080047LOCAL_KERNEL_VERSIONS := 3.18.0 4.4.0 4.9.0
Yifan Hong44c9b2e2018-01-23 14:34:41 -080048include $(BUILD_FRAMEWORK_COMPATIBILITY_MATRIX)
49
50# TODO(b/72409164): STOPSHIP: update kernel version requirements
Yifan Hong2d8442c2017-12-13 15:01:19 -080051
52include $(CLEAR_VARS)
Yifan Hong2d8442c2017-12-13 15:01:19 -080053LOCAL_MODULE_STEM := compatibility_matrix.current.xml
54LOCAL_SRC_FILES := $(LOCAL_MODULE_STEM)
Yifan Hong94b7d2c2018-01-23 15:38:49 -080055LOCAL_KERNEL_VERSIONS := 4.4.0 4.9.0
Yifan Hong44c9b2e2018-01-23 14:34:41 -080056include $(BUILD_FRAMEWORK_COMPATIBILITY_MATRIX)
Yifan Hong2d8442c2017-12-13 15:01:19 -080057
Yifan Hong44c9b2e2018-01-23 14:34:41 -080058# Framework Compatibility Matrix (common to all FCM versions)
59
Yifan Hong2d8442c2017-12-13 15:01:19 -080060include $(CLEAR_VARS)
Yifan Hong13df6282018-03-23 12:03:33 -070061LOCAL_MODULE_STEM := compatibility_matrix.device.xml
62# define LOCAL_MODULE and LOCAL_MODULE_CLASS for local-generated-sources-dir.
63LOCAL_MODULE := framework_compatibility_matrix.device.xml
64LOCAL_MODULE_CLASS := ETC
65
66ifndef DEVICE_FRAMEWORK_COMPATIBILITY_MATRIX_FILE
67LOCAL_SRC_FILES := compatibility_matrix.empty.xml
68else
69
70# DEVICE_FRAMEWORK_COMPATIBILITY_MATRIX_FILE specify an absolute path
71LOCAL_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.
76my_manifest_src_file := $(LOCAL_PATH)/manifest.empty.xml
77my_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
84LOCAL_GEN_FILE_DEPENDENCIES += $(my_gen_check_manifest)
85LOCAL_ASSEMBLE_VINTF_FLAGS += -c "$(my_gen_check_manifest)"
86
87my_gen_check_manifest :=
88my_manifest_src_file :=
89
90endif # DEVICE_FRAMEWORK_COMPATIBILITY_MATRIX_FILE
91
Yifan Hong44c9b2e2018-01-23 14:34:41 -080092LOCAL_ADD_VBMETA_VERSION := true
93LOCAL_ASSEMBLE_VINTF_ENV_VARS := \
Yifan Hongb426af32018-02-02 12:47:48 -080094 POLICYVERS \
95 PLATFORM_SEPOLICY_VERSION \
96 PLATFORM_SEPOLICY_COMPAT_VERSIONS
Yifan Hong2d8442c2017-12-13 15:01:19 -080097
Yifan Hong13df6282018-03-23 12:03:33 -070098LOCAL_WARN_REQUIRED_HALS := \
99 "Error: DEVICE_FRAMEWORK_COMPATIBILITY_MATRIX cannot contain required HALs."
100
Yifan Hong44c9b2e2018-01-23 14:34:41 -0800101include $(BUILD_FRAMEWORK_COMPATIBILITY_MATRIX)
Yifan Hong2d8442c2017-12-13 15:01:19 -0800102
103# Framework Compatibility Matrix
Yifan Hong2d8442c2017-12-13 15:01:19 -0800104
Yifan Hong44c9b2e2018-01-23 14:34:41 -0800105include $(CLEAR_VARS)
106LOCAL_MODULE := framework_compatibility_matrix.xml
107LOCAL_MODULE_STEM := compatibility_matrix.xml
108LOCAL_MODULE_PATH := $(TARGET_OUT)
Yifan Hong2d8442c2017-12-13 15:01:19 -0800109LOCAL_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 Hong13df6282018-03-23 12:03:33 -0700114 framework_compatibility_matrix.device.xml
Yifan Hong44c9b2e2018-01-23 14:34:41 -0800115LOCAL_GENERATED_SOURCES := $(call module-installed-files,$(LOCAL_REQUIRED_MODULES))
Yifan Hong2d8442c2017-12-13 15:01:19 -0800116
117ifdef BUILT_VENDOR_MANIFEST
Yifan Hong44c9b2e2018-01-23 14:34:41 -0800118LOCAL_GEN_FILE_DEPENDENCIES += $(BUILT_VENDOR_MANIFEST)
119LOCAL_ASSEMBLE_VINTF_FLAGS += -c "$(BUILT_VENDOR_MANIFEST)"
Yifan Hong2d8442c2017-12-13 15:01:19 -0800120endif
121
Yifan Hong44c9b2e2018-01-23 14:34:41 -0800122LOCAL_ASSEMBLE_VINTF_ENV_VARS := PRODUCT_ENFORCE_VINTF_MANIFEST
Yifan Hong2d8442c2017-12-13 15:01:19 -0800123
Yifan Hong44c9b2e2018-01-23 14:34:41 -0800124include $(BUILD_FRAMEWORK_COMPATIBILITY_MATRIX)
Yifan Hong2d8442c2017-12-13 15:01:19 -0800125BUILT_SYSTEM_COMPATIBILITY_MATRIX := $(LOCAL_BUILT_MODULE)
Yifan Hong44c9b2e2018-01-23 14:34:41 -0800126
127BUILD_FRAMEWORK_COMPATIBILITY_MATRIX :=