This is a lightweight and secure 64-bit multiprocessor microkernel operating system written in Rust for x86, ARM and MIPS systems. It's a work in progress: I'm starting from scratch after previously writing a working microkernel for 32-bit SMP x86 computers in C and assembly.
I learned a lot from that first iteration, and this is the second iteration of diosix, codenamed Menchi. Crucially, it will be written in Rust, a C/C++-like programming language that has a fierce emphasis on guaranteed memory safety, threads without data races, and other security features.
Check out the wiki for documentation on how it all works internally.
These are the tools I've got installed on a Debian "Jessie" GNU/Linux server for building diosix; other versions of the software are probably fine, too:
GNU ld 2.25
GNU make 4.0
multirust 0.7.0(for installing Rust)
qemu 2.1.2(for testing)
To build the software, open a terminal, check out the source code in the usual way, and change into its directory:
git clone https://github.com/diodesign/diosix.git cd diosix
Then pick a hardware platform to build a kernel for. Let's start with 64-bit x86, aka a standard PC machine. Change into its directory:
Next, make sure you're using a suitable Rust toolchain: you'll need a nightly build as we need features not present in the stable edition:
multirust override nightly
Now build a bootable ISO image suitable for burning to a CD/DVD or throwing at an emulator or hypervisor to test:
The ISO should be saved in the platform's release directory - in this case:
To fire up the ISO image in QEMU:
If I haven't broken the kernel, the emulator will start up in your ncurses-friendly terminal, and boot the tiny operating system. QEMU will be automatically killed after a timeout period, typically 10 seconds. This is because the kernel cannot, right now, power off the system; an ACPI driver to handle power management will eventually be written, and until then we have to kill QEMU manually. If you want to see the kernel's detailed debugging output via the serial port, boot QEMU headless, and the serial port will be logged to the terminal.
make clean removes the debris left behind by the build process.
Here's a very early build of diosix booting on x86.
And here's the kernel's debugging output after its physical and virtual memory allocator was implemented – this output can be seen by running
Feel free to email me, Chris Williams, if you have any questions, want to get involved, have source to contribute, or found a security flaw. You can also find me, diodesign, on Freenode IRC in the #osdev channel, or on Twitter.
Copyright, license, and thanks
© Chris Williams and contributors, 2015. See LICENSE for source code and binary distribution and use.