This project's aim was to create an operating system from scratch. The main goals were a simple console, segmentation, paging, and a FAT16 filesystem capable of opening and reading files from disk.
It was created using guides on OSDev wiki and an online course on Udemy by Daniel McCarthy. This was the main project for System Software (Oprogramowanie Systemowe) course on the 5th semester of computer science on GUT.
This project uses QEMU to run the OS on a virtual machine, nonetheless it is able to run on any computer using a bootable USB (I actually tried it for fun :) )
The default behaviour of the operating system is explained in the following steps:
- start at the bootloader
- intialize segmentation
- (in a way that it doesn't affect the OS, so all segments point to the entire memory)
- boot to the operating system
- initialize console, show system logo
- initialize kernel heap for memory allocation
- initialize Virtual File System and FAT16 filesystem
- search for disk and attach it to FAT16
- intialize the interrupt descriptor table
- allocate some memory for the kernel
- enable paging and map the kernel memory
- enable interrupts
These steps leave the kernel in a fully working state, we are free to do anything now
As an example for the main goal of this project, that is reading a file from disk and displaying it to screen, the system will load two files to some allocated memory and print their contents to the console.
make
gcc
andld
built locally for crosscompilation- follow the guide on OSDev wiki
qemu
./build.sh
This sets the default target and invokes make all
Note: you need to set correct paths to
gcc
andld
inbuild.sh
, the default values are those shown on the wiki article
qemu-system-i386 -hda ./bin/os.bin
make all
This project is a free and open-source software licensed under the GPL-3.0 license
- Developing a Multithreaded Kernel From Scratch! by Daniel McCarthy on Udemy
- Many excellent guides on OSDev Wiki