hassanmaher / devos

(Very) basic UNIX-like operating system built when I was younger

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

(Very) Basic Operating System in C++

This code was written several years ago as one of my first projects when I was in High School so it's normal if some parts of the code looks like "crap".

But some parts of the code are usefull to learn how to create a bootable operating system with memory pagination, multitasking, virtual memory, EXT2, ...


Features :

* Code in C++
* x86 32bits
* Boot with Grub
* Kind of modular system for drivers (I was in High school so it's not really great)
* Kind of UNIX style (again: It's not great)
* Multitasking
* ELF executable in userland
* Modules (accessible in userland using /dev/...) :
	* IDE disks
	* DOS partitions
	* Clock
	* EXT2 (read only)
	* Boch VBE
* Userland :
	* API Posix
	* LibC
	* "Can" run a shell or some excutables like Lua, ...

Build & Run using Vagrant (for OS X and Linux users)

Make sure you have both Vagrant installed and this repo cloned (and an open terminal in it's folder)

Then run the following commands (ignore comment lines starting with #):

# Starts Vagrant VM
# This will start an ubuntu machine and install build-essential, make, Qemu ...
vagrant up

# SSH into machine
vagrant ssh

# Once SSHed
cd /vagrant

# Build kernel, userland ...
make all

# Run emulation
make emulate


  • Compiles
  • Builds Image
  • Boots


(Very) basic UNIX-like operating system built when I was younger

License:Apache License 2.0


Language:C 74.7%Language:C++ 20.7%Language:Assembly 2.9%Language:Makefile 1.4%Language:ApacheConf 0.2%Language:Shell 0.1%