Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
/morosPublic

MOROS: Obscure Rust Operating System 🦉

License

NotificationsYou must be signed in to change notification settings

vinc/moros

Repository files navigation

screenshot

MOROS is a hobby operating system written in Rust byVincent Ollivier.

It targets computers with a x86-64 architecture and a BIOS, so mostly from 2005to 2020, but it also runs well on most emulators (Bochs, QEMU, and VirtualBox).

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

GitHub ActionsCrates.io

Features

  • External bootloader (usingbootloader)
  • x86 CPU support (usingx86_64)
  • Hardware interrupts (usingpic8259)
  • PS/2 Keyboard with customizable layout (usingpc-keyboard)
  • VGA Text mode with customizable font and color palette
  • Serial output (usinguart_16550)
  • Paging
  • Heap allocation (usinglinked_list_allocator)
  • ACPI shutdown (usingacpi andaml)
  • RTC clock
  • PCI devices
  • ATA PIO mode
  • Random number generator (usingrand_hc)
  • Intel PRO/1000, RTL8139, and AMD PCNET network cards
  • DHCP/IP/TCP/UDP/DNS/HTTP network protocols (usingsmoltcp)
  • Basicfilesystem
  • Basicshell
  • Basictext editor
  • Basiclisp interpreter
  • Basic userspace for NASM and Rust programs
  • Some file andnetwork commands
  • Somegames

Documentation

Documentation is availablehere

Setup

You will needgit,gcc,make,curl,qemu-img,andqemu-system-x86_64 on the host system.

Clone the repo:

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

Install the required tools withmake setup or the following commands:

$ curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain none$ rustup show$ cargo install bootimage

Usage

Build the image todisk.img:

$ make image output=video keyboard=qwerty

Run MOROS in QEMU:

$ make qemu output=video nic=rtl8139

Run natively on a x86 computer by copying the bootloader and the kernel to ahard drive or USB stick (but there is currently no USB driver so the filesystemwill not be available in that case):

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

MOROS will open a console in diskless mode after boot if no filesystem isdetected. The following command will setup the filesystem on a hard drive,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 usingdd insideyour OS, andinstall ordisk format inside MOROS if you don't use anemulator.

Tests

Run the test suite in QEMU:

$ make test

License

MOROS is released under MIT.


[8]ページ先頭

©2009-2025 Movatter.jp