How to change kernel configuration on Android build

Document created by Renato Nogueira Frias Employee on Feb 10, 2020
Version 1Show Document
  • View in full screen mode

Tested on Android 10 (android_Q10.0.0_1.0.0)


After your the first BSP build the kernel sources are at:


For the i.MX8M Mini, You can check the defconfig files being used on:


# imx8mm kernel defconfig
TARGET_KERNEL_DEFCONFIG := android_defconfig
TARGET_KERNEL_ADDITION_DEFCONF := android_addition_defconfig


You could change one of them to add the desired configuration.


- android_defconfig - is ${MY_ANDROID}/vendor/nxp-opensource/kernel_imx/arch/arm64/configs/android_defconfig
- android_addition_defconfig - is on the same folder ${MY_ANDROID}/device/fsl/imx8m/evk_8mm/


"" is called to generate the final defconfig file prior to building the kernel
Check out:


For example, I want to add DEVMEM support on my build:


1. Change the defconfig

I add the line below to android_addition_defconfig


(Or could have added it android_defconfig)


2. Build the kernel

./ kernel -c -j8


3. Verify your change

After compiling, you can confirm your change by reading:



Then rebuild boot.img and reprogram the target.