Hi, I was just wondering if anybody here had done any kernel development as their personal project before. I understand that itís something which is really huge development. What Iím trying to see if anyone here has made an attempt to develop at least few modules of it and how far they thro.
And also are there materials or books which I could refer to get more information on the kernel or OS development.
Thanks a lot!
I've written a couple of very small but functional kernel* modules, if you want to look at the outcome, here's a thread:
I was going to write a driver for an unsupported usb webcam I found, but someone beat me to the punch (I'm glad for that, to be honest -- the "USB video class device specification" is 150+ pages). Anyway, linux kernel programming is very definitely it's own realm (all C & asm -- apparently Linus thinks C++ is tish). There are some "hello world" module tutorials around if you google, that provide some orientation. Beyond that, there are very few resources on the web -- I dished out for some books, there are a few in print. You can ask me for an opinion if you want.
There is actually a kernel programming forum at LinuxQuestions.org (a sub forum under "software"). It only sees a few messages a day, but there are I think knowledgeable regulars.
*I'm just presuming you mean linux or some other open source kernel of course...MS has unmarked helicopter squads to deal with hacking that kernel.
>*I'm just presuming you mean Linux or some other open source kernel of course...MS has unmarked helicopter squads to deal with hacking that kernel.
Well, that’s right. Not a great fan of MS anyway. I really wanted to get involved with some personal project at home. I get really sick of work which I do at office.
But thanks alot MK27!
Anyone else, involved ???
I did some "modules" for Linux and some "servers" for Plan9, but these were more like those I-have-to-do-it-at-least-once projects. From a theoretical point of view, I know some details about the basics (memory management, scheduling, interrupts, processes, threads, ...), but I consider it too much of a hassle to actually implement stuff like that myself.
If you want to write a new OS, I suggest "Modern Operating Systems" by Andrew Tanenbaum. It's very well written, and can be understood by ambitioned beginners.
If you want to participate in the Linux development, it's probably best to start writing arbitrary modules, reading source code and the LKML. Once you know some of the commonly used functions in the Linux kernel, you can start reading a book and learn about the basic design, which you wouldn't believe there is after reading /usr/src/linux/arch/.
There is also this site which someone on a mailing list pointed out to me:
Linux Kernel Newbies - Linux Kernel Newbies
It is not quite just for programmers, but from the looks of things it is mostly so. Also, they do organized collaborative projects such as bug fixes (look under "kernel janitors" and "kernel mentors"), which you will be welcome to join.
There is a kernel mentoring mailing list too, for tough questions, if you pm me I might be able to dig up the address...
In a year I don't remember clearly, I independently invented the concept of "futexes" and implemented them correctly (on x86 at least). Of course, I was outclassed, and my implementation never saw the light of day, much less stood any real competition against the current implementation. It was, however, around the same time that the other line of development was happening. (Independent inspiration -- I didn't know other people were doing the same thing or I probably would have deferred immediately)
That's the whole of my Linux kernel development experience.
My claim to fame is that I wrote the first PowerNow! driver for Linux. Whilst I was technically working for AMD at the time, I did the work privately during a few weeks when I was staying in a hotel on a work-assignment in Austin. Whilst nearly all of the code has been changed now (and my name isn't in the credits :( ), the current PowerNow! driver is still based on the code I wrote!
I have also done a fair bit of work inside various kernels as a professional:
- Modifying a AMD Ethernet driver to use MMIO rather than DMA (because of architecture of the target system not supporting DMA).
- Port RTOS from 29K to x86-32.
- Port another RTOS from 68K to x86-32.
- Working on Windows graphics drivers.
- Working on Xen Virtualization for HVM/SVM.
- Currently working inside a RTOS and Graphics drivers.
Originally Posted by ssharish2005
If you're looking for Linux stuff, Linux Device Drivers, 3rd ed. is available online for free. I also recommend 'Essential Linux Device Drivers,' and 'Linux Kernel Development, 2nd edition.'
For windows, I recommend 'Microsoft Windows Internals' (I read 4th edition; latest is 5th edition,) as well as 'Programming the Microsoft Windows Driver Model, 2nd edition.' The second book is excellent, but mostly concerns the XP-era kernel. Developing drivers on XP is simple and pretty neat; Vista has the driver signing mechanism, but if you use the Device Driver DDK you can at least test it on your system (I suppose anybody else who had to use it would need to build it themselves, though...) I'm not sure how much the API has changed since I don't use Windows anymore, so you might need to use MSDN or something.