I am revisting these tutorials for some reasons: 6 years has passed, new compilers may break old code, there are bugs have been found, and I am a better programmer. Hopefully, the refactored tutorial will be uploaded in a few month....


I am a person who always wants to dig deep into internals, so when I started a course about complier principles at college, I wrote a compiler, well, actually it's more like an assembler. When I started to use FreeBSD, I wanted to know how it works in the rawest way, so I tried to read the kernel source. Then as you can imagine, I soon realized that it was an impossible mission to be accomplished. I was swamped with millions of lines of code. All I want is an insect killer, but H-Bomb is the only thing they could provide.

So I thought why can't I do it by myself, implement a simple OS kernel to show how it works from bootstrap to shell, finally I got Skelix. Skelix is a "skeleton" of an operation system kernel, it works in 32-bit protected mode, it demonstrates some basic concepts of how an os kernel works: bootstrap, task switching, paging, virtual memory, file system etc. in an i386 computer.

This tutorial is about how to implement Skelix step by step to show the basic idea of how a simple os kernel works. However, Skelix is still nothing but a toy kernel so far. I keep it as simple as I can to make it look clear.

Thanks for your interest in Skelix. Any bugs in Skelix, any problems with my English or any advices will be very helpful. Just drop me a mail.


Tutorial 00: Requirements


Tutorial 01: Bootstrap -- "Hello World!" from the dark side.


Tutorial 02: Protected Mode -- That's the first tough one.


Tutorial 03: Auxiliary Functions -- Fairly easy _m_(^-^)_m_


Tutorial 04: Interrupts and Exceptions Part1 -- What a great pleasure to see some error messages.


Tutorial 05: Interrupts and Exceptions Part2 -- Please forgive my poor imagination, "Hello World!" comes back again.


Tutorial 06: Multitasking -- One bit typo might drive you crazy, believe me.


Tutorial 07: File System -- A long journey, but not difficult.


Tutorial 08: Memory Management -- Huge Disappointment


Tutorial 09: System Call and Executing Programs on Disk -- Little relief


Special Thanks
Pádraig BradyHe has help me to correct my terrible English. There are some really useful tips about Linux on his website http://www.pixelbeat.org.
Song JiangHe has pointed out several bugs in my tutorial
Arshad HussainA calculation error has been found by him in Tutorial 02
Shen FengSeveral comments in Tutorial 04, pic_install has been in wrong position since 2006. He explains a problems relates to .bss in Tutorial 06.

Feel free to use my code. Please contact me if you have any questions.