Where do I go to learn about writing device-drivers [closed]

I do not know how to write this any simpler. I have several books on Linux device-drivers, but I need a little help to get started.


Solution 1:

Since you are asking here at askubuntu, I'll just assume that you intend to develop for the Linux kernel. You are not mentioning anything in specific, so here are some tips:

Concept:

A device driver is a program that controls a particular type of device that is attached to your computer.

This means that a device driver acts as translator between a hardware device and the applications or operating systems that use it.


Requisits:

In order to develop Linux device drivers, it is necessary to have an understanding of the following:

  • C programming. Some in-depth knowledge of C programming is needed, like pointer usage, bit manipulating functions, etc.

  • Microprocessor programming. It is necessary to know how microcomputers work internally: memory addressing, interrupts, etc. All of these concepts should be familiar to an assembler programmer.

  • Last but not the least, the Linux Kernel is what stands between all that you'll be doing.


Resources, Links and Help:

  • Writing device drivers in Linux: A brief tutorial (knowing what you're in for)

  • Linux Kernel 2.6 Programming guide (learning about the backstage)

  • Linux Device Drivers, Third Edition (PDF)

  • UbuntuDevelopment (here you might get some help from other Ubuntu developers)


Practical example:

A step by step how-to, with a goal of making a simple USB lamp device, and its driver for Linux:

Writing a Simple USB Driver | Linux Journal

Give your Linux box a multicolored light you can see from across the room, and learn how to write a simple driver for the next piece of hardware you want to hook up.