Changing ZTE Blade Kernel configuration file for CM9

June 21, 2012



In CM9, device's kernels source code should be integrated with CM9's source code. So, if you have the CM9 source code, you probably have a kernel/folder with the source code.

Imagine you need to check if some device driver is activated on the kernel. Basically, you need to check it in the kernel build configuration file, but where is it? Ok, the answer can be found at http://wiki.cyanogenmod.com/wiki/Integrated_kernel_building.

For ZTE Blade, in kernel/zte/zte-kernel-msm7x27/arch/arm/configs, the kernel configuration file is cyanogen_blade_defconfig. If you open it, you’ll see things like this:

#
# Miscellaneous I2C Chip support
#
# CONFIG_MSENSORS_FROM_AUXI2C_TO_I2C is not set
# CONFIG_GSENSORS_FROM_AUXI2C_TO_I2C is not set
CONFIG_SENSORS_ONA3301=y
CONFIG_SENSORS_ISL29026=y
CONFIG_SENSORS_TSL2771=y
# CONFIG_SENSORS_BH1721 is not set
CONFIG_SENSOR_ADXL34X=y
CONFIG_SENSOR_ACCELERATOR=y

In my case, I wanted to confirm (or enable) the driver of the ADXL34x 3-axis accelerometer. In this case, it is set to be used by the kernel, so work done. But you could use a better tool to see this, especially if the strings above start to be strange.

So, you could "cd" into cm9/kernel/zte/zte-kernel-msm7x27, and here, do make menuconfig in the terminal. You would get something like this:

Menuconfig is a terminal application which allows you to navigate through some hierarchic options and select/deselect them. As we already have a configuration file for the ZTE Blade kernel, we would use Load an Alternate Configuration File. In the next menu, we must insert the location and name of the configuration file which is arch/arm/configs/cyanogen_blade_defconfig:

Then hit Enter for ok. Finally, going through Device Drivers – I2C Support – Miscellaneous I2C Chip Support, as you can see, the ADXL34x driver is selected.

Then hit Exit until requested to save the file. If you changed some settings, you would need to save them..

Ta da...