1. 先配置好两个内核配置文件,放在kernel/msm-4.9/arch/arm64/configs/:
sdm710_defconfig sdm710_-perf_defconfig
(分别用于userdebug和user版本,具体方法看这里)
2. 在device/qcom/sdm710/AndroidBoard.mk中加入:
#----------------------------------------------------------------------
# Compile Linux Kernel
#----------------------------------------------------------------------
ifeq ($(KERNEL_DEFCONFIG),)
ifeq ($(TARGET_BUILD_VARIANT),user)
KERNEL_DEFCONFIG := sdm710_-perf_defconfig
else
KERNEL_DEFCONFIG := sdm710_defconfig
endif
endif