2019-2020-1 20,175,302 201,752,314 20,175,316 Experiment 4 Peripheral Driver Design
Purpose
- The easiest character to write drivers
- Simple read and write functions, and lists common format
Makefile
and script-driven loading and unloading Familiar with the whole process to write a character device driver
Experimental content and procedures
A task
- Learning Resources in Chapter XI of the whole class of "hqyj. Embedded Linux application development standard tutorial .pdf" in
Submit photos Cornell notes (can be more than one)
notes
20175302
20175314
-20175316
Task II
Mission requirements
- In Ubuntu Resources completed a full course of "hqyj. Embedded Linux application development standard tutorial .pdf" Chapter XI test test
Submit to compile, load modules, unloading modules, test run of shots (to multiple, full-screen, reflecting the student number information)
Experimental Procedure
- VMware virtual machines created in the folder
Chapter XI of the experiment will test the character code on the device:
test_drv.c
,test.c
,Makefile
,test_drv_load
,test_drv_unload
typing and save the file in the folderNote that the command line feed to use the Tab key to indent in the Makefile
The results and screenshot
- Compile and load the module
compilation:make clean;make
to increase the script file executable permissions:chmod +x ./test_drv_load
Run as administrator to load the script:sudo ./test_drv_load
- Compile and run the test program
compiled: gcc -o test test.c
added to the file executable permissions: chmod +x ./test
Run as administrator: sudo ./test
If prompted, enter information