Ever wanted to write your own Linux Kernel module? Here’s how.

A lot of my friends are Linux fanatics. Pretty often, we get into the topics like why don’t we create our own Operating System? Well, we did try something, and came across a lot of tutorials that helped us. Writing an entire operating system based on Linux is not something that we can do with just a cup of coffee, and a dark room with a computer. It requires a lot of effort, that would even cost you your day-job.

But then, there’s something you can do to slowly get into the habit of writing something big, and throughly understanding the entire concept of Linux and its Kernel Modules. This tutorial, on Linux Voice is super helpful, and it is worth investing your time in writing your own Kernel Module.

Here’s an introductory quote from Linux Voice, talking about writing your own Kernel Module, and why it is important to start off with writing Kernel Modules:

Probably the easiest way to start kernel programming is to write a module – a piece of code that can be dynamically loaded into the kernel and removed from it. There are limits to what modules can do – for example, they can’t add or remove fields to common data structures like process descriptors. But in all other ways they are full-fledged kernel-level code, and they can always be compiled into the kernel (thus removing all the restrictions) if needed. It is fully possible to develop and compile a module outside the Linux source tree (this is unsurprisingly called an out-of-tree build), which is very convenient if you just want to play a bit and do not wish to submit your changes for inclusion into the mainline kernel.

You can read the entire article at the Linux Voice website. Alternatively, if you are around Chennai, please feel free to catchup with our team at Skcript. We ‘might‘ be building something along these lines, and who knows? You might be the person we’ve been looking for. Connect with us over Twitter, Facebook or Google+.

Subscribe to 4CAST

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 23 other subscribers