MOROS: Obscure Rust Operating System 🦉
Go to file
Vincent Ollivier 71303cd455
Fix VGA issues with real hardware (#258)
* Enable cursor after boot

* Remove unused time attribute on file

* Fix compilation warning

* Clear screen after vga init

* Add disable_blinking function

* Set palette registers at boot

* Set default palette

* Fix attribute control registers initialization

* Clear palette address source bit when setting palette

* Refactor code

* Remove index from palette

* Update comment

* Update changelog
2021-10-24 18:23:01 +02:00
.cargo Remove dependency on rlibc (#115) 2020-11-12 23:07:02 +01:00
.github Refactor filesystem (#225) 2021-08-07 11:29:45 +02:00
doc Add dynamical disk information (#252) 2021-10-04 21:37:47 +02:00
dsk Fix VGA issues with real hardware (#258) 2021-10-24 18:23:01 +02:00
run Add dynamical disk information (#252) 2021-10-04 21:37:47 +02:00
src Fix VGA issues with real hardware (#258) 2021-10-24 18:23:01 +02:00
.gitignore Update gitignore 2020-07-03 23:49:58 +02:00
CHANGELOG.md Fix VGA issues with real hardware (#258) 2021-10-24 18:23:01 +02:00
Cargo.lock Remove array-macro dependency (#253) 2021-10-02 19:26:29 +02:00
Cargo.toml Remove array-macro dependency (#253) 2021-10-02 19:26:29 +02:00
LICENSE Update copyright year 2021-01-28 18:18:06 +01:00
Makefile Add rust binaries support (#255) 2021-10-14 09:49:30 +02:00
README.md Add basic userspace (#228) 2021-09-24 18:19:37 +02:00
rust-toolchain Start MOROS project 2019-12-28 18:37:49 +01:00
x86_64-moros.json Add password hashing 2020-01-03 22:01:48 +01:00

README.md

MOROS: Obscure Rust Operating System

Travis Crates.io

MOROS is a hobby operating system written in Rust for the x86 architecture.

This project started from the seventh post of the second edition of Writing an OS in Rust by Philipp Oppermann and by reading the OSDev wiki along with many open source kernels.

screenshot

Features

  • External bootloader (using bootloader)
  • x86 CPU support (using x86_64)
  • Hardware interrupts (using pic8259)
  • PS/2 Keyboard (using pc-keyboard)
  • VGA Text mode output
  • Serial output (using uart_16550)
  • Paging
  • Heap allocation (using linked_list_allocator)
  • ACPI shutdown (using acpi and aml)
  • RTC clock
  • PCI enumeration
  • ATA PIO mode
  • Random number generator (using rand_chacha)
  • RTL8139 network card
  • AMD PCNET network card
  • DHCP/IP/TCP/UDP/DNS/HTTP protocols (using smoltcp)
  • Basic filesystem
  • Basic shell
  • Basic text editor
  • Basic lisp interpreter
  • Basic file and network commands
  • Basic userspace for nasm binaries
  • Multitasking

Setup

Install the required tools:

$ curl https://sh.rustup.rs -sSf | sh
$ rustup install nightly
$ rustup default nightly
$ rustup component add rust-src
$ rustup component add llvm-tools-preview
$ cargo install bootimage

Clone the repo:

$ git clone https://github.com/vinc/moros
$ cd moros

Usage

Build the image to disk.img:

$ make image output=video keyboard=qwerty nic=rtl8139

Run MOROS in QEMU:

$ make qemu output=video nic=rtl8139

Run natively on a x86 computer by copying the bootloader and the kernel to a hard drive or USB stick (but there is currently no USB driver so the filesystem will not be available):

$ sudo dd if=target/x86_64-moros/release/bootimage-moros.bin of=/dev/sdx && sync

In both cases, MOROS will open a console in diskless mode after boot if no filesystem is detected. The following command will setup the filesystem on the first hard drive of the first ATA bus, allowing you to exit the diskless mode and log in as a normal user:

> install

Be careful not to overwrite the hard drive of your OS when using dd inside your OS, and install or disk format inside MOROS.

Tests

Run the test suite in QEMU:

$ make test

LICENSE

MOROS is released under MIT.