Skip to content

PerfectOctogon/AdiOS

Repository files navigation

AdiOS

Resources used

The OS dev Wiki : https://wiki.osdev.org/Expanded_Main_Page

Context

All the information provided here is from my own understanding from studying about OS development. Please cross check all information with a reliable source.

This is a follow up to the bare-bones tutorial I followed from the OS dev Wiki. The bare-bones tutorial takes you through creating a simple OS that prints "Hello world" to the terminal. However, this simple bare bones structure should not be used for creating an actual functioning OS as it's not extensible. This "Meaty skeleton" creates its own standard C libary files for better control and an overall better structure to the code base. You can find more information on the Wiki.

I have also included some personal notes I took when studying inside a directory named "Notes". Again, I am not sure how reliable these notes can be. Some of it can be traced back to the wiki while some are generated by ChatGPT. I do aim to cross check some of the AI-generated information, but I cannot gurantee 100% credibility. They might also not be as structured/organized as one might prefer.

Purpose

I am getting interested in cyber security and related fields so I thought : what better way is there to learn about securing systems than creating your own operating system? This is also a project aimed to better my understanding about the fundamental structure of an OS. I aim to learn about system calls, interrupts and many more things that a typical OS handles / provides abstraction for. Hopefully, I come out of this project with an OS that contains the following :

- Basic IO (Keyboard support, with potentially even mouse!)
- Port newlib for access to C-standard library
- OS file structure (directories, text files) <-- current progress :)
- Running commands (ls, cd etc...)
- Ability to execute programs (memory management), which I believe would be the most challenging task

Tools used (Will update)

- x86 Assembly language (nasm compiler)
- C (gcc cross compiler for generic target (i686-elf / x86_64-elf))
- Qemu for OS virtualization
- Xorriso for creating iso image
- GNU GRUB as bootloader

How to run

Before you can run this, you will need to install a cross compiler targeting i686-elf. There should be resources online showing how to install this compiler. Or, you can make your own! Then, install Qemu - for OS virtualization. After this, you need to go into adios-newlib and follow the instructions from the README.md inside that directory. This will create lib and include folders that the kernel's build process depends on. Finally, give execute permissions to all the .sh files inside the root directory (build.sh, config.sh etc). Then, run the following commands:

- ./clean.sh
- ./build.sh
- ./iso.sh
- ./qemu.sh

./clean.sh clears out all the files that were build in the previous build ./build.sh compiles the kernel ./iso.sh creates a bootable iso image for the kernel ./qemu.sh starts qemu with the iso image you created

About

Making an OS!

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages