My attempt to write a small operating system (and to try Rust :) ).
mos
mOS boot log
Start QEMU with mOS inside:
make run
Run tests:
make tests
./initrd
: all files in this directory will be placed into a single archive and mounted as a TarFS to/initrd
./src
: kernel source code./lib
: Contains userspace programs andlibrust
: Rust library to write programs for mOS.
OS Entrypoint: /src/lib.rs
.
- Cross compiled binutils (actually only
ld
):docs/binutils.md
- NASM
- Rust nightly (I use
nightly-2019-11-04
) - Docker to build iso with GRUB bootloader
- QEMU
- gnu-tar on MacOS (
brew install gnu-tar
)
You can build userspace programs for mOS. To communicate with OS from Rust code you need to use librust
.
It is a library which provides interface to use all implemented system calls.
- Load! :-)
- Print to VGA buffer
- Mount ramdisk
- Built-in support for TarFS
- Interrupts
- System clock
- Syscalls ABI
- Processes support, context switching
- Start init process
- Shell for user's commands:
msh
- Fix paging. It does not work properly, and because of that it's not possible to start separate processes. Now programs are being running as threads inside the OS.
- After paging mmap call in the
librust
must be completed, so it will be possible to request memory from userspace. - Higher Half Kernel
fork
syscall ...