-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild_abi.sh
executable file
·47 lines (39 loc) · 1.41 KB
/
build_abi.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# SPDX-License-Identifier: GPL-2.0
#!/bin/bash
set -e
DEVICE_MODULES_DIR=$(basename $(dirname $0))
source "${DEVICE_MODULES_DIR}/kernel/kleaf/_setup_env.sh"
# run kleaf commands or legacy build.sh
result=$(echo ${KLEAF_SUPPORTED_PROJECTS} | grep -wo ${PROJECT}) || result=""
if [[ ${result} != "" ]]
then # run kleaf commands
build_scope=internal
if [ ! -d "vendor/mediatek/tests/kernel" ]
then
build_scope=customer
fi
KLEAF_OUT=("--output_user_root=${OUT_DIR} --output_base=${OUT_DIR}/bazel/output_user_root/output_base")
KLEAF_ARGS=("${DEBUG_ARGS} ${SANDBOX_ARGS} --experimental_writable_outputs --noenable_bzlmod")
set -x
(
tools/bazel ${KLEAF_OUT} run ${KLEAF_ARGS} \
--//build/bazel_mgk_rules:kernel_version=${KERNEL_VERSION_NUM} \
//${DEVICE_MODULES_DIR}:${PROJECT}.user_${build_scope}_abi_update_symbol_list
tools/bazel ${KLEAF_OUT} run ${KLEAF_ARGS} //${KERNEL_VERSION}:kernel_aarch64_abi_update
)
if [[ ${MODE} == "user" && ${KLEAF_GKI_CHECKER} != "no" ]]
then
KLEAF_GKI_CHECKER_COMMANDS=("${KLEAF_GKI_CHECKER_COMMANDS} \
-m ${OUT_DIR}/bazel/output_user_root/output_base/execroot/__main__/bazel-out/k8-fastbuild*/bin/${DEVICE_MODULES_DIR}/${PROJECT}_kernel_aarch64.${MODE}/vmlinux")
set -x
(
${KLEAF_GKI_CHECKER_COMMANDS} -o file
${KLEAF_GKI_CHECKER_COMMANDS} -o config
${KLEAF_GKI_CHECKER_COMMANDS} -o symbol
)
set +x
fi
else
echo "Cannnot support ABI check for ${PROJECT}!"
exit 1
fi