Merge changes from topic "vintf_kernel_ver"
* changes: Compatibility matrices: add minor revision to kernel versions Compatibility matrices: kernel req at each FCM version
This commit is contained in:
commit
f3dd36fd5c
2 changed files with 140 additions and 85 deletions
|
@ -16,123 +16,78 @@
|
|||
|
||||
LOCAL_PATH := $(call my-dir)
|
||||
|
||||
BUILD_FRAMEWORK_COMPATIBILITY_MATRIX := $(LOCAL_PATH)/compatibility_matrix.mk
|
||||
|
||||
# Clear potential input variables to BUILD_FRAMEWORK_COMPATIBILITY_MATRIX
|
||||
LOCAL_ADD_VBMETA_VERSION :=
|
||||
LOCAL_ASSEMBLE_VINTF_ENV_VARS :=
|
||||
LOCAL_ASSEMBLE_VINTF_FLAGS :=
|
||||
LOCAL_KERNEL_VERSIONS :=
|
||||
LOCAL_GEN_FILE_DEPENDENCIES :=
|
||||
|
||||
# Install all compatibility_matrix.*.xml to /system/etc/vintf
|
||||
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_MODULE := framework_compatibility_matrix.legacy.xml
|
||||
LOCAL_MODULE_STEM := compatibility_matrix.legacy.xml
|
||||
LOCAL_SRC_FILES := $(LOCAL_MODULE_STEM)
|
||||
LOCAL_MODULE_CLASS := ETC
|
||||
LOCAL_MODULE_PATH := $(TARGET_OUT)/etc/vintf
|
||||
include $(BUILD_PREBUILT)
|
||||
LOCAL_KERNEL_VERSIONS := 3.18.0 4.4.0 4.9.0
|
||||
include $(BUILD_FRAMEWORK_COMPATIBILITY_MATRIX)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_MODULE := framework_compatibility_matrix.1.xml
|
||||
LOCAL_MODULE_STEM := compatibility_matrix.1.xml
|
||||
LOCAL_SRC_FILES := $(LOCAL_MODULE_STEM)
|
||||
LOCAL_MODULE_CLASS := ETC
|
||||
LOCAL_MODULE_PATH := $(TARGET_OUT)/etc/vintf
|
||||
include $(BUILD_PREBUILT)
|
||||
LOCAL_KERNEL_VERSIONS := 3.18.0 4.4.0 4.9.0
|
||||
include $(BUILD_FRAMEWORK_COMPATIBILITY_MATRIX)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_MODULE := framework_compatibility_matrix.2.xml
|
||||
LOCAL_MODULE_STEM := compatibility_matrix.2.xml
|
||||
LOCAL_SRC_FILES := $(LOCAL_MODULE_STEM)
|
||||
LOCAL_MODULE_CLASS := ETC
|
||||
LOCAL_MODULE_PATH := $(TARGET_OUT)/etc/vintf
|
||||
include $(BUILD_PREBUILT)
|
||||
LOCAL_KERNEL_VERSIONS := 3.18.0 4.4.0 4.9.0
|
||||
include $(BUILD_FRAMEWORK_COMPATIBILITY_MATRIX)
|
||||
|
||||
# TODO(b/72409164): STOPSHIP: update kernel version requirements
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_MODULE := framework_compatibility_matrix.current.xml
|
||||
LOCAL_MODULE_STEM := compatibility_matrix.current.xml
|
||||
LOCAL_SRC_FILES := $(LOCAL_MODULE_STEM)
|
||||
LOCAL_MODULE_CLASS := ETC
|
||||
LOCAL_MODULE_PATH := $(TARGET_OUT)/etc/vintf
|
||||
include $(BUILD_PREBUILT)
|
||||
LOCAL_KERNEL_VERSIONS := 4.4.0 4.9.0
|
||||
include $(BUILD_FRAMEWORK_COMPATIBILITY_MATRIX)
|
||||
|
||||
# Framework Compatibility Matrix (common to all FCM versions)
|
||||
|
||||
# Framework Compatibility Matrix without HALs
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_MODULE := framework_compatibility_matrix.empty.xml
|
||||
LOCAL_MODULE_STEM := compatibility_matrix.empty.xml
|
||||
LOCAL_MODULE_CLASS := ETC
|
||||
LOCAL_MODULE_PATH := $(TARGET_OUT)/etc/vintf
|
||||
LOCAL_MODULE_STEM := compatibility_matrix.empty.xml
|
||||
LOCAL_SRC_FILES := $(LOCAL_MODULE_STEM)
|
||||
LOCAL_ADD_VBMETA_VERSION := true
|
||||
LOCAL_ASSEMBLE_VINTF_ENV_VARS := \
|
||||
POLICYVERS \
|
||||
BOARD_SEPOLICY_VERS
|
||||
|
||||
GEN := $(local-generated-sources-dir)/$(LOCAL_MODULE_STEM)
|
||||
|
||||
$(GEN): PRIVATE_FLAGS :=
|
||||
|
||||
ifeq (true,$(BOARD_AVB_ENABLE))
|
||||
$(GEN): $(AVBTOOL)
|
||||
# INTERNAL_AVB_SYSTEM_SIGNING_ARGS consists of BOARD_AVB_SYSTEM_KEY_PATH and
|
||||
# BOARD_AVB_SYSTEM_ALGORITHM. We should add the dependency of key path, which
|
||||
# is a file, here.
|
||||
$(GEN): $(BOARD_AVB_SYSTEM_KEY_PATH)
|
||||
# Use deferred assignment (=) instead of immediate assignment (:=).
|
||||
# Otherwise, cannot get INTERNAL_AVB_SYSTEM_SIGNING_ARGS.
|
||||
$(GEN): FRAMEWORK_VBMETA_VERSION = $$("$(AVBTOOL)" add_hashtree_footer \
|
||||
--print_required_libavb_version \
|
||||
$(INTERNAL_AVB_SYSTEM_SIGNING_ARGS) \
|
||||
$(BOARD_AVB_SYSTEM_ADD_HASHTREE_FOOTER_ARGS))
|
||||
else
|
||||
$(GEN): FRAMEWORK_VBMETA_VERSION := 0.0
|
||||
endif
|
||||
|
||||
# Specify kernel versions that the current framework supports. These versions,
|
||||
# along with kernel configurations, are written to the framework compatibility
|
||||
# matrix.
|
||||
$(GEN): KERNEL_VERSIONS := 3.18 4.4 4.9
|
||||
|
||||
# Specify the location of android-base*.cfg files.
|
||||
$(GEN): KERNEL_CONFIG_DATA := kernel/configs
|
||||
|
||||
$(GEN): $(foreach version,$(KERNEL_VERSIONS),\
|
||||
$(wildcard $(KERNEL_CONFIG_DATA)/android-$(version)/android-base*.cfg))
|
||||
$(GEN): PRIVATE_FLAGS += $(foreach version,$(KERNEL_VERSIONS),\
|
||||
--kernel=$(version):$(call normalize-path-list,\
|
||||
$(wildcard $(KERNEL_CONFIG_DATA)/android-$(version)/android-base*.cfg)))
|
||||
|
||||
$(GEN): $(LOCAL_PATH)/compatibility_matrix.empty.xml $(HOST_OUT_EXECUTABLES)/assemble_vintf
|
||||
POLICYVERS=$(POLICYVERS) \
|
||||
BOARD_SEPOLICY_VERS=$(BOARD_SEPOLICY_VERS) \
|
||||
FRAMEWORK_VBMETA_VERSION=$(FRAMEWORK_VBMETA_VERSION) \
|
||||
$(HOST_OUT_EXECUTABLES)/assemble_vintf \
|
||||
-i $< -o $@ $(PRIVATE_FLAGS)
|
||||
LOCAL_PREBUILT_MODULE_FILE := $(GEN)
|
||||
include $(BUILD_PREBUILT)
|
||||
include $(BUILD_FRAMEWORK_COMPATIBILITY_MATRIX)
|
||||
|
||||
# Framework Compatibility Matrix
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_MODULE := framework_compatibility_matrix.xml
|
||||
LOCAL_MODULE_STEM := compatibility_matrix.xml
|
||||
LOCAL_MODULE_CLASS := ETC
|
||||
LOCAL_MODULE_PATH := $(TARGET_OUT)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_MODULE := framework_compatibility_matrix.xml
|
||||
LOCAL_MODULE_STEM := compatibility_matrix.xml
|
||||
LOCAL_MODULE_PATH := $(TARGET_OUT)
|
||||
LOCAL_REQUIRED_MODULES := \
|
||||
framework_compatibility_matrix.legacy.xml \
|
||||
framework_compatibility_matrix.1.xml \
|
||||
framework_compatibility_matrix.2.xml \
|
||||
framework_compatibility_matrix.current.xml \
|
||||
framework_compatibility_matrix.empty.xml
|
||||
|
||||
GEN := $(local-generated-sources-dir)/compatibility_matrix.xml
|
||||
|
||||
$(GEN): PRIVATE_FLAGS :=
|
||||
LOCAL_GENERATED_SOURCES := $(call module-installed-files,$(LOCAL_REQUIRED_MODULES))
|
||||
|
||||
ifdef BUILT_VENDOR_MANIFEST
|
||||
$(GEN): $(BUILT_VENDOR_MANIFEST)
|
||||
$(GEN): PRIVATE_FLAGS += -c "$(BUILT_VENDOR_MANIFEST)"
|
||||
LOCAL_GEN_FILE_DEPENDENCIES += $(BUILT_VENDOR_MANIFEST)
|
||||
LOCAL_ASSEMBLE_VINTF_FLAGS += -c "$(BUILT_VENDOR_MANIFEST)"
|
||||
endif
|
||||
|
||||
MATRIX_SRC_FILES := $(call module-installed-files,$(LOCAL_REQUIRED_MODULES))
|
||||
$(GEN): PRIVATE_MATRIX_SRC_FILES := $(MATRIX_SRC_FILES)
|
||||
$(GEN): $(MATRIX_SRC_FILES) $(HOST_OUT_EXECUTABLES)/assemble_vintf
|
||||
PRODUCT_ENFORCE_VINTF_MANIFEST=$(PRODUCT_ENFORCE_VINTF_MANIFEST) \
|
||||
$(HOST_OUT_EXECUTABLES)/assemble_vintf \
|
||||
-i $(call normalize-path-list,$(PRIVATE_MATRIX_SRC_FILES)) \
|
||||
-o $@ $(PRIVATE_FLAGS)
|
||||
LOCAL_ASSEMBLE_VINTF_ENV_VARS := PRODUCT_ENFORCE_VINTF_MANIFEST
|
||||
|
||||
MATRIX_SRC_FILES :=
|
||||
|
||||
LOCAL_PREBUILT_MODULE_FILE := $(GEN)
|
||||
include $(BUILD_PREBUILT)
|
||||
include $(BUILD_FRAMEWORK_COMPATIBILITY_MATRIX)
|
||||
BUILT_SYSTEM_COMPATIBILITY_MATRIX := $(LOCAL_BUILT_MODULE)
|
||||
|
||||
BUILD_FRAMEWORK_COMPATIBILITY_MATRIX :=
|
||||
|
|
100
compatibility_matrices/compatibility_matrix.mk
Normal file
100
compatibility_matrices/compatibility_matrix.mk
Normal file
|
@ -0,0 +1,100 @@
|
|||
#
|
||||
# Copyright (C) 2018 The Android Open Source Project
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
###########################################################
|
||||
## Remove minor revision from a kernel version. For example,
|
||||
## 3.18.0 becomes 3.18.
|
||||
## $(1): kernel version
|
||||
###########################################################
|
||||
define remove-minor-revision
|
||||
$(strip $(subst $(space),.,$(wordlist 1,2,$(subst .,$(space),$(strip $(1))))))
|
||||
endef
|
||||
|
||||
# $(warning $(call remove-minor-revision,3.18.0))
|
||||
|
||||
ifndef LOCAL_MODULE_STEM
|
||||
$(error LOCAL_MODULE_STEM must be defined.)
|
||||
endif
|
||||
|
||||
LOCAL_MODULE := framework_$(LOCAL_MODULE_STEM)
|
||||
LOCAL_MODULE_CLASS := ETC
|
||||
|
||||
ifndef LOCAL_MODULE_PATH
|
||||
LOCAL_MODULE_PATH := $(TARGET_OUT)/etc/vintf
|
||||
endif
|
||||
|
||||
GEN := $(local-generated-sources-dir)/$(LOCAL_MODULE_STEM)
|
||||
|
||||
$(GEN): PRIVATE_ENV_VARS := $(LOCAL_ASSEMBLE_VINTF_ENV_VARS)
|
||||
$(GEN): PRIVATE_FLAGS := $(LOCAL_ASSEMBLE_VINTF_FLAGS)
|
||||
|
||||
$(GEN): $(LOCAL_GEN_FILE_DEPENDENCIES)
|
||||
|
||||
ifeq (true,$(strip $(LOCAL_ADD_VBMETA_VERSION)))
|
||||
ifeq (true,$(BOARD_AVB_ENABLE))
|
||||
$(GEN): $(AVBTOOL)
|
||||
# INTERNAL_AVB_SYSTEM_SIGNING_ARGS consists of BOARD_AVB_SYSTEM_KEY_PATH and
|
||||
# BOARD_AVB_SYSTEM_ALGORITHM. We should add the dependency of key path, which
|
||||
# is a file, here.
|
||||
$(GEN): $(BOARD_AVB_SYSTEM_KEY_PATH)
|
||||
# Use deferred assignment (=) instead of immediate assignment (:=).
|
||||
# Otherwise, cannot get INTERNAL_AVB_SYSTEM_SIGNING_ARGS.
|
||||
$(GEN): FRAMEWORK_VBMETA_VERSION = $$("$(AVBTOOL)" add_hashtree_footer \
|
||||
--print_required_libavb_version \
|
||||
$(INTERNAL_AVB_SYSTEM_SIGNING_ARGS) \
|
||||
$(BOARD_AVB_SYSTEM_ADD_HASHTREE_FOOTER_ARGS))
|
||||
else
|
||||
$(GEN): FRAMEWORK_VBMETA_VERSION := 0.0
|
||||
endif # BOARD_AVB_ENABLE
|
||||
$(GEN): PRIVATE_ENV_VARS += FRAMEWORK_VBMETA_VERSION
|
||||
endif # LOCAL_ADD_VBMETA_VERSION
|
||||
|
||||
ifneq (,$(strip $(LOCAL_KERNEL_VERSIONS)))
|
||||
$(GEN): PRIVATE_KERNEL_CONFIG_DATA := kernel/configs
|
||||
$(GEN): PRIVATE_KERNEL_VERSIONS := $(LOCAL_KERNEL_VERSIONS)
|
||||
$(GEN): $(foreach version,$(PRIVATE_KERNEL_VERSIONS),\
|
||||
$(wildcard $(PRIVATE_KERNEL_CONFIG_DATA)/android-$(call remove-minor-revision,$(version))/android-base*.cfg))
|
||||
$(GEN): PRIVATE_FLAGS += $(foreach version,$(PRIVATE_KERNEL_VERSIONS),\
|
||||
--kernel=$(version):$(call normalize-path-list,\
|
||||
$(wildcard $(PRIVATE_KERNEL_CONFIG_DATA)/android-$(call remove-minor-revision,$(version))/android-base*.cfg)))
|
||||
endif
|
||||
|
||||
my_matrix_src_files := \
|
||||
$(addprefix $(LOCAL_PATH)/,$(LOCAL_SRC_FILES)) \
|
||||
$(LOCAL_GENERATED_SOURCES)
|
||||
|
||||
$(GEN): PRIVATE_SRC_FILES := $(my_matrix_src_files)
|
||||
$(GEN): $(my_matrix_src_files) $(HOST_OUT_EXECUTABLES)/assemble_vintf
|
||||
$(foreach varname,$(PRIVATE_ENV_VARS),$(varname)=$($(varname))) \
|
||||
$(HOST_OUT_EXECUTABLES)/assemble_vintf \
|
||||
-i $(call normalize-path-list,$(PRIVATE_SRC_FILES)) \
|
||||
-o $@ \
|
||||
$(PRIVATE_FLAGS)
|
||||
|
||||
LOCAL_PREBUILT_MODULE_FILE := $(GEN)
|
||||
LOCAL_SRC_FILES :=
|
||||
LOCAL_GENERATED_SOURCES :=
|
||||
|
||||
LOCAL_ADD_VBMETA_VERSION :=
|
||||
LOCAL_ASSEMBLE_VINTF_ENV_VARS :=
|
||||
LOCAL_ASSEMBLE_VINTF_FLAGS :=
|
||||
LOCAL_KERNEL_VERSIONS :=
|
||||
LOCAL_GEN_FILE_DEPENDENCIES :=
|
||||
my_matrix_src_files :=
|
||||
|
||||
include $(BUILD_PREBUILT)
|
||||
|
||||
remove-minor-revision :=
|
Loading…
Reference in a new issue