---
author: Sanchayan Maity
title: Starting with Linux Kernel development
tags: linux, kernel
---

<p style='text-align: justify;'> 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.</p>

## C

<p style='text-align: justify;'>One should know C well. If you do not, spend atleast half a year if not more to learn it.</p>

The K & R C book and [this](http://c.learncodethehardway.org/book/) should be where you should probably start.

## Books one should have read

* The Linux Programming Interface - Michael Kerrisk
* Linux Device Drivers - Corbet, Rubini & Hartman
* Linux Kernel Development - Robert Love

<p style='text-align: justify;'>Make sure you have atleast read the above three.</p>

## Tools

<p style='text-align: justify;'>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.</p>

[Git Pro Book](https://git-scm.com/book/en/v2)

<p style='text-align: justify;'>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.</p>

<p style='text-align: justify;'>And last but not the least learn how to use the command line well.</p>

## Email Client

<p style='text-align: justify;'>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.</p>

[Email Client Configuration](http://lxr.free-electrons.com/source/Documentation/email-clients.txt)

## Kernel Documents to be aware of

* [Code Of Conflict](http://lxr.free-electrons.com/source/Documentation/CodeOfConflict)

* [Coding Style](http://lxr.free-electrons.com/source/Documentation/CodingStyle)

* [Submitting Patches](http://lxr.free-electrons.com/source/Documentation/SubmittingPatches)

* [Applying Patches](http://lxr.free-electrons.com/source/Documentation/applying-patches.txt)

* [Kernel Documentation](http://lxr.free-electrons.com/source/Documentation/)

## Read Code

<p style='text-align: justify;'>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...</p>

## Some Practice

<p style='text-align: justify;'>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.</p>

## Install Linux

<p style='text-align: justify;'>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.</p>

## Eudyptula

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