This is my end of year project for my M1. It is now archived, but you will find everything needed to continue the project here.
- The bootloader is setting everything up, switching to protected mode and then loads the kernel. The bootloader is a "legacy" type, which means it is written in assembly and is not benefiting from UEFI standards. It is withing that bootloader that we setup the GDT.
- The bootloader then reads the disk and loads the kernel.
- The kernel is successfully loaded, and the IDT and ISR are setted up. This allows to create time based events with timers and handle keyboard inputs.
- You can allocate dynamic memory using the functions in the memory.h. However, you cannot free and realloc memory at the time. Only a standard flat memory allocation has been written.
- Multiple functions from the standard library have been rewritten to be used. They are located under the utils.h, string.h and random.h.
- ATA Drivers are written. That means that the kernel is able to read and write to the disk. The functions are located inside ata.h.
- Rewrite the linker and the Makefile to implement a two stage loader. It means that the bootloader loads a smaller kernel, that will then load and map in memory the full kernel. We should do that to bypass the size limit that is currently limiting the possibilities. Words aren't explaining really well the problem so see the image underneath.
- Implement a paged memory manager, or at least a way to free and realloc the memory. Testing to implement the liballoc project can be found under newLib/memory.c.
- Implement the FAT Filesystem, allowing the user to read and write files.
- Create some forms of application, to make it useable.
In order to compile this project, you will need a cross compiler. The executables should be preceded i386-elf-
(like i386-elf-gcc
for example). You can find how to create your cross compiler on this osDev page or by using the given home made script crossCompiler.sh.
Once you have your cross compiler ready, you'll just have to run make run
to compile & launch the OS within QEMU. Other make commands such as make clean
and make debug
are also included.
Every single function inside the code has been documented using the doxygen standards. You should be able to understand everything thanks to that, and the comments inside the code and the wiki.
You can find the generated doxygen config file: dconfig. The documentation will be generated with the doxygen dconfig
command and will appear under the doc
folder. You can find the already compiled pdf here.
The code has been indented using my personnal standards (sorry), to make it more readeable.