android_kernel_xiaomi_sm8350/build.config.msm.common
Elliot Berman 8167da7ded build.config: Add build.config files for Lahaina
Add basic build.config files for using Google's kernel/build project on
lahaina.

Change-Id: I81b8d6af3f632b653ab692944da37d9023ab489c
Signed-off-by: Elliot Berman <eberman@codeaurora.org>
2020-06-09 14:25:37 -06:00

47 lines
1.4 KiB
Plaintext

################################################################################
## DTB general support
DTB_DIR=vendor/qcom
function clean_dtbs() {
rm -rf ${OUT_DIR}/arch/${ARCH}/boot/dts
}
append_cmd POST_DEFCONFIG_CMDS 'clean_dtbs'
FILES+="
arch/${ARCH}/boot/dts/${DTB_DIR}/*.dtb*
"
################################################################################
## DT Overlay
function add_dt_overlay_defconfig() {
${KERNEL_DIR}/scripts/config --file ${OUT_DIR}/.config \
-e BUILD_ARM64_DT_OVERLAY
(cd ${KERNEL_DIR} && make "${TOOL_ARGS[@]}" O=${OUT_DIR} ${MAKE_ARGS} olddefconfig)
}
if [ ! -z $DT_OVERLAY_SUPPORT ] && [ ! $DT_OVERLAY_SUPPORT -eq "0" ]; then
append_cmd POST_DEFCONFIG_CMDS 'add_dt_overlay_defconfig'
fi
################################################################################
## Variant Selection
if [ -z "${VARIANT}" ] || [ "${VARIANT}" == "default" ]; then
VARIANT="${VARIANTS[0]}"
fi
if [ ! -z $MSM_ARCH ]; then
BRANCH+=-${MSM_ARCH}
fi
if [ ! -z $VARIANT ]; then
BRANCH+=-${VARIANT}
fi
################################################################################
## menuconfig
function menuconfig() {
(cd ${KERNEL_DIR} && make "${TOOL_ARGS[@]}" O=${OUT_DIR} ${MAKE_ARGS} ${1:-menuconfig})
(cd ${KERNEL_DIR} && make "${TOOL_ARGS[@]}" O=${OUT_DIR} ${MAKE_ARGS} savedefconfig)
mv ${OUT_DIR}/defconfig ${KERNEL_DIR}/arch/${ARCH}/configs/${DEFCONFIG}
}
export -f menuconfig