u/TribeWarsin r/embedded • Recommends
On “Want to write a Linux driver for my final year project — roadmap advice + how to approach learning the kernel?”
Here's someone developing and debugging a small USB driver:
[video
I think the most important thing to understand and to get right is how to deal with concurrency in the kernel:
https://www.kernel.org/doc/html/latest/kernel-hacking/locking.html
and https://www.kernel.org/doc/html/latest/kernel-hacking/hacking.html to explain IRQ levels
https://arxiv.org/abs/1701.00854
https://www.kernel.org/doc/Documentation/memory-barriers.txt (If you think you can avoid locking, you probably need memory barriers)
I suggest occasionally reading the code behind the APIs the docs tell you to use:
https://elixir.bootlin.com/linux is a great resource
This site is great for having tons of small exa…