1# Copyright (C) 2021 The Android Open Source Project 2# 3# Licensed under the Apache License, Version 2.0 (the "License"); 4# you may not use this file except in compliance with the License. 5# You may obtain a copy of the License at 6# 7# http://www.apache.org/licenses/LICENSE-2.0 8# 9# Unless required by applicable law or agreed to in writing, software 10# distributed under the License is distributed on an "AS IS" BASIS, 11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12# See the License for the specific language governing permissions and 13# limitations under the License. 14LOCAL_PATH := $(call my-dir) 15 16KMI_CHK_SCRIPT := $(LOCAL_PATH)/kmi_compatibility_test.sh 17 18# Current kernel symbol files to be checked 19# Use the one under $(LOCAL_PATH)/sym-5.* by default for self testing. 20# The reason not to use the one under kernel/prebuilts/5.* by default 21# is because the KMI ABI may not be stable during development. 22# 23# Set CURR_5_15_SYMVERS/CURR_5_10_SYMVERS explicitly for the actual 24# current kernel symbol file to be checked. E.g., 25# $ m CURR_5_10_SYMVERS=kernel/prebuilts/5.10/arm64/vmlinux.symvers \ 26# gki_5_10_kmi_compatibility_test 27CURR_5_15_SYMVERS ?= development/gki/kmi_abi_chk/sym-5.15/vmlinux.symvers 28CURR_5_10_SYMVERS ?= development/gki/kmi_abi_chk/sym-5.10/vmlinux.symvers 29 30# Previous kernel symbol files, against which the latest one is checked 31# The file names of previous kernel symbol files are of this form: 32# *.symvers-$(BID) 33# Here *.symvers is a symbolic link to the latest build. 34PREV_5_15_SYMVERS := $(LOCAL_PATH)/sym-5.15/vmlinux.symvers 35PREV_5_10_SYMVERS := $(LOCAL_PATH)/sym-5.10/vmlinux.symvers 36 37include $(CLEAR_VARS) 38LOCAL_MODULE := a13_5_15_kmi_compatibility_test 39LOCAL_MODULE_CLASS := FAKE 40LOCAL_MODULE_TAGS := optional 41LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0 42LOCAL_LICENSE_CONDITIONS := notice 43include $(BUILD_SYSTEM)/base_rules.mk 44 45$(LOCAL_BUILT_MODULE): $(KMI_CHK_SCRIPT) $(CURR_5_15_SYMVERS) $(PREV_5_15_SYMVERS) 46 @mkdir -p $(dir $@) 47 $(hide) $(KMI_CHK_SCRIPT) $(CURR_5_15_SYMVERS) $(PREV_5_15_SYMVERS) 48 $(hide) touch $@ 49 50include $(CLEAR_VARS) 51LOCAL_MODULE := a13_5_10_kmi_compatibility_test 52LOCAL_MODULE_CLASS := FAKE 53LOCAL_MODULE_TAGS := optional 54LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0 55LOCAL_LICENSE_CONDITIONS := notice 56include $(BUILD_SYSTEM)/base_rules.mk 57 58$(LOCAL_BUILT_MODULE): $(KMI_CHK_SCRIPT) $(CURR_5_10_SYMVERS) $(PREV_5_10_SYMVERS) 59 @mkdir -p $(dir $@) 60 $(hide) $(KMI_CHK_SCRIPT) $(CURR_5_10_SYMVERS) $(PREV_5_10_SYMVERS) 61 $(hide) touch $@ 62 63include $(CLEAR_VARS) 64LOCAL_MODULE := a13_kmi_compatibility_test 65LOCAL_REQUIRED_MODULES := a13_5_15_kmi_compatibility_test a13_5_10_kmi_compatibility_test 66LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0 67LOCAL_LICENSE_CONDITIONS := notice 68include $(BUILD_PHONY_PACKAGE) 69