Creating Driver
Hello Guys,
I am new to system programming and wanted to write some small drivers like of keyboard and mouse I am not able to figure out from where to start and what should I read to write it. Please help me with it. Thank You |
You want to look into 'linux kernel module programming', which is a nontrivial task for actual hardware drivers. This howto from The Linux Documentation Project explains it.
If you want to write some small and easy drivers, it would be easier to write a kernel from scratch, using James Molloy's Kernel Development Tutorial. |
"Use the Source, Luke!"
If you install the kernel source packages for your distro, you'll find the source-code for literally hundreds of device drivers. If one of these is not exactly what you need, it will be "damm close." And so, that is the proper place to start. Find existing tested source-code that is 99.9% of what you're looking for, and tweak it. |
No one should start touching device drivers without reading this book: http://lwn.net/Kernel/LDD3/ For some reason I still don't understand this excellent source is freely available.
Furthermore a rich source of information is http://www.comedi.org. jlinkels |
Thankx for all your replies.
Actually I dont want to design the driver for a specific device. I want to just design a driver to learn how a driver(for eg keyboard) is working and how it is created. So from where should I start for it?? |
Quote:
Do bear in mind that the Linux kernel has evolved considerably over time, so, although books are fine, the documentation directory that comes with the kernel tree, and the kernel itself, should be your primary reference. Once you've got the essential concepts and ideas straight in your head. |
All times are GMT -5. The time now is 02:22 AM. |