I'm new here so please bare with me if this is the wrong forum (sorry if it is). I put it here because I believe you can contruct a kernel in c right? I've downloaded the linux kernel and thats full of c source files.

Anyway, i've been using windows and linux for so long and was wondering can I build my own kernal? I'm out of a project at the moment and wanted something to do. I don't want to recompile the linux kernel as so many other threads talk about. I would like to build one from scratch. I'm not expecting anything like linux but something small that I can handle and just do as a hobby that has a few basic features such as writing a text file saving it to the hard disk and then reopening it.

Could anyone give me any pointers as to where to start? Any good tutorials? I mean Linus Torvalds had to start somewhere.:)



Edited 6 Years Ago by jamesl22: n/a

You know it took Linus Torvalds years to make the very first 'very simple' Linux kernel.

If your interested in this area ckeck out Minix.


I know it takes ages but im not bothered I'll only do it as a hobby, nothing serious.

Also if I was to build it from scratch how would I compile it? GCC? Because that would compile to a linux executable. Wouldent it?

How easy would it be to say.... hit the b key and it makes the computer shut down for instance?

Edited 6 Years Ago by jamesl22: n/a

Actually a good place to start is investigating the options available with GCC(GNU compiler) and ld(GNU linker). With these two utilities you can build just about anything you want...

Edited 6 Years Ago by gerard4143: n/a

You'll probably have to learn first about general kernel concepts and theory before any implementation. Why not start by making some google searchs?
(I just tried and found: http://en.wikipedia.org/wiki/Kernel_(computing).)
I guess writing a kernel from scratch implies really understanding what's going on in a computer...

Edited 6 Years Ago by manutm: n/a

This article has been dead for over six months. Start a new discussion instead.