cancel
Showing results for 
Search instead for 
Did you mean: 

Error while building android kernel

TMiha
Associate II

Hi,

I was following the instructions from the ST wiki (How to build kernel for Android) on how to build the android kernel, however, on the last step, when instructed to build the final android images (make -j) I get the following error:

"Cannot extract kernel configs in out/target/product/eval/kernel"

I am attempting to build without any configuration changes or modifications to the kernel.

4 REPLIES 4
Nicolas L
ST Employee

Hi,

For my information, which delivery are you using ?

At least in the Android 10 version, there were a bug in AOSP source in the kernel information extraction script. You have to apply patches as expected using the script: stm32mp1setup

https://wiki.st.com/stm32mpu-ecosystem-v2/wiki/How_to_build_STM32MPU_distribution_for_Android

Regards

Nicolas

TMiha
Associate II

Hi,

I followed the instructions from the wiki you provided to initially setup the environment. Then I followed the kernel build instructions from here (https://wiki.st.com/stm32mpu-ecosystem-v2/wiki/How_to_build_kernel_for_Android).

That is when I get the error.

I am able to run through the first Wiki and build Android 11 successfully and load it on the board. I am trying to do a user build without debug, hence, I believe I have to build the kernel with the correct configuration.

Nicolas L
ST Employee

Hi

I cross-check with the st-android-11.0.0-2021-08-31 version. I didn't have any issue with the build doing from the root directory:

source ./build/envsetup.sh

stm32mp1setup

lunch aosp_eval-user

load_kernel

bspsetup

build_kernel -i

make -j

Can you cross-check three points ?

1- You have CONFIG_IKCONFIG=y in the out-bsp/stm32mp1/KERNEL_OBJ/.config file

2- You have a file out/target/product/eval/kernel up-to-date

3- You can execute without error manually the following command:

./build/make/tools/extract_kernel.py --input out/target/product/eval/kernel --output-configs kernel-configs.txt --output-version kernel-version.txt

Regards

Nicolas

Thank you Nicholas,

I spent some time over the weekend on this and was able to make progress. I had made a mistake when cloning the android source. Now I can build the kernel and the images successfully, however, when I load it on the board it restarts when it tries to load the kernel. I have tried this both with aosp_eval-user and aosp_eval-userdebug.