Starting with Linux Kernel development

Posted on May 30, 2015 by Sanchayan Maity
Tags: linux, kernel

I started teaching myself Linux since end of 2012 and since last few months I am finally getting to do what I wanted to. Gonna share here some points which you should keep in mind before starting with Linux.

C

One should know C well. If you do not, spend atleast half a year if not more to learn it.

The K & R C book and this should be where you should probably start.

Books one should have read

Make sure you have atleast read the above three.

Tools

It is important that one knows how to use the right tools. git is the first you should learn. It is an awesome distributed version control system and one can learn it from the following book. It’s pretty good and covers everything one needs while being an easy read.

Git Pro Book

Next comes the editors. If you are coming from an application programming background, you might reach out for an IDE. I would recommend spending some time and learning how to use vim or emacs. Both are extremely powerful and configurable. Do not get into the editor wars, try both and see which one suits you. I picked emacs because the modal nature of vim is somehow not to my liking. Pick one and keep learning it. Do not be discouraged by the fact that it takes time to master them, it will be worthwhile your time. While you will not become a master, but, you will be productive in a few days.

And last but not the least learn how to use the command line well.

Email Client

If you start doing kernel development, you will have to send emails and patches. Patches can be send via git however while replaying to mails on mailing lists, all mails are expected to be in plain text. No HTML or base64 attachments. Gmail web interface won’t do. Thunderbird can be configured for this. However, if you do come to like the command line try having a look at Mutt. You can find how to configure it in my previous posts. Also have a look at the kernel documentation.

Email Client Configuration

Kernel Documents to be aware of

Read Code

No substitute for this. The only way one can learn is to read and read more code. At some point, you will start to get it. It will start to all make sense, like Neo sees the Matrix in the end…

Some Practice

Get a board like Beagleboard xM or Beaglebone and get started. I started by getting my hands dirty with Beagleboard xM and you need to learn how to use tools like Buildroot and Openembedded, build a root file system, flash kernel image and the root file system.

Install Linux

Install Linux. Try with perhaps a virtual machine first but I did recommend going with a full blown dedicated install. Try Gentoo, Slackware or Arch Linux. These distributions give more control to the user and you will get to learn things you probably wouldn’t with something like Ubuntu. Arch Linux has a great wiki which is a treasurehouse of information. Install it and start learning command line, building your own kernels and booting them.

Eudyptula

Check out the Eudyptula Challenge at eudyptula-challenge.org.