Git Product home page Git Product logo

cheetos's Introduction

cheetos

Welcome to cheetos project. This a a simple operating system framework for the x86_64 architecture.

cheetos relies on bootloader crate for most of the heavy lifting. bootloader creates a bootable disk image, create page tables, does the memory mapping, etc, so that we can focus on developing the kernel itself.

The structure of the project is highly inspired by the pintos project. However, since the original project was written in C, some parts of the code are not idiomatic in Rust. cheetos tries to address this issue by rewriting some of the code to match the interface from the standard library of Rust. (e.g. Mutex for synchonization, GlobalAlloc for memory allocation, etc.)

cheetos is still under development!

TODO: Add more description

Getting started

Requirements

Run cheetos

Build the project and run it in a qemu virtual machine.

cargo run

Under the hood, it works like this:

  • cargo run will first attempt to build the project, if not already built.
  • Since Cargo.toml marks kernel as the build-dependencies, it will build the kernel crate, which is our operating system.
  • In build.rs, we depend on the bootloader crate, which will:
    • Build the kernel into an ELF file.
    • Compile the bootloader as a standalone executable.
    • Links the bytes of kernel ELF file into the bootloader executable.
  • The bootloader crate will then generate a bootimage file, which is a bootable disk image.
  • In src/main.rs, we use the built disk image to run the operating system in a qemu virtual machine.
  • Only if the sources in kernel crate is changed, cargo will rebuild the project.

Debugging

You can use gdb to debug pintos. The following command will start cheetos in a qemu virtual machine, and wait for gdb to connect to it.

cargo run -- -g

Testing

pintos contains a rich test suite (it is an educational operating system project, after all). cheetos ported the test suite to Rust, and you can run it with the following command.

cargo test

Acknowledgements

This project is highly inspired by the following projects:

Simply said, cheetos is an attempt to port Pintos into Rust.

Also, the following crates were referenced in this project. cheetos do not use these crates as direct dependency, but rather uses sources derived from them.

License

This project is licensed under the MIT License - see the LICENSE file for details

cheetos's People

Contributors

inhibitor1217 avatar

Watchers

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