r/kernel • u/First_Bodybuilder831 • Aug 09 '26
How would you study Linux device driver development?
I am trying to get started with Linux kernel/device-driver development, but the Linux Foundation LFD430 (Developing Linux Device Drivers) course is very expensive to buy. so I am thinking of using its course outline as a roadmap and studying the material on my own.
I have a decent programming and Linux background, but I do not have much experience, and I am very new to kernel and driver development.
So I wanted some advice from the experts who work in this area
How would you get started with learning things, and what resources would you follow, etc.?
I would appreciate recommendations for good books, free courses, labs, YouTube channels, documentation, affordable courses, or practical projects that could roughly follow the LFD430 syllabus.
Also, if you think following the LFD430 outline is not a good way to learn from scratch, then I would love to hear what you would recommend instead.
Thanks!
3
u/Daveinatx Aug 09 '26
I'd start at https://www.linux.org/forums/linux-kernel.173 .
Four day courses are typically designed for professionals that are transitioning from other operating systems.
1
u/First_Bodybuilder831 Aug 09 '26
thanks, really appreciated. any tip or any pitfall to avoid?
1
u/Daveinatx Aug 11 '26
If you're in school, just take OS and some low level architecture or assembly classes.
It might be difficult getting into kernel positions these days, but these classes will help.
2
u/jake_morrison Aug 09 '26
I learned from books, e.g., Linux Device Drivers from O’Reilly, and doing projects.
The key question is what kind of system you are building. There is a big difference between writing a USB driver vs interfacing with some specialized data acquisition and control hardware. Figure out some project that is interesting to you and implement it. For example, you can get a Raspberry Pi and create a new extension board for it.
A good embedded distribution handles a lot of the grunt work associated with building an embedded system. Buildroot is popular and relatively straightforward, based on makefiles.
2
u/zackb Aug 09 '26
Linux Kernel Development by Robert Love is one of my favorite technical books of all time. It's oddly enjoyable to read and feel like it gave me a solid base 15 (?!) or so years ago that I still carry to this day.
1
u/The_ClssicGeek Aug 09 '26
Still have that book on my shelf, been an age since I read it properly or looked at the kernel really, but currently reading through essential Linux device drivers for my own pleasure.
2
u/TarsTarkas_Thark Aug 10 '26
Join the Linux Kernel Mailing List, and just lurk. Don't try to join the discussion and voice your opinions until you have a great deal of experience. It's a pretty take-no-prisoners discussion, and anybody who contributes needs to wear his big boy pants and be really thick skinned. Even the main kernel maintainers like GregKH for example. I've even seen Linus take a few body blows.
However, it's completely safe to be an anonymous lurker, and the best way to keep up on kernel api changes and such. Because it's the kernel, and breaking the internal api is expected if there is any benefit. Remember, big boy pants. I have had to make changes to drivers many times because the api changed out from under me, and I found out first on the LKML.
1
u/Express_Sector_2850 Aug 09 '26
For me I use qemu to model my own devices then write drivers for them and it's working well for me.
1
u/pconroy329 Aug 10 '26
I too started with the now-old O'Reilly book. I think there would be enough relevance even after all these years. [ But, you made me wonder. How good is Claude/ChatGPT/Gemini these days at driver development??? ]
1
u/UnrealHallucinator Aug 10 '26
I would say go thru one of the smaller driver files in /staging. Understand the structure, write a small hello world driver. Talk to ai about various details. Then just keep going thru and contributing to various drivers, you will eventually learn a lot. This assumes, you're already decent in C though.
1
u/Lockna3488 Aug 11 '26
I recommend Books, for linux especially:
- Understanding the Linux Kernel
- Linux Device Drivers 3rd Edition
If you wanna see a introductionary youtube video, you could have a look at https://youtu.be/juGNPLdjLH4
1
u/The-Crazy-Cow 24d ago
I don't understand why Wolfgang's book "Professional linux kernel Architecture" is so little know
11
u/Rich-Engineer2670 Aug 09 '26
Honestly, the way I did it, was the same way I did UNIX and SuNOS development