kernel config file location in android
Asked Answered
B

3

9

I need to compile custom kernel with dvb-t drivers as kernel modules on _rkm mk602_ android device with rk3066 processor.

I have downloaded the kernel source for this processor, however I am having trouble configuring kernel for this device from scratch. Is there a way I can withdraw current kernel config file from device? So then I can only modify what I need in menuconfig and other stuff will be already configured correctly.

Alternatively, if I would just compile needed kernel modules, how do I know which toolchain should I use to be compatible with running kernel.

Barbule answered 2/3, 2014 at 15:5 Comment(0)
C
7

Unfortunately, the config file will only be included in the kernel image only if the person compiling it specified it (most do not). You can look at /proc/config.gz if you're in luck, it will be there.

If you have the kernel source, it's worth having a look at /arch/arm/configs - most Android kernel's I've seen will have the default config for your CPU and you can start from there.

You can compile external module for the Android kernel just like you compile a normal Linux module. Just make sure you use the kernel tree you downloaded as the kernel headers. It may or may not work depending on how close the kernel you downloaded to the actual running kernel.

Copter answered 15/9, 2014 at 14:53 Comment(0)
C
1

On a rooted Huawei Mate20 I could find the config in /proc/config.gz

$adb shell zcat /proc/config.gz

worked for me.

Conceit answered 9/1, 2020 at 23:55 Comment(0)
M
-1

You should

cd /path to kernel folder
make config

And then

cat .config
Mind answered 11/10, 2018 at 6:59 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.