LinuxDeviceDrivers

所属分类:驱动编程
开发工具:Batchfile
文件大小:0KB
下载次数:0
上传日期:2018-10-06 09:47:49
上 传 者sh-1993
说明:  Linux设备驱动程序编程
(Linux Device Drivers Programming)

文件列表:
LICENSE (35149, 2018-10-06)
char_driver/ (0, 2018-10-06)
char_driver/.char_driver.ko.cmd (235, 2018-10-06)
char_driver/.char_driver.mod.o.cmd (28446, 2018-10-06)
char_driver/.char_driver.o.cmd (35868, 2018-10-06)
char_driver/Makefile (188, 2018-10-06)
char_driver/Module.symvers (0, 2018-10-06)
char_driver/char_driver.c (2915, 2018-10-06)
char_driver/char_driver.ko (7728, 2018-10-06)
char_driver/char_driver.mod.c (542, 2018-10-06)
char_driver/char_driver.mod.o (2536, 2018-10-06)
char_driver/char_driver.o (7432, 2018-10-06)
char_driver/modules.order (45, 2018-10-06)
char_driver/test (8816, 2018-10-06)
char_driver/test.c (236, 2018-10-06)
hello_world/ (0, 2018-10-06)
hello_world/Makefile (188, 2018-10-06)
hello_world/hello_world.c (640, 2018-10-06)
reader_writer/ (0, 2018-10-06)
reader_writer/Makefile (190, 2018-10-06)
reader_writer/Module.symvers (0, 2018-10-06)
reader_writer/modules.order (62, 2018-10-06)
reader_writer/reader_writers.c (4365, 2018-10-06)
reader_writer/reader_writers.ko (10560, 2018-10-06)
reader_writer/reader_writers.mod.c (542, 2018-10-06)
reader_writer/reader_writers.mod.o (2544, 2018-10-06)
reader_writer/reader_writers.o (10424, 2018-10-06)

# LinuxDeviceDrivers Linux Device Drivers Programming - Concepts and Examples # Introduction Device drivers take on a special role in the Linux kernel. They are distinct “blackboxes” that make a particular piece of hardware respond to a well-defined internal programming interface; they hide completely the details of how the device works. User activities are performed by means of a set of standardized calls that are independent of the specific driver; mapping those calls to device-specific operations that act on real hardware is then the role of the device driver. This programming interface is such that drivers can be built separately from the rest of the kernel and “plugged in” at runtime when needed. This modularity makes Linux drivers easy to write, to the point that there are now hundreds of them available. ## Modularity A simple way to understand modularity is to treat every Device Driver code as a module which can be loaded on-demand. Let us now look how we load the Linux Driver to the Operating System. ``` bash insmod /path/to/driver_name.ko # This is to insert the module on to the Linux Kernel. rmmod /pth/to/driver_name.ko # This is to remove the module that is currently running. modinfo /path/to/driver_name.ko # Obtain Information about the current module. lsmod # Gets the list of modules loaded to the Linux Kernel - /proc/modules ``` ## Table of Contents 1. [Hello World to our Linux Drivers](https://github.com/sribs/LinuxDeviceDrivers/tree/master/hello_world) 2. [Advancing from the Hello World - Passing parameter to our Module](https://github.com/sribs/LinuxDeviceDrivers/tree/master/module_param) 3. [Character Drivers - A Simple Virtual Driver](https://github.com/sribs/LinuxDeviceDrivers/tree/master/char_driver) 4. [Advancing the Character Driver - Process Synchronization - Reader Writer Problem](https://github.com/sribs/LinuxDeviceDrivers/tree/master/reader_writer) 5. [IOCTL - Input Output Control](https://github.com/sribs/LinuxDeviceDrivers/tree/master/ioctl) 6. [Procfs - Process File System](https://github.com/sribs/LinuxDeviceDrivers/tree/master/procfs) 7. [Wait queue](https://github.com/sribs/LinuxDeviceDrivers/tree/master/wait_queue) 8. [Sysfs](https://github.com/sribs/LinuxDeviceDrivers/tree/master/sysfs) 9. [Interrupts](https://github.com/sribs/LinuxDeviceDrivers/tree/master/interrupts) 10. [Work Queue](https://github.com/sribs/LinuxDeviceDrivers/tree/master/work_queue) 11. [Linked List](https://github.com/sribs/LinuxDeviceDrivers/tree/master/linker_list) 12. [Kernel Thread](https://github.com/sribs/LinuxDeviceDrivers/tree/master/kernel_thread) 13. [Mutex](https://github.com/sribs/LinuxDeviceDrivers/tree/master/mutex) 14. [Spinlock](https://github.com/sribs/LinuxDeviceDrivers/tree/master/spinlocks)

近期下载者

相关文件


收藏者