3 ms·
Because the code is (largely) the documentation, I recommend people to start reading kernel module sources from the bottom up. The bottom is where the initiali
by rubenbe 6y ago
Because the code is (largely) the documentation, I recommend people to start reading kernel module sources from the bottom up.
The bottom is where the initialization happens. The further you move towards the top of the file the more specific the code becomes (register bashing and magic hardware specific values)
- gpanders 6y agoYes! Speaking from personal experience, I fully endorse this approach.
- Bearcban 6y agodo you have any modules in particular that you think are especially good for learning kernel dev?
- rubenbe 6y agoI can recommend the bootlin course to get started with kernel development. https://bootlin.com/training/kernel/ https://bootlin.com/training/kernel/ Additionally, I often use new drivers "published" on Phoronix as example. They are often quite simple. The complexity usually lies in the reverse engineering the hardware, not really in the driver development. E.g. for the apple magic mouse: https://www.phoronix.com/scan.php?page=news_item&px=Apple-Magic-Mouse-2-Linux https://www.phoronix.com/scan.php?page=news_item&px=Apple-Ma... And for corsair PSUs: https://www.phoronix.com/scan.php?page=news_item&px=Linux-Corsair-PSU-Driver https://www.phoronix.com/scan.php?page=news_item&px=Linux-Co...