by Jagat · 12y ago · 0 comments
Building an OS has been in my bucket list for long and it has been one heck of an experience so far.
Here are some good step-by-step OS-from-scratch programming guides
http://jamesmolloy.co.uk/tutorial_html/index.html
http://www.osdever.net/bkerndev/Docs/title.htm
http://www.brokenthorn.com/Resources/OSDevIndex.html
http://viralpatel.net/taj/operating-system-tutorial.php
and here's a good wiki for reference
[1]: http://developer.amd.com/resources/documentation-articles/de...
I haven't really looked at the code, but I guess the following at least contains a bit of example code:
http://www.returninfinity.com/baremetal.html
Menuetos also looks rather interesting, unfortunately, as I recall the license for the 64bit version puts the code in a bit of a limbo as far how it's actually useful. There's a fork, but not for amd64 afaik..
x86_64 bootup / structures
https://github.com/nwg/nanos/blob/master/src/boot.asm
https://github.com/nwg/nanos/blob/master/src/kernel_init.asm
I've built two so far which were (and I think still were until recently) used in production equipment. One Forth system (all 8k of it) that ran a PLC system and a tiny (16k) kernel for an M68k system that was a router for a modbus-like protocol over RS485.
Nothing x86_64 but nevertheless the most fun I've ever had with a computer.