In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly explains "what is the running test method of the Platform driver under the Android device tree", interested friends may wish to have a look. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn "what is the test method of Platform driver running under the Android device tree"?
1 compile driver
Like the driver test program in the previous section, you need a Makefile file, except that you change the value of obj-m to the led_driver.o,Makefile file as follows:
First, we enter two commands on the terminal (set two environment variables):
Then execute the "make" command to compile the module and complete the compilation to generate the led_driver.ko module file.
2 compile the application test program
The application test program can directly use the led_test application compiled in the previous chapter 44.3.2.
3 run the test
Start the development board and copy the compiled led_driver.ko module files and led_test applications to the / lib/modules/4.1.15 directory. (check the root file system of the development board for the directory "/ lib/modules/4.1.15". If not, you need to create it yourself. The busybox file system provided in the CD material is used in the development board, which is under the directory of "i.MX6UL Terminator CD material\ 08_ Development Board system Image\ 03file system Image\ 01_Busybox File system"). Enter the following command to load the module:
Depmod
Modprobe led_driver
After the driver is loaded successfully, check whether the driver exists in the / sys/bus/platform/drivers/ directory. We set the name field of led_driver (platform_driver type) to "imx6ul-led" in led_driver.c, so there will be a file named "imx6ul-led" in the / sys/bus/platform/drivers/ directory. The result is shown in figure 3.1:
Similarly, the device file for led also exists in the / sys/bus/platform/devices/ directory, that is, the gpioled node in the device tree, as shown in figure 3.2:
When the device and driver match successfully, the information will be entered as shown in figure 3.3:
After the device and driver match successfully, use the led_test application to test it, with the following command:
Use these two commands to verify that the devices and drivers on LED's platform platform are correct.
Uninstall module command:
Rmmod led_driver / / Uninstall driver module
At this point, I believe you have a deeper understanding of "what is the test method for running Platform drivers under the Android device tree". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!
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.