1. The role of the device driver:
A device program is a stand-alone "black box" that enables a particular hardware to respond to a well-defined internal programming interface that completely hides the work details of the device. The actions of the user are performed through a set of standardized calls that are independent of the specific driver. Mapping these calls to device-specific operations that act on the actual hardware is the task of the device driver.
2. The role of the driver:
The driver should handle the problem of how to use hardware, and how to use the hardware to leave the problem to the upper application. (Provide a mechanism, not a policy)
3. Kernel function Partitioning:
Process Management memory management file system Device control network function
4. Classification of equipment:
Character device block Device network interface
5. Security Policy:
Driver writers should try to avoid implementing security policies in your code. Security policy issues are best managed by the system administrator, and are implemented by the top level of the kernel.
6. Kernel stack:
The kernel has a very small stack, which may be just like a 4096-byte size page.
7. Module-Related:
Make compilation module
Insmod Loading Module
Rmmod removing modules
DMESG display of PRINTK printed data
8. Two Make tutorials:
1). http://blog.csdn.net/haoel/article/details/2886
2). http://www.gnu.org/software/make/manual/make.html
9.Linux Device Driver Third Edition instance:
https://github.com/alants56/ldd3-examples-3.x
10. Some feelings:
Learning for almost a week, the overall feeling a little vague. The main reason for this is the lack of knowledge and experience about some Linux. But there has been a lot of progress compared to last year (the last few chapters have been abandoned). Whatever the technology, getting started is going to take some time. If there is a good bit of getting started video or a teacher pointing out, will be more effective.
Linux Device Driver Learning notes (i)