Skip to content

maxdollinger/max_os

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

maxOS Kernel (Rust)

This is a minimal x86_64 kernel written in Rust.
It boots in a virtual machine using the Rust bootloader project and QEMU.

The goal of this project is playing around with low level OS stuff, with as few moving parts as possible, while keeping everything explicit and easy to reason about.


Project Layout

Components

  • kernel
    The actual operating system kernel.
    Runs without an underlying OS (#![no_std]) and is entered directly by the bootloader.

  • builder
    A small host-side Rust program that uses the bootloader crate to create a BIOS-bootable disk image (bios.img) containing the kernel.

  • Makefile
    Orchestrates the workflow:

    • build the kernel
    • generate the bootable disk image
    • launch QEMU

Requirements

System packages

install qemu-system-x86 make

install edk2-ovmf (for UEFI boot)

Rust toolchain

This project requires Rust nightly and bare-metal support.

Install Rust (if not already installed):

curl https://sh.rustup.rs -sSf | sh

Install required components:

rustup toolchain install nightly
rustup component add rust-src llvm-tools-preview --toolchain nightly
rustup target add x86_64-unknown-none --toolchain nightly

(Optional but recommended) Add a rust-toolchain.toml at the workspace root so nightly is selected automatically.


Building and Running

From the workspace root:

make run

This will:

  1. Build the kernel for the x86_64-unknown-none target
  2. Create a bootable BIOS disk image (bios.img)
  3. Launch QEMU and boot the kernel

You should see graphical output produced directly by the kernel via the framebuffer.


Notes

  • The kernel runs without the Rust standard library (no_std).
  • All output is done by writing directly to memory provided by the bootloader.
  • QEMU emulates a PC; no real hardware access is required.
  • This project currently targets BIOS boot (not UEFI).

About

some low level fun

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published