Giter VIP home page Giter VIP logo

maestro's Introduction

logo

MIT license Version Rust toolchain Continuous integration Stars Discord

About

Maestro is a lightweight Unix-like kernel written in Rust.

The goal is to provide a lightweight operating system able to use the safety features of the Rust language to be reliable.

This project is still in early stage development, thus it is highly unstable and misses a lot of features. Do not use it in production!

To stay updated with the project, follow the blog!

neofetch

Neofetch and bash running on the OS.

Features

The following features are currently implemented (non-exhaustive):

  • Terminal with VGA text mode and PS/2 keyboard (with forward compatibility with USB handled by the motherboard's firmware)
  • Memory allocation/virtual memory
    • Buddy allocator
    • Internal memory allocator, with similarities with dlmalloc's implementation, working on top of the buddy allocator
  • Processes and scheduler (round-robin)
    • POSIX signals
  • PCI devices enumeration
  • Files:
    • Mountpoints
    • IDE/PATA driver
    • Filesystem (ext2 only for now)
    • Disk partitions (MBR and GPT)
    • Virtual filesystems (/tmp and /proc)
    • initramfs
  • Time/Clock (RTC)
  • Linux system calls (roughly 30% are currently implemented)
  • Kernel modules
  • ELF programs

Quickstart

This repository is not a full operating system in itself but only the kernel.

You can either:

  • Use the installer to build a full operating system from an ISO file
  • Build the OS by hand. For this, you can check the kernel's book

The OS can then be run by a virtual machine such a QEMU or VirtualBox, or on a physical machine.

Build

The configuration allows to easily specify which features have to be enabled in the kernel. This configuration is required to compile the kernel.

A default configuration is available in the file default.config.toml. To use it, simply type the command:

cp default.config.toml config.toml

After configuration, the kernel can be built using the following commands:

cargo build               # Debug mode
cargo build --release     # Release mode

The default architecture is x86. To specify another architecture, add the following parameter to the build command: --target arch/<arch>/<arch>.json, where <arch> is the selected architecture.

The list of available architectures can be retrieved by typing the command:

ls -1 arch/

Run

With QEMU

QEMU is the preferred virtual machine to test the kernel.

To install QEMU, type the following command:

Ubuntu/Debian:

apt install qemu

Arch Linux:

pacman -S qemu

A fully built operating system is required to run the system. This system must be present on a raw disk in the file qemu_disk at the root of the repository. The option -drive file=qemu_disk,format=raw is used on QEMU to reference the disk.

The kernel can be run using:

cargo run               # Debug mode
cargo run --release     # Release mode

Run unit tests

The following command runs unit tests in QEMU:

cargo test --lib

Documentation

The book

The kernel's book contains general information on how to use the kernel.

The book can be built using mdbook, with the command:

mdbook build doc/

Then, it can be accessed at doc/book/index.html.

References

The references contain the documentation for functions, structures, etc...

It can be built using the command:

cargo doc

Then, it can be accessed at target/<arch>/doc/kernel/index.html, where <arch> is the architecture the kernel has been compiled for.

maestro's People

Contributors

llenotre avatar litarvan avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.