Linux Driver Series
I had wanted to understand how device drivers worked ever since I was in high school. As it turns out, device drivers are relatively easy to understand; it's just hard to find clear and precise explanations.
The goal of this video series is to assemble information from a lot of different places into one cohesive (and self-contained) tutorial. My target audience is at the high school level, but I do assume you understand C code and pointers.
Below you will find a list of my primary resources, and my plan for the different articles in this series.
I am not an authority on Linux. Although I make every attempt to ensure correct information, there can be errors. If you spot any mistakes, I really want to know about it!
Video Series
As I record these videos, I'll fill in the links. I also save all the transcripts to my website.
- Userspace vs. Kernel Space (transcript)
- The "Hello World" Kernel Module (transcript)
- Common Infrastructure in the Kernel ( list_head, kobject, callback registration, etc.)
- The Virtual FileSystem (VFS) layer
- Character Devices, Part 1 (basics)
- The Linux Device Model
- Character Devices, Part 2 (advanced)
- classes
- Race Conditions
- Other File Operations
- Iterrupt Bottom Halves
Resources
Although I said it was hard to find clear and precise explanations, don't get the wrong idea: there is a lot of documentation out there. The information in this series is 90% from the following books/websites, and about 10% is from my own experience.
- Linux Device Drivers, 3rd edition. Don't be fooled by its old age; almost all of the information is still correct. Best of all, the book is free.
- Understanding the Linux Kernel. This book demystifies a lot of Linux kernel internals. I find it's a good starting point when you want to get an idea of what's going on behind the scenes.
- The Linux kernel source code itself. Part of this article series will explain some common techniques used in Linux kernel code; soon you will find that the code is extremely well-written and is much easier to read than you would expect.
- A whole host of one-off posts scattered around the internet. I'll do my best to link them in.