Linux Kernel Development
There’s a very interesting article from Jonathan Corbet of Linux Weekly News that offers tips for people who are just getting started with Linux Kernel development.
As a Kernel newbie myself, I found the article highly informative, and even though it is a bit on the long side it is definitely worth a full read.
For me some key takeaways were:
- Get the staging trees “-mm” (Andrew Morton’s tree) and “linux-next” (where the mainline kernel is going in the near future). According to the article the above staging trees will most likely have very noticeable bugs, and may not even compile. So, this is a good starting point for people who want to get their feet wet.
- Look at the MAINTAINERS file in the Linux source tree, and figure out who the maintainer is for the section of the Kernel you are interested in. You will need to build a relationship with that maintainer if your code is going to go anywhere.
- Try to split your patches into manageable chunks. Communicate early and often on what you are trying to do, and be clear on what problem your patch is solving. Sections 5.4 and 5.5 have a step-by-step guide on the mechanics of submitting patches which can pretty much be followed in cookbook fashion.
- Code checking. Two common gotachas in kernel development is writing code for multiple processors, and writing code that will work over a variety of different CPU architectures. Section 4.5 has a lots of good advice on compiler flags and tools that will spot some of these problems.
Did you enjoy this post? Why not leave a comment below and continue the conversation, or subscribe to my feed and get articles like this delivered automatically to your feed reader.



Comments
No comments yet.
Leave a comment