Skip to content

Sa4dUs/marcel_os

Repository files navigation

marcel_os

Version License Programming Language

marcel_os is an operating system project developed in Rust. This repository contains the source code and resources necessary to build and run.

Features

  • Bootable Kernel: A fully functional kernel capable of booting on x86_64 hardware.
  • VGA Buffer Driver: Direct manipulation of the screen using VGA text mode.
  • Unit and Integration Test Suite: Comprehensive tests to ensure code reliability and stability.
  • CPU Exception Handling: Mechanisms to handle CPU exceptions and faults gracefully.
  • Interrupt Handling: Efficient management of hardware and software interrupts.
  • Four-Level Paging: Advanced memory management using four-level paging.
  • Dynamic Memory Management: Allocation and deallocation of memory at runtime.
  • Single-Core Preemptive Executor: A scheduler that allows preemptive multitasking on a single core.
  • Keyboard Support: Basic input handling for keyboard devices.
  • Simple CLI: A command-line interface for user interaction.

Getting Started

Prerequisites

  • Rust Compiler: Ensure you have the latest stable version of Rust installed. You can download it from rust-lang.org.
  • Cargo: Rust's package manager, included with the Rust installation.
  • QEMU: An emulator to run marcel_os without physical hardware. Download it from qemu.org.

Installing the Nightly Version of Rust

To build and run marcel_os, it's recommended to use the 2024-12-31 nightly version of Rust. Follow these steps:

  1. Install the Latest Nightly Toolchain:

    Use rustup to install a valid nightly version:

    rustup toolchain install nightly-2024-12-31
  2. Set the Toolchain for the Current Directory: To use this specific nightly version in your current project directory, set an override:

    rustup override set nightly-2024-12-31

    This ensures that any cargo or rustc commands run within this directory use the specified nigthly version.

  3. Verify the Active Toolchain: Confirm that the override is set correctly:

    rustup show

    Look for the "overrides" section to ensure the correct toolchain is active in your directory.

Installing required rustup components

marcel_os requires additional Rust components for building:

  1. Add the Rust Standard Library Source: This component provides the source code of the Rust standard library, which is necessary for building the kernel:

    rustup component add rust-src
  2. Add LLVM Tools: The LLVM tools are required for certain build processes:

    rustup component add llvm-tools-preview

    These components are installed per toolchain, so ensure you're using the correct toolchain when adding them.

Building marcel_os

  1. Clone the Repository:

    git clone https://github.com/sa4dus/marcel_os.git
    cd marcel_os
  2. Build the Kernel:

    cargo build --release

    This command compiles the kernel and outputs the binary in the target/release directory

  3. Running marcel_os: After building, you can run marcel_os locally in your machine using QEMU:

    cargo run

Contributing

Contributions are welcome! Please follow these steps:

  1. Fork the Repository: Click on the "Fork" button at the top right of this page.

  2. Create a New branch: Use a descriptive name for your branch.

  3. Make Changes: Implement your feature or fix

  4. Commit Changes: Write clear and concise commit messages.

        git commit -m "[prefix]: [description of the changes]
  5. Push to Your Fork:

    git push origin feature-name
  6. Submit a Pull Request: Navigate to the original repository and click on "New Pull Request".

License

This project is licensed under the MIT License. See the LICENSE file for details.

References

About

Operating System written in Rust

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages