eduOS-rs is a Unix-like computer operating system based on a monolithic architecture for educational purposes, which is developed for the course Operating Systems at the RWTH Aachen Univeristy. It is derived from following tutorials and software distributions.
- Philipp Oppermann's excellent series of blog posts.
- Erik Kidd's toyos-rs, which is an extension of Philipp Opermann's kernel.
- The original version of eduOS, which was the old teaching kernel written in C.
Compiling eduOS-rs is tested under Linux and macOS. For macOS, it is required that Apple's Command Line Tools and the package manager like Homebrew or MacPorts are installed. Homebrew users have to install the required tools wget, nasm and qemu with following command.
$ brew install wget qemu nasm
In addition, you have to install binutils to support the Executable and Linkable Format (ELF), which is the link format of our kernel. Install these tools as follows:
$ wget http://ftp.gnu.org/gnu/binutils/binutils-2.29.tar.gz
$ tar xzvf binutils-2.29.tar.gz
$ mkdir build
$ cd build/
$ ../binutils-2.29/configure --prefix=/opt/local/ --target=x86_64-elf --disable-multilib --disable-nls --disable-werror
$ make
$ sudo make install
MacPorts users havt to install the required tools with following command:
$ sudo port install qemu nasm x86_64-elf-binutils
At this point, the build process is identical between Linux and macOS. It is required to install the Rust toolchain, to check out the sources and to rebuild the Rust runtime using a bare-metal target without hardware floating point support. You have to use the nightly release channel, so please uninstall the previous Rust compiler, if you have one.
$ # Uninstall previous Rust installation (if you already use rust)
$ rustup self uninstall
$ # Set up a Rust compiler.
$ # Please choose "2) Customize installation" at the beginning of the
$ # installation dialog to be able to choose the nightly release channel.
$ curl https://sh.rustup.rs -sSf | sh
$ # At the end of the installation you should see something like
$ # nightly installed - rustc 1.22.0-nightly (4c053db23 2017-10-22)
$ # Get our source code.
$ git clone [email protected]:RWTH-OS/eduOS-rs.git
$ cd eduOS-rs
$ # Get a copy of the Rust source code so we can rebuild core
$ # for a bare-metal target.
$ git submodule update --init
$ make runtime
From here, we should be able to build a kernel and run it within QEMU:
$ make
$ make run
Note: Windows users should take a look at https://youtu.be/5aX5jIAfrk8 to build edusOS-rs on their system.
Step by step (here branch by branch) the operating system design will be introduced. This tutorial shows the steps to develop from a minimal kernel to Unix-like computer operating system. Currently, following stages of development are available:
-
stage0 - Smallest HelloWorld of the World
Description of loading a minimal 32bit kernel
-
stage1 - Cooperative/non-preemptive multitasking
Introduction into a simple form of multitasking, where no interrupts are required.
-
stage2 - Priority-based Cooperative/non-preemptive multitasking
Introduction into a simple form of priority-based multitasking, where no interrupts are required.
-
stage3 - Synchronization primitives
Introduce basic synchronization primitives
-
stage 4 - Preemptive multitasking
Introduction into preemptive multitasking and interrupt handling
- http://www.gnu.org/software/grub/manual/multiboot/
- http://www.osdever.net/tutorials/view/brans-kernel-development-tutorial
- http://www.jamesmolloy.co.uk/tutorial_html/index.html
- http://techblog.lankes.org/tutorials/
- http://www.os.rwth-aachen.de
- http://www.noteblok.net/2014/06/14/bachelor
- https://sourceware.org/newlib/
- http://rwth-os.github.io/eduOS/
- https://intermezzos.github.io
eduOS-rs is licensed under the MIT license.