Code Monkey home page Code Monkey logo

rust_os's Introduction

rust_os

Rust-powered OS following the https://os.phil-opp.com/ tutorial

Building

Requires

  • Rust Nightly
    • In short, rustup toolchain install nightly installs the nightly build and rustup override set nightly sets the toolchain as nightly for this project directory
  • rust-src component (install with rustup component add rust-src)
  • bootimage tool to compile kernal and bootloader and then link the two together after, creating a bootable disk image.
    • Install with cargo install bootimage
    • Requires llvm-tools-preview rustup component (install with rustup component add llvm-tools-preview).

Build: cargo build or specify the verbose build target with cargo build --target x86-64-blog-os.json Create a bootable disk: cargo bootimage

Booting

Boot in QEMU: qemu-system-x86_64 -drive format=raw,file=target/x86-64-blog-os/debug/bootimage-rust-os.bin

This opens a window like:

QEMU

Write to a USB Stick

Run dd if=target/x86-64-blog-os/debug/bootimage-rust-os.bin of=/dev/sdX && sync

NOTE (from os.phil-opp.com):

Where sdX is the device name of your USB stick. Be careful to choose the correct device name, because everything on that device is overwritten.

Running

Compile kernal and boot into QEMU with cargo run

Testing

Simply run cargo test in the root directory.

rust_os's People

Contributors

refcell avatar

Watchers

James Cloos avatar  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.