2014-09-29 08:39:34 +00:00
|
|
|
os-tutorial
|
|
|
|
===========
|
|
|
|
|
|
|
|
How to create an OS from scratch
|
2014-09-29 09:00:02 +00:00
|
|
|
|
|
|
|
I have always wanted to learn how to make an OS from scratch. In college they taught us
|
|
|
|
how to implement advanced features (pagination, semaphores, memory management, etc)
|
|
|
|
but:
|
|
|
|
|
|
|
|
- I never got to start from my own boot sector
|
|
|
|
- College is hard so I don't remember most of it.
|
|
|
|
|
|
|
|
Inspired by [this document](http://www.cs.bham.ac.uk/~exr/lectures/opsys/10_11/lectures/os-dev.pdf)
|
|
|
|
and the [OSDev wiki](http://wiki.osdev.org/), I'll try to make short step-by-step READMEs and
|
|
|
|
code samples for anybody to follow.
|
|
|
|
|
|
|
|
I will not explain the theory. Google is your friend. Learn what assembler is, pagination, interrupts,
|
|
|
|
segmentation, etc. That is already covered by thousands of PDFs from Universities. This course
|
|
|
|
is a tutorial, a hands-on, not a real CS lecture.
|
|
|
|
|
|
|
|
|
|
|
|
How to use this tutorial
|
|
|
|
------------------------
|
|
|
|
|
|
|
|
First, go through every folder in order. They build on previous code, so if
|
|
|
|
you jump right to folder 08, you may find a lot of stuff which is not related
|
|
|
|
to what folder 08 is about.
|
|
|
|
|
|
|
|
To see the increments between "lessons", do a diff between folders.
|
|
|
|
|
|
|
|
Second, for each folder, read the README. It is **very concise**. There is
|
|
|
|
no theory. Then, look at the code examples. You can try to write them by
|
|
|
|
yourself on a different folder, modify them slightly and play a bit with the
|
|
|
|
code.
|
|
|
|
|
|
|
|
Finally, the code files provided in each folder are the final result. If
|
|
|
|
you want to learn quickly (though not as thoroughly), just read the
|
|
|
|
provided code files.
|
|
|
|
|
|
|
|
TL;DR: First read the README on each folder, then decide if you will
|
|
|
|
implement it yourself or just read the provided code files.
|
|
|
|
|
|
|
|
|
|
|
|
Contributing
|
|
|
|
------------
|
|
|
|
|
|
|
|
I'm still learning this. For the moment, please restrict your contributions to fixing possible bugs
|
|
|
|
or improving existing documents. I'm not yet ready to accept enhancements.
|