Skip to content

Julien-cpsn/RetOS

Repository files navigation

Warning

This is a PhD project, and it is still very WIP.

RetOS

A Router Network Operating System. RetOS comes from retis which mean network in Latin.

Note

This Operating System is based on the great Writing an OS in Rust from @phil-opp.

How to use

Development

Important

You will need QEMU x86_64 in order to run project in development mode

You can check the command is available by running

qemu-system-x86_64 --version

Run the project with QEMU

cargo run

Note

If further toolchain installation is needed, rust-toolchain.toml depicts what's needed.

Production

By running the following command, you will build the OS images and the executables that will use QEMU.

cargo build --release

Burn to hard drive/USB stick

1. Get the image path

Build the OS and find the image file you want to use (BIOS or UEFI), you can do it like so:

cargo build --release
find ./target/release -maxdepth 1 -name "*.img"

2. Find the hard drive/USB stick

You can find it by using the lsblk command. A possible selection for your device can be like /dev/sda1.

3. Burn the image

Now you have to burn the image on the hard drive/USB stick with the following command:

dd if=<IMAGE_PATH> of=<DEVICE> bs=1M && sync

4. Run it live!

You can directly plug your device onto the PC and boot it :)

Note

If you are using the BIOS image, you may want to enable CMS

Done & TODOs

  • Core
    • Multi-threading (SMP)
    • ANSI colors (WIP)
    • Log system (with goolog)
    • Internal clock
    • Command Line Interface (with embedded-cli-rs)
    • Async/Await
    • Framebuffer (print, clear, colors)
    • Main x86_64 instructions, exceptions and interruptions (with x86_64)
    • Bootloader (with bootloader)
    • Standalone kernel
  • Devices
  • Commands
    • ip
      • interface
        • show
      • address
        • show
        • add
        • delete
        • modify
      • route
        • show
        • add
        • delete
        • modify
    • ping (WIP)
    • sleep
    • top (WIP)
    • scanpci
    • lspci
    • ps
    • shutdown (with qemu-exit)
    • keyboard (change keyboard layout)
    • uptime
    • clear
    • echo
  • Network
    • SSH
    • Routing stack
    • Packet forwarding
    • Host-side TCP/IP stack (with smol-tcp)
  • Memory
    • More precise heap allocation
    • Heap allocation (with Talc)
    • Memory pagination
  • Others
    • multiboot2 (maybe need multiboot2, doc)
    • Linux VM virtualization

Contributors

License

This project is licensed under the MIT license and can be found here.

About

Router Network Operating System

Resources

License

Stars

17 stars

Watchers

2 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors