Simple, self-contained, clean code, well-documented, hobbyist 64-bit operating system for Intel and AMD processors. It's written in Assembly (Intel syntax) and C (GNU99 Standard) in which I strive for adding comments to the source code as much as possible so it could be used as a reference for future OS developers.
It contains the following components written from scratch:
| Component | Description | Source code |
|---|---|---|
| MBR | First stage bootloader | code |
| Loader | Second stage bootloader | code |
| Component | Description | Source code |
|---|---|---|
| PML4 | Paging Structure | code |
| Buddy | Memory allocator System | code |
| PrintK | printf-like string format parsing utility | code |
| Serial Driver | send printk msgs via RS232 to help debugging | code |
| Core Dump | Dump CPU registers for debugging purposes | code |
| Syscall/Sysret | method chosen to jump to Ring 3 and back | code |
| PIT | Programmable Interval Timer | code |
| PIC | Programmable Interrupt Controller | code |
| (x)delay | Based on tightloops given that I'm using PIT | code |
| CMOS RTC | Real-time clock | code |
| Scheduler | Simple Round-Robin scheduler | code |
functions are being added on-demand: code
More to come! Star/Watch this repo to stay tuned!
In order to build this app, you are expected to have make and docker installed in your machine. All of the other building dependencies should be taken care of automatically by the docker image created during this step.
To build it you have to run:
make build
In order to run this app, you are expected to have make and qemu-system-x86_64 installed in your machine.
make test
To make sure I won't lose focus on what I want this OS to be able to do, I decided to write a list of features that I want to implement in the short to medium term.
Things that would be fantastic to have but I am not sure if I have what it takes to do within my lifetime.
These are all the references that helped me a lot during the development of AlmeidaOS
Forums:
Books:
Existing OSes:
Courses: