How to add Linux driver to Android system
In this article, the editor introduces in detail "how to add a Linux driver in the Android system". The content is detailed, the steps are clear, and the details are handled properly. I hope this article "how to add a Linux driver in the Android system" can help you solve your doubts.
The Linux kernel is configurable. Enter the linux directory and enter make menuconfig. There will be a module selection interface. The first two sentences are
Scripts/kconfig/mconf Kconfig.config-Linux/x86 3.10.65 Kernel Configuration
Kconfig is the default option, and .config is the current kernel configuration file.
Add new module classes under 1.driver driver
Add obj-$ (CONFIG_TEST_DEVICE) + = test/ to drivers/Makefile file
Add source "drivers/test/Kconfig" to the drivers/Kconfig file
Drivers/test/Kconfig example
You can change the TEST_DEVICE configuration under the Ddevice Driver sub-option in the make menuconfig configuration interface and save it to .config.
You can also add the following directly to the .config file
two。 Add radio drivers that depend on new module classes
Drivers/test/Makefile add obj-$ (CONFIG_TEST_DEVICE) + = radio/
Drivers/test/Kconfig adds source "drivers/test/radio/Kconfig"
Drivers/test/radio/Makefile sample obj-$ (CONFIG_TEST_RADIO_DRIVER) + = radio.o
Drivers/test/radio/Kconfig example
At this point, you can find the loading method of TEST_RADIO_DRIVER in the TEST_DEVICE directory of Device Drivers in the make menuconfig configuration interface.
You can also add CONFIG_TEST_RADIO_DRIVER=m after the CONFIG_TEST_DEVICE=y of the linux3.10/.config file.
Read here, this "how to add Linux drivers in the Android system" article has been introduced, want to master the knowledge of this article also need to practice and use to understand, if you want to know more about the article, welcome to follow the industry information channel.