In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/01 Report--
In this article, the editor introduces in detail "how to compile the driver in the way of modules", the content is detailed, the steps are clear, and the details are handled properly. I hope that this article "how to compile the driver in the way of modules" can help you solve your doubts.
This document focuses on compiling drivers in modules mode in iTOP-i.MX6Q development board and device tree kernel.
Here, take the compilation of the qt kernel of imx6q (similar to imx6d and plus) as an example, the kernel of Ubuntu16 and
Qt is generic, and the configuration of android6.0 is similar to that of qt.
The document first introduces several files related to driver compilation, Kconfig, Makefile. In addition, the .config file and
Menuconfig file, you can refer to the "iTOP-iMX6- device tree kernel-default file configuration _ V1.X" document and
"iTOP-iMX6- device Tree Kernel-use of menuconfig _ V1.X" document.
Here, take the led driver as an example. The driver source code is the "itop6x_led.c" file under "drivers/char/", as shown in the following figure.
As shown.
Open the Makefile file under "drivers/char/", as shown in the following figure, and you can see that the macro that compiled led is
"CONFIG_LEDS_CTL".
The above file does not need to be modified. Open the "Kconfig" file under "drivers/char/" and search
"LEDS_CTL", as shown in the following figure, change bool to tristate.
Modify and save.
To reconfigure the default file, refer to "iTOP-iMX6- device Tree Kernel-configuration of default File _ V1.X" configuration default
Save the file, recompile the kernel, as shown in the following figure, you can see that the "itop6x_led.ko" file is generated.
Burn the regenerated kernel to the development board (be careful not to burn the image that comes with the CD, which has been added
Led driver), after the new image is written, query "/ dev/led*" in the console, there should be no such device node.
Copy "itop6x_led.ko" to the development board, as shown in the following figure, using the command "insmod itop6x_led.ko"
Load the driver.
Using the command "ls / dev/led8", you can see the device node generation, as shown in the following figure.
After reading this, the article "how to compile drivers in modules" has been introduced. If you want to master the knowledge points of this article, you still need to practice and use it yourself. If you want to know more about related articles, welcome to follow the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.