All Projects → skyzh → Core Os Riscv

skyzh / Core Os Riscv

Licence: mit
🖥️ An xv6-like operating system on RISC-V with multi-core support. Documentation available online.

Programming Languages

rust
11053 projects

Projects that are alternatives of or similar to Core Os Riscv

Aqeous
(Inactive, Checkout AvanaOS, Rewrite of this) This is a New Operating System (Kernel right now). Made completely from scratch, We aim to make a complete OS for Learning purpose
Stars: ✭ 23 (-84.03%)
Mutual labels:  operating-system, qemu
ria-jit
Lightweight and performant dynamic binary translation for RISC–V code on x86–64
Stars: ✭ 38 (-73.61%)
Mutual labels:  qemu, risc-v
osmium
A toy operating system written in Rust on RISC V(rv32im)
Stars: ✭ 124 (-13.89%)
Mutual labels:  operating-system, risc-v
chaos-2
A hand-made SMP-aware kernel
Stars: ✭ 20 (-86.11%)
Mutual labels:  operating-system, qemu
30daymakeos
《30天自制操作系统》源码中文版。自己制作一个操作系统(OSASK)的过程
Stars: ✭ 4,127 (+2765.97%)
Mutual labels:  operating-system, qemu
Melvix
💻 A small operating system written from scratch
Stars: ✭ 69 (-52.08%)
Mutual labels:  operating-system, qemu
mdepx
MDEPX — A BSD-style RTOS
Stars: ✭ 17 (-88.19%)
Mutual labels:  qemu, risc-v
Xv6 Book Chinese
MIT操作系统工程的教学操作系统Xv6的源码剖析中文翻译项目,使用ANSI标准C重新在riscv架构上实现Unix v6;
Stars: ✭ 223 (+54.86%)
Mutual labels:  operating-system, qemu
Shecc
A self-hosting and educational C compiler
Stars: ✭ 286 (+98.61%)
Mutual labels:  risc-v, qemu
Tock
A secure embedded operating system for microcontrollers
Stars: ✭ 3,258 (+2162.5%)
Mutual labels:  risc-v, operating-system
rCore-Tutorial-v3
Let's write an OS which can run on RISC-V in Rust from scratch!
Stars: ✭ 470 (+226.39%)
Mutual labels:  operating-system, risc-v
Rcore Tutorial Book V3
v3.5 https://rcore-os.github.io/rCore-Tutorial-Book-v3/
Stars: ✭ 102 (-29.17%)
Mutual labels:  risc-v, operating-system
Dgos
Operating System
Stars: ✭ 90 (-37.5%)
Mutual labels:  operating-system, qemu
Minios
Simple DIY OS
Stars: ✭ 106 (-26.39%)
Mutual labels:  operating-system, qemu
Cargo Flash
a cargo extension for programming microcontrollers
Stars: ✭ 134 (-6.94%)
Mutual labels:  cargo
Dos ssh
Use BIOS ram hacks to make a SSH server out of any INT 10 13h app (MS-DOS is one of those)
Stars: ✭ 139 (-3.47%)
Mutual labels:  qemu
Stegbrute
Fast Steganography bruteforce tool written in Rust useful for CTF's
Stars: ✭ 134 (-6.94%)
Mutual labels:  cargo
Qemu
Xilinx's fork of Quick EMUlator (QEMU) with improved support and modelling for the Xilinx platforms.
Stars: ✭ 134 (-6.94%)
Mutual labels:  qemu
Q Operating System
Q OS is a versatile operating system designed with the new features of 64 bit "long mode" CPU's in mind that focuses on making everything as simple as possible for the end user
Stars: ✭ 142 (-1.39%)
Mutual labels:  operating-system
Chino Os
A real time operating system for IoT written in C++
Stars: ✭ 139 (-3.47%)
Mutual labels:  operating-system

core-os-riscv

An xv6-like operating system in Rust.

This project is originally based on "The Adventures of OS: Making a RISC-V Operating System using Rust", and is now being made to have an xv6-like structure.

You may browse this repo with Sourcegraph.

image

Build Instructions

macOS

First of all, install GNU RISC-V tools and QEMU. Python3 is also required to generate some files automatically.

brew tap riscv/riscv
brew install riscv-tools
brew test riscv-tools
brew install qemu

Don't forget to add riscv-tools to PATH.

Then, install Rust and related components.

cargo default nightly
cargo install cargo-xbuild cargo-binutils
rustup component add rust-src llvm-tools-preview rustfmt rls rust-analysis
rustup target add riscv64gc-unknown-none-elf

Finally you may build and run this project.

make qemu

If you want to use readelf tools, etc., you may install pwntools on macOS.

Ubuntu

Use Linuxbrew.

Documentation

Build Status (documentation automatically built with travis)

Documentation of this repo is automatically built and deployed with Travis. You may view online version here, syscall specification here.

make && make docs

I'll continuously add Rust-specific implementations and how I made this project into documentation.

Roadmap

Update I haven't maintained this project for a while, as I'm busy with my course-works. The long-term plan of this project is that, I'll leverage Rust async features to schedule kernel threads, therefore eliminating the need of sleeplock.

The main goal of this project is to make an xv6-like operating system with the Rust programming language. And then, I'll separate arch-dependent part and make it into an OS supporting multiple architecture and multiple boards.

  • Virtual Memory and Management
    • [x] Virtual Memory
    • [x] Load ELF files from memory
    • [x] Kernel Allocator
    • [x] Remove direct call to allocator
    • [ ] (WIP) Add guard page around stack page
  • Traps and Interrupt, Drivers
    • [x] UART drivers
    • [x] Machine-mode Timer Interrupt
    • [x] External interrupt
    • [x] Spinlock-based Virt-IO driver
    • [x] Sleeplock-based Virt-IO driver (#2)
    • [ ] Handle signals in a Rust way (#1)
  • Process and Scheduling
    • [x] Switch to User-mode
    • [x] Process
    • [x] System call
    • [x] Scheduling
    • [x] Test multiple process scheduling
    • [x] Fork system call
    • [x] Timer-interrupt-based scheduling
    • [x] Multi-core support
    • [x] Use initcode instead of init binary
    • [ ] Allocator and stdlib in user-space
    • [ ] (WIP) Implement wait syscall
    • [ ] Simple shell
    • [x] Investigate frequent kernel panic (#8)
    • [ ] Reimplement process scheduling system (#9)
  • Filesystem
    • [x] Fake fs and exec system call
    • [x] Real spinlock instead of nulllock
    • [x] Implement simple fs (#5)
    • [x] Implement read, write, open, close, dup, etc. syscalls
    • [x] Implement file-related syscalls on file system and eliminate use of Mutex (#5)
    • [ ] Implement pipe
    • [ ] Copyin and Copyout implementation
    • [ ] Don't use Box in fs implementation
  • Miscellaneous
    • [ ] (WIP) Replace Makefile with pure Rust toolchain (cargo build script)
    • [ ] Use Option instead of panic!
    • [ ] Eliminate use of unsafe
    • [ ] Documentation
    • [ ] High-level abstractions (driver, vm, etc.)
    • [ ] Port to aarch64 and deploy on Raspi
    • [x] Rewrite and credit code from other sources
    • [ ] RISC-V codegen issues (#6)
    • [ ] Security issues (#7)

Reference

For how these projects are related to core-os, refer to #3.

License

MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].