build.config.msm.autoghgvm 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. ################################################################################
  2. ## Inheriting configs from ACK
  3. . "${ROOT_DIR}"/msm-kernel/build.config.common
  4. . "${ROOT_DIR}"/msm-kernel/build.config.aarch64
  5. ################################################################################
  6. ## Variant setup
  7. MSM_ARCH=autoghgvm
  8. VARIANTS=(defconfig debug_defconfig debug-defconfig perf_defconfig perf-defconfig)
  9. [ -z "${VARIANT}" ] && VARIANT=debug_defconfig
  10. if [ -e "${ROOT_DIR}/msm-kernel" ] && [ "${KERNEL_DIR}" = "common" ]; then
  11. KERNEL_DIR="msm-kernel"
  12. fi
  13. BOOT_IMAGE_HEADER_VERSION=2
  14. BASE_ADDRESS=0x80000000
  15. PAGE_SIZE=4096
  16. BUILD_VENDOR_DLKM=1
  17. SUPER_IMAGE_SIZE=0x10000000
  18. TRIM_UNUSED_MODULES=1
  19. BUILD_INIT_BOOT_IMG=1
  20. [ -z "${DT_OVERLAY_SUPPORT}" ] && DT_OVERLAY_SUPPORT=1
  21. if [ "${KERNEL_CMDLINE_CONSOLE_AUTO}" != "0" ]; then
  22. KERNEL_VENDOR_CMDLINE+=' console=hvc0 androidboot.first_stage_console=1 '
  23. fi
  24. KERNEL_VENDOR_CMDLINE+=' bootconfig '
  25. ################################################################################
  26. ## Inheriting MSM configs
  27. . ${KERNEL_DIR}/build.config.msm.common
  28. # Common MSM configuration for using GKI defconfig as a fragment
  29. DEFCONFIG="gki_defconfig"
  30. # boot image macros
  31. BUILD_BOOT_IMG=1
  32. BUILD_INITRAMFS=1
  33. # Apply the perf and debug fragments over the GKI defconfig for a hybrid approach
  34. function build_defconfig_fragments() {
  35. if [[ "${VARIANT}" =~ ^(perf_defconfig|debug_defconfig|debug-defconfig)$ ]]; then
  36. echo "build_defconfig_fragments: Applying GKI and debug defconfigs"
  37. apply_defconfig_fragment "${KERNEL_DIR}/arch/${ARCH}/configs/vendor"/${MSM_ARCH}.config vendor/${MSM_ARCH}_defconfig
  38. if [ "${VARIANT}" = perf_defconfig ]; then
  39. return
  40. fi
  41. apply_defconfig_fragment "${KERNEL_DIR}/arch/${ARCH}/configs/vendor"/${MSM_ARCH}_debug.config vendor/${MSM_ARCH}-debug_defconfig
  42. else
  43. echo "Variant '${VARIANT}' unsupported"
  44. exit 1
  45. fi
  46. }
  47. build_defconfig_fragments