How to change kernel configuration on Android build

cancel
Showing results for 
Search instead for 
Did you mean: 

How to change kernel configuration on Android build

How to change kernel configuration on Android build

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

After your the first BSP build the kernel sources are at:
${MY_ANDROID}/vendor/nxp-opensource/kernel_imx/

For the i.MX8M Mini, You can check the defconfig files being used on:
${MY_ANDROID}/device/fsl/imx8m/evk_8mm/UbootKernelBoardConfig.mk

# 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/

"merge_config.sh" is called to generate the final defconfig file prior to building the kernel
Check out: https://source.android.com/devices/architecture/kernel/config

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

1. Change the defconfig

I add the line below to android_addition_defconfig

CONFIG_DEVMEM=y

(Or could have added it android_defconfig)

2. Build the kernel

./imx-make.sh kernel -c -j8

3. Verify your change

After compiling, you can confirm your change by reading:

${MY_ANDROID}/out/target/product/evk_8mm/obj/KERNEL_OBJ/.config


Then rebuild boot.img and reprogram the target.

Labels (1)
Version history
Revision #:
1 of 1
Last update:
‎02-10-2020 04:41 PM
Updated by: