Skip to content
mlafrocePublic

About

No description, website, or topics provided.

Resources

Stars

2 stars

Watchers

1 watching

Forks

Latest commit

 

History

14 Commits

Folders and files

Repository files navigation

BarbaOS 0.2

BarbaOS is a small toy operating system written in Rust (no_std, no_main), rewritten from scratch based on a previous attempt. You can find the first attempt at legacy branch.

legacy branch was hand-written, full of comprehensive notes. It was curated so every commit had a specific functionality addition. Now BarbaOS v0.2 development is AI-assisted. It doesn't mean it's vibe coded, but AI is and will be used in the development of this toy project.

Unlike previous version, this version targets two architectures:

  • RISC-V (64-bit, riscv64gc-unknown-none-elf) - the default cargo target.
  • x86 32-bit (i686) - via a custom target specification.

Prerequisites

  • A nightly Rust toolchain. Building the kernel relies on unstable features (inline assembly, -Z build-std).
    rustup toolchain install nightly
    rustup override set nightly
    
  • The rust-src component, required by -Z build-std to rebuild core/alloc for the custom i686 target.
    rustup component add rust-src
    
  • QEMU to run the kernel:
    • qemu-system-riscv64 for the RISC-V target.
    • qemu-system-i386 for the x86 target.

Build and execution

RISC-V

Since RISC-V is the default target you can build with:

cargo build

and run with:

cargo run

x86 32-bit (a.k.a. i686)

For i686, build with the custom target configuration:

cargo build -Z build-std=core,alloc --target i686-unknown-none.json

and execute with:

cargo run -Z build-std=core,alloc --target i686-unknown-none.json

License

This project is licensed under the MIT License.

About

No description, website, or topics provided.

Resources

Stars

2 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages