How are low level device drivers written for Linux?

Go To StackoverFlow.com

3

I remember reading some books about Linux Device drivers around the end of my university education for Comp. Science. Soon there-after I got a job and haven't really worked much with Linux/Embedded (I do mostly java stuff now). However it's something I want to look into.

Anyways I recall reading an online article (ill edit post if I can find it) about writing a USB Driver for Linux for a Little "USB Missile Turret" similar to this: http://www.thinkgeek.com/geektoys/warfare/8a0f/

Anyways it went into detail about how to write the driver without a driver being provided (the guy just found a generic one on ebay....and figured out how to like...write the driver just by looking at the components and such). ANYWAYS it was pretty amazing.

I have a pretty good clue about how low level embedded stuff works, but thats for stuff like AVR's/PIC Microcontrollers, I have no idea how something like this would be written for like a Normal processor in a PC.

Anyways I guess what Im asking is.....how do you figure out this kinda stuff, where would I find such information.

edit: found the link http://matthias.vallentin.net/blog/2007/04/writing-a-linux-kernel-driver-for-an-unknown-usb-device/

(It's way more confusing then I thought, I didn't realize he reverse engineered a Windows USB driver..im guessing it'd be impossible to figure out without snooping through a windows driver?)

2012-04-03 23:53
by NoName
Check this out - but it only focus on one layer. http://free-electrons.com/doc/linux-usb.pd - Peter Teoh 2012-07-18 09:25
this is must read for driver development, have alot of fun like i do during the linux driver development ;- - cerkiewny 2013-05-30 06:41


3

The Linux kernel and drivers are GDFL source. You can read the code, change them, compile them, and experiment to your heart's delight with them. That is a pretty good way to learn.

2012-04-03 23:57
by wallyk