android_kernel_xiaomi_sm8450/build.config.msm.gki
Elliot Berman 58567cd013 build.config.msm.gki: Add other symbol lists
Due to limitation of ABI checker, ABI differences can be reported if
symbol list of the reference ABI snapshot does not match. Add the
missing the other symbol lists.

The benefit lost by adding other symbol lists is that build_abi.sh would
not report missing symbols from abi_gki_aarch64_qcom symbol list since
symbol may be added by another contributor, but not into
abi_gki_aarch64_qcom list. This benefit can be re-acquired by pre-merge
checks.

Change-Id: Ie66bde15e7e8b085936faaecc06f0df91a42074d
Signed-off-by: Elliot Berman <eberman@codeaurora.org>
2021-10-07 11:36:14 -07:00

88 lines
2.9 KiB
Plaintext

################################################################################
# Common MSM configuration for building GKI-based kernels
DEFCONFIG="gki_defconfig"
# Configuration options to build images for MSM targets
# Must be included AFTER build.config.msm.<target>
MODULES_LIST=${KERNEL_DIR}/modules.list.${CONFIG_TARGET}
# boot image macros
BUILD_BOOT_IMG=1
BUILD_INITRAMFS=1
ABI_DEFINITION=android/abi_gki_aarch64.xml
KMI_SYMBOL_LIST=android/abi_gki_aarch64_qcom
ADDITIONAL_KMI_SYMBOL_LISTS="
android/abi_gki_aarch64
android/abi_gki_aarch64_core
android/abi_gki_aarch64_db845c
android/abi_gki_aarch64_exynos
android/abi_gki_aarch64_exynosauto
android/abi_gki_aarch64_fips140
android/abi_gki_aarch64_galaxy
android/abi_gki_aarch64_generic
android/abi_gki_aarch64_hikey960
android/abi_gki_aarch64_imx
android/abi_gki_aarch64_mtk
android/abi_gki_aarch64_oplus
android/abi_gki_aarch64_rockchip
android/abi_gki_aarch64_unisoc
android/abi_gki_aarch64_virtual_device
android/abi_gki_aarch64_vivo
android/abi_gki_aarch64_xiaomi
"
KMI_SYMBOL_LIST_MODULE_GROUPING=0
KMI_SYMBOL_LIST_ADD_ONLY=1
KMI_ENFORCED=1
MAKE_GOALS="modules dtbs"
GKI_KERNEL_DIR=common
GKI_BUILD_CONFIG=${GKI_KERNEL_DIR}/build.config.gki.aarch64
GKI_SKIP_IF_VERSION_MATCHES=1
GKI_SKIP_CP_KERNEL_HDR=1
function sanity_check_abi() {
if [ -z "${GKI_BUILD_CONFIG}" ] ; then
# When running build_abi.sh, mixed build is explicitly disabled
# In that case, turn on some options for trimming and strict mode
# which would normally be disabled because they conflict with
# mixed build
if [ "${VARIANT}" = gki ]; then
TRIM_NONLISTED_KMI=1
KMI_SYMBOL_LIST_STRICT_MODE=1
fi
return
fi
if ! diff -q "${ROOT_DIR}/${KERNEL_DIR}/android/abi_gki_aarch64.xml" \
"${ROOT_DIR}/${GKI_KERNEL_DIR}/android/abi_gki_aarch64.xml" ; then
echo "Suspected ABI differences between ${BRANCH} and GKI kernel tree."
echo "Are trees in sync?"
exit 1
fi
}
append_cmd POST_DEFCONFIG_CMDS 'sanity_check_abi'
function build_defconfig_fragments() {
if [[ "${VARIANT}" =~ ^(gki|consolidate)$ ]]; then
apply_defconfig_fragment ${KERNEL_DIR}/arch/${ARCH}/configs/vendor/${MSM_ARCH}_GKI.config vendor/${MSM_ARCH}-gki_defconfig
if [ "${VARIANT}" = gki ]; then
return
fi
GKI_BUILD_CONFIG=common/build.config.gki-debug.aarch64
GKI_GKI_DEFCONFIG_FRAGMENT=common/build.config.gki_consolidate.aarch64
# ABI comparison isn't applicable on consolidate variant
unset ABI_DEFINITION
apply_defconfig_fragment common/arch/${ARCH}/configs/consolidate.fragment consolidate_defconfig
apply_defconfig_fragment ${KERNEL_DIR}/arch/${ARCH}/configs/vendor/${MSM_ARCH}_consolidate.config vendor/${MSM_ARCH}-consolidate_defconfig
elif [ "${VARIANT}" = gki-ack ]; then
# In gki-only, then using ACK's GKI config directly
. ${KERNEL_DIR}/build.config.gki
else
echo "Variant '${VARIANT}' unsupported by gki"
exit 1
fi
}
build_defconfig_fragments