12

Changing ZTE Blade Kernel configuration file for CM9

 3 years ago
source link: https://joaoventura.net/blog/2012/cm9-zte-blade-kernel/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

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:

kernel_menuconfig1.png

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:

kernel_menuconfig2.png

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.

kernel_menuconfig3.png

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

Ta da...


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK