Our very own Operating System built from scratch for x86 architecture systems!
Our very own Operating System built from scratch for x86 architecture systems!
"If you want to travel around the world and be invited to speak at a lot of different places, just write a Unix operating system." ~ Linus Torvalds, creator of Linux
This repository contains the code for the operating system, KSOS, developed by the members of IIT Roorkee ACM Student Chapter. Get a prebuilt version of the latest release of KSOS here!
To know more about the development journey from the beginning, read our blog written by Suraaj. In the future, we will be releasing blogs highlighting the different core aspects of KSOS, so stay tuned!
This OS is being built for an x86 architecture system using Legacy BIOS and was started from scratch in November 2019. It has been developed on a Debian-based Linux distribution. We emulate using qemu, a general-purpose CPU emulator.
We also write our very own Bootloader for Legacy BIOS. The bootloader handles the initial 16-bit CPU mode, preparing the switch to 32-bit protected mode. It also parses the filesystem and loads the kernel before passing control to it. The kernel has been implemented mostly in C.
Btw, what KSOS means shall remain a secret. :wink:
This section will mainly explain how to build KSOS on a Debian-based Linux.
NOTE: If you just want to run the latest release of KSOS, you can download a prebuilt version from here. Simply run it using qemu-system-i386 disk.img.
Make sure the following are installed before proceeding further:
sudo apt install gitsudo apt install nasmsudo apt install qemusudo apt install makeIf you are here to just try and test the OS, carry out these commands in Bash to get started:
git clone https://github.com/acmiitr/KSOS.gitcd KSOSbash script.shmakeA detailed explanation of each of the above-mentioned instructions are given below:
bash script.sh. After this, you will have to restart the terminal.make.disk.img file, which is the operating system. Pretty neat (it's only 1MB so far)!qemu-system-i386 disk.img or even simplermake run.sudo dd if=disk.img of=/dev/sdx where sdx is sda/sdb/sdc depending on the output of lsblk. Getting started with operating systems development is a bit tricky. Dr. Nick Blundell's book is a great resource to begin with, especially for bare-metal and bootloader programming.
BrokenThorn's OS Development series, although old, is really helpful. Most of the overall structure of the project was built from this resource.
If you have any issues, feel free to have discussions with the people at #osdev on freenode IRC, as well as the OSDev forums.
To get started with simple bare-metal programming, you can read Suraaj's blog.
Operating system development is debatably the most onerous task in programming, notably because of the complete absence of any "backend" that you can work upon. You are the complete backend. However, there is no need to be discouraged. If you want to contribute, you can look at some of the more straightforward problems that we have in the issues section.
To get started, you NEED to know how to build the OS from source. After that, it's just up to your imagination. The thing with operating systems is, you can do whatever you want. Feel free to discuss any ideas that you may have with us by opening an issue. :smiley:
Do not shy away from asking questions about KSOS, possible features to implement or operating systems in general on our Facebook Page.
Once you do find an issue or feature to contribute, please:
A lot of the work after v.1.0.0 release can now be done in C. Possible developments could include implementing:
Other major work to be done:
This repository is licenced under MIT Licence, see LICENCE.md.
No open issues yet, or sync has not completed.