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>
This commit is contained in:
Elliot Berman 2020-05-12 10:52:13 -07:00 committed by Lina Iyer
parent af2d4f76fd
commit 8167da7ded
6 changed files with 152 additions and 1 deletions

View File

@ -8,7 +8,6 @@ OBJCOPY=llvm-objcopy
CLANG_PREBUILT_BIN=prebuilts-master/clang/host/linux-x86/clang-r370808/bin CLANG_PREBUILT_BIN=prebuilts-master/clang/host/linux-x86/clang-r370808/bin
BUILDTOOLS_PREBUILT_BIN=build/build-tools/path/linux-x86 BUILDTOOLS_PREBUILT_BIN=build/build-tools/path/linux-x86
EXTRA_CMDS=''
STOP_SHIP_TRACEPRINTK=1 STOP_SHIP_TRACEPRINTK=1
IN_KERNEL_MODULES=1 IN_KERNEL_MODULES=1
DO_NOT_STRIP_MODULES=1 DO_NOT_STRIP_MODULES=1

46
build.config.msm.common Normal file
View File

@ -0,0 +1,46 @@
################################################################################
## 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

19
build.config.msm.gki Normal file
View File

@ -0,0 +1,19 @@
################################################################################
# Common MSM configuration for building GKI-based kernels
function generate_defconfig() {
${KERNEL_DIR}/scripts/gki/generate_defconfig.sh ${DEFCONFIG}
}
DEFCONFIG=vendor/${MSM_ARCH}-${VARIANT}_defconfig
append_cmd PRE_DEFCONFIG_CMDS 'generate_defconfig'
if [ -z "${GKI_RAMDISK_PREBUILT_BINARY}" ]; then
GKI_RAMDISK_PREBUILT_BINARY=prebuilts/boot-artifacts/${ARCH}/gki-ramdisk.cpio.gz
fi
################################################################################
## menuconfig
function menuconfig() {
${KERNEL_DIR}/scripts/gki/fragment_menuconfig.sh ${DEFCONFIG}
}
export -f menuconfig

42
build.config.msm.lahaina Normal file
View File

@ -0,0 +1,42 @@
################################################################################
## Defaulting required variables
[ -z "${VARIANT}" ] && VARIANT=default
[ -z "${CONFIG_TARGET}" ] && CONFIG_TARGET=msm.lahaina
[ -z "${KERNEL_DIR}" ] && KERNEL_DIR=kernel
################################################################################
## Inheriting configs from ACK
_KERNEL_DIR=${KERNEL_DIR}
. ${KERNEL_DIR}/build.config.common
KERNEL_DIR=${_KERNEL_DIR}
. ${KERNEL_DIR}/build.config.aarch64
################################################################################
## Variant setup
MSM_ARCH=lahaina
BRANCH=msm-5.4
VARIANTS=(qgki-debug qgki gki gki-only)
DT_OVERLAY_SUPPORT=1
BOOT_IMAGE_HEADER_VERSION=3
BASE_ADDRESS=0x80000000
PAGE_SIZE=4096
################################################################################
## Inheriting MSM configs
. ${KERNEL_DIR}/build.config.msm.common
case "${VARIANT}" in
qgki-debug | qgki | gki)
. ${KERNEL_DIR}/build.config.msm.gki
;;
gki-only)
# In gki-only, then using ACK's GKI config directly
. ${KERNEL_DIR}/build.config.gki
;;
*)
echo "Unsupported variant '${VARIANT}'"
;;
esac

2
build.targets Normal file
View File

@ -0,0 +1,2 @@
build.config.msm.lahaina

43
modules.list.msm.lahaina Normal file
View File

@ -0,0 +1,43 @@
proxy-consumer.ko
fixed.ko
qcom_pm8008-regulator.ko
rpmh-regulator.ko
refgen.ko
stub-regulator.ko
clk-dummy.ko
clk-qcom.ko
clk-aop-qmp.ko
clk-rpmh.ko
gcc-lahaina.ko
qnoc-lahaina.ko
icc-bcm-voter.ko
pinctrl-msm.ko
pinctrl-lahaina.ko
iommu-logger.ko
arm_smmu.ko
qcom-arm-smmu-mod.ko
#phy-qcom-ufs.ko
#phy-qcom-ufs-qmp-v4-lahaina.ko
#phy-qcom-ufs-qmp-14nm.ko
ufshcd-crypto-qti.ko
crypto-qti-common.ko
crypto-qti-hwkm.ko
hwkm.ko
#ufs-qcom.ko
qbt_handler.ko
smem.ko
socinfo.ko
dwc3.ko
dwc3-msm.ko
roles.ko
phy-generic.ko
phy-msm-snps-hs.ko
phy-msm-ssusb-qmp.ko
secure_buffer.ko
usb_f_gsi.ko
ipa_fmwk.ko
usb_f_mass_storage.ko
usb_f_diag.ko
usb_f_ccid.ko
usb_f_cdev.ko
typec.ko