kernel config file location in android

Dreamo picture Dreamo · Mar 2, 2014 · Viewed 17.5k times · Source

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.

Answer

Ishay Peled picture Ishay Peled · Sep 15, 2014

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.