123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
- ################################################################################
- ## Inheriting configs from ACK
- . "${ROOT_DIR}"/msm-kernel/build.config.common
- . "${ROOT_DIR}"/msm-kernel/build.config.aarch64
- ################################################################################
- ## Variant setup
- MSM_ARCH=autoghgvm
- VARIANTS=(defconfig debug_defconfig debug-defconfig perf_defconfig perf-defconfig)
- [ -z "${VARIANT}" ] && VARIANT=debug_defconfig
- if [ -e "${ROOT_DIR}/msm-kernel" ] && [ "${KERNEL_DIR}" = "common" ]; then
- KERNEL_DIR="msm-kernel"
- fi
- BOOT_IMAGE_HEADER_VERSION=2
- BASE_ADDRESS=0x80000000
- PAGE_SIZE=4096
- BUILD_VENDOR_DLKM=1
- SUPER_IMAGE_SIZE=0x10000000
- TRIM_UNUSED_MODULES=1
- BUILD_INIT_BOOT_IMG=1
- [ -z "${DT_OVERLAY_SUPPORT}" ] && DT_OVERLAY_SUPPORT=1
- if [ "${KERNEL_CMDLINE_CONSOLE_AUTO}" != "0" ]; then
- KERNEL_VENDOR_CMDLINE+=' console=hvc0 androidboot.first_stage_console=1 '
- fi
- KERNEL_VENDOR_CMDLINE+=' bootconfig '
- ################################################################################
- ## Inheriting MSM configs
- . ${KERNEL_DIR}/build.config.msm.common
- # Common MSM configuration for using GKI defconfig as a fragment
- DEFCONFIG="gki_defconfig"
- # boot image macros
- BUILD_BOOT_IMG=1
- BUILD_INITRAMFS=1
- # Apply the perf and debug fragments over the GKI defconfig for a hybrid approach
- function build_defconfig_fragments() {
- if [[ "${VARIANT}" =~ ^(perf_defconfig|debug_defconfig|debug-defconfig)$ ]]; then
- echo "build_defconfig_fragments: Applying GKI and debug defconfigs"
- apply_defconfig_fragment "${KERNEL_DIR}/arch/${ARCH}/configs/vendor"/${MSM_ARCH}.config vendor/${MSM_ARCH}_defconfig
- if [ "${VARIANT}" = perf_defconfig ]; then
- return
- fi
- apply_defconfig_fragment "${KERNEL_DIR}/arch/${ARCH}/configs/vendor"/${MSM_ARCH}_debug.config vendor/${MSM_ARCH}-debug_defconfig
- else
- echo "Variant '${VARIANT}' unsupported"
- exit 1
- fi
- }
- build_defconfig_fragments
|