Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to code drivers?

I want to code drivers in C in linux os, though I think its very tough. Can I get some hints as to how to start or books to follow? Drivers can be from my USB port to graphics card!!

I know as to where I can search for books, I would like to know as to what the basic knowledge I should start with. Do I need to have hardware knowledge and which specific books are good for novice like me?

like image 906
Hick Avatar asked Jun 10 '09 13:06

Hick


3 Answers

try amazon !! there is many books there for drivers . some have samples 2 !!

like image 160
eduffy Avatar answered Oct 18 '22 14:10

eduffy


Drivers differ greatly in complexity depending on the device. USB drivers are on the simple side of the spectrum; GPU drivers are massively complex and even the authors of those drivers usually don't know everything that they do. My recommendation would be focusing on drivers for hardware you personally care about, rather than trying to be a jack-of-all-hardware; it'll be easier in the long run.

Everybody else's answers about documentation sources and various things to read are spot-on and you should really accept one of them.

Many of the more complex driver communities have their own domain-specific information as well. If you want to write a GPU driver, the DRI/DRM and Mesa communities have their own wikis and mailing lists which will help you out greatly, as well as their own documentation. http://dri.freedesktop.org/ is a decent starting place, as is http://wiki.x.org/.

Hope this helps!

like image 32
Corbin Avatar answered Oct 18 '22 15:10

Corbin


Start with Linux Device Drivers by Rubini and Corbet, published by O'Reilly.

It's also available as a free PDF download.

like image 38
Roddy Avatar answered Oct 18 '22 13:10

Roddy