Safe portable simple microkernel written purely in Rust
GPL-2.0 License
Kelner is a safe, portable, simple microkernel written purely in Rust.
Check out repositories and initialize all submodules.
git clone https://github.com/haxxpop/kelner.git
cd kelner
git submodule update --init --recursive
Install some dependencies, x86 Qemu, and Rust compiler.
sudo apt-get update
sudo apt-get install autoconf libssl-dev pkg-config curl nasm qemu-system-x86 build-essential
curl https://sh.rustup.rs -sSf | sh
source $HOME/.cargo/env
Auto-generate the configure
file using Kelner pre-defined configurations.
./autogen.sh
Generate building files using user-defined configurations, if any.
./configure
Compile the kernel. After this step, you will get many files in target
, which contains built files from Rust Cargo, and build
, which contains some kernel image files to be run in Qemu.
make
Run the kernel with Qemu.
make qemu
For those who want to run Kelner in a hardware virtualization system like VirtualBox instead of a software virtualization system like Qemu, you can follow the following steps.
Build Kelner and get build/disk
.
make
Since our build/disk
is not in a standard virtual disk format, we need to build a new one in a valid format. In this case, we will use VMDK format. After this step, we will get the file kelner.vmdk
.
dd if=/dev/zero of=kelner.img bs=512 count=2880
dd if=build/disk of=kelner.img bs=512 conv=notrunc
VBoxManage convertfromraw kelner.img kelner.vmdk --format VMDK
Create a new vm called kelner
.
VBoxManage createvm --name kelner --register
Create a storage controller and attach our kelner.vmdk
to it.
VBoxManage storagectl kelner --name kelnerhdd --add sata
VBoxManage storageattach kelner --type hdd --medium kelner.vmdk --storagectl kelnerhdd --port 1
Start our vm. Enjoy!
VBoxManage startvm kelner