Showing posts with label python. Show all posts
Showing posts with label python. Show all posts

Monday, 23 September 2013

Linux, Python: A script to build linux kernel modules

In my previous posts ([1], [2]), I have been vocal about how irritating the use of the linux kernel build system(kbuild [3]) is. Don't get me wrong, it's a great and necessary tool. It scales up pretty well, as the whole linux kernel can be compiled with it.

The problem is that it doesn't contract too well, i.e. I consider it an overkill for writing and testing kernel modules. For this very reason, I decided to write a small script that takes as input linux kernel module (.c) code file(s) and gives you the linux kernel module object (.ko) code. Magic!



[1]: http://pointer-overloading.blogspot.in/2013/09/a-hello-world-linux-kernel-module.html [2]: http://pointer-overloading.blogspot.in/2013/09/linux-creating-entry-in-proc-file.html [3]: https://www.kernel.org/doc/Documentation/kbuild/makefiles.txt