Skip to content

BerkeOruc/BerkeOS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

35 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

⚠️ BerkeOS Development Has Been Discontinued

This project is no longer maintained. All development has moved to Bros.

Bros is the successor to BerkeOS with improved features, better architecture, and proprietary licensing.

Please use the Bros repository for all future development and contributions.


BerkeOS Banner
Typing SVG

Rust x86_64 License Version Lines


GitHub Stars GitHub Forks GitHub Issues Last Commit


πŸ‡ΉπŸ‡· Built from scratch by a 16-year-old developer from Turkey

A modern, DOS-inspired operating system proving that with dedication and AI assistance, anyone can build an OS.


πŸš€ Quick StartΒ Β  πŸ“– DocumentationΒ Β  πŸ—ΊοΈ RoadmapΒ Β  🀝 Contributing

separator

πŸ“‘ Table of Contents

Click to expand/collapse
  ─────────────────────────────────────────────
    🎯 About the Project                      
    πŸ‘¨β€πŸ’» About the Developer                  
    πŸ“Έ Screenshots                           
    βœ… Module Status                         
    πŸ› οΈ Features                             
    πŸ“Š Code Statistics                       
    πŸš€ Quick Start                           
    πŸ—οΈ Architecture                          
    πŸ’» Shell Commands                        
    πŸ—ΊοΈ Roadmap                              
    πŸ“œ Changelog                            
    🀝 Contributing                         
    πŸ“„ License                              
    πŸ™ Acknowledgments                       
  ─────────────────────────────────────────────

separator

🎯 About the Project

__/\\\\\\\\\\\\\___________________________________________________________________/\\\\\__________/\\\\\\\\\\\___        
 _\/\\\/////////\\\_______________________________/\\\____________________________/\\\///\\\______/\\\/////////\\\_       
  _\/\\\_______\/\\\______________________________\/\\\__________________________/\\\/__\///\\\___\//\\\______\///__      
   _\/\\\\\\\\\\\\\\______/\\\\\\\\___/\\/\\\\\\\__\/\\\\\\\\________/\\\\\\\\___/\\\______\//\\\___\////\\\_________     
    _\/\\\/////////\\\___/\\\/////\\\_\/\\\/////\\\_\/\\\////\\\____/\\\/////\\\_\/\\\_______\/\\\______\////\\\______    
     _\/\\\_______\/\\\__/\\\\\\\\\\\__\/\\\___\///__\/\\\\\\\\/____/\\\\\\\\\\\__\//\\\______/\\\__________\////\\\___   
      _\/\\\_______\/\\\_\//\\///////___\/\\\_________\/\\\///\\\___\//\\///////____\///\\\__/\\\_____/\\\______\//\\\__  
       _\/\\\\\\\\\\\\\/___\//\\\\\\\\\\_\/\\\_________\/\\\_\///\\\__\//\\\\\\\\\\____\///\\\\\/_____\///\\\\\\\\\\\/___ 
        _\/////////////______\//////////__\///__________\///____\///____\//////////_______\/////_________\///////////_____

BerkeOS is a modern, DOS-inspired operating system developed entirely from scratch using Rust (no_std). It features a complete boot chain, monolithic kernel, custom filesystem, interactive shell, device drivers, and more β€” all built with zero budget using free AI tools.

πŸ”‘ Key Highlights

  • πŸ¦€ Pure Rust β€” no_std monolithic kernel
  • πŸ–₯️ Bare Metal β€” Boots on real x86_64 hardware
  • πŸ“ Custom FS β€” BerkeFS with ATA PIO support
  • 🐚 Rich Shell β€” berkesh with 30+ commands
  • ✏️ Text Editor β€” Built-in deno editor
  • 🎡 Audio β€” PC Speaker beep & melodies
  • ⏰ Real-Time β€” RTC clock integration
  • πŸ”’ Memory Safe β€” Rust's ownership model

πŸ“ˆ Project Stats

Metric Value
πŸ—οΈ Architecture x86_64 (Long Mode)
πŸ¦€ Language Rust (nightly, no_std)
πŸ”§ Assembler NASM (boot stage)
πŸ“¦ Build System Custom (Cargo + NASM + LD + GRUB)
πŸ–₯️ Emulator QEMU
πŸ“ Total Lines ~14,288
πŸ’° Build Cost 0 TL
πŸ“… Started 2024 (developer age 14)

separator

πŸ‘¨β€πŸ’» About the Developer


developer

Berke OruΓ§
Age 16 Β· Turkey πŸ‡ΉπŸ‡·

GitHub

"I wanted to prove that with dedication and AI assistance, anyone can build an operating system from scratch."

Detail Info
πŸŽ‚ Age 16 years old
🌍 Location Turkey πŸ‡ΉπŸ‡·
πŸš€ Started Age 8 (2018) with js
🎯 Motivation Proving OS development is accessible to anyone
πŸ’° Cost 0 TL β€” built entirely with free AI tools
πŸ€– AI Tools Free AI assistants for code generation & learning

separator

It is an ambitious project aiming for broad compatibility (including Linux ABI support) and a flexible architecture. We consider it a sister project, and your support there would be highly valued!

πŸ“Έ Screenshots

⚠️ Note: Some of the screenshots may not be uploaded yet.

Boot Screen
πŸ–₯️ Boot Screen β€” UEFI/BIOS auto-detection
Shell
🐚 berkesh Shell β€” Interactive command line
Neofetch
πŸ“Š Neofetch β€” System information
Deno Editor
✏️ Deno Editor β€” Built-in text editor

separator

βœ… Module Status

Transparency Note: This table reflects the actual implementation status as derived from the source code.

Module Source File(s) Status Description
🟒 Boot Chain boot.asm, linker.ld βœ… 32β†’64 bit Long Mode, page tables, kernel jump
🟒 VGA Text Mode vga.rs βœ… 80Γ—25 color text output, scrolling
🟒 Framebuffer framebuffer.rs, font.rs βœ… Graphical framebuffer, font rendering
🟒 IDT + PIC + PIT idt.rs, pic.rs, pit.rs βœ… Interrupts, 8259 PIC, 100Hz timer
🟒 PS/2 Keyboard keyboard.rs βœ… Scan code β†’ keypress, layout support
🟒 Memory Paging paging.rs, allocator.rs βœ… 2 MiB huge pages, heap allocator
🟒 ATA PIO Disk ata.rs βœ… Read/write sectors, disk detection
🟒 BerkeFS berkefs.rs βœ… Custom filesystem, dirs, files, mount
🟒 Shell (berkesh) shell.rs βœ… 30+ commands, history, tab support
🟒 Deno Editor deno.rs, editor.rs βœ… Built-in text editor
🟒 RTC Clock rtc.rs βœ… Real-time clock, date/time
🟒 PC Speaker pcspeaker.rs, audio.rs βœ… Beep, melodies via PIT
🟒 Scheduler scheduler.rs, process.rs βœ… Basic process scheduling
🟒 Syscalls syscall.rs βœ… System call interface
🟑 AHCI/SATA ahci.rs πŸ§ͺ SATA controller detection, WIP
🟑 USB Stack usb/ πŸ§ͺ OHCI, USB storage β€” early stage
🟑 Network net/, rtl8139.rs πŸ§ͺ IPv4/ARP buffers, RTL8139 β€” early stage

Legend: 🟒 Implemented | 🟑 Experimental | πŸ”΄ Planned

separator

πŸ› οΈ Features

🧠 Kernel & Boot

  • βœ… Monolithic kernel in Rust (no_std, #![no_main])
  • βœ… UEFI/BIOS auto-detection boot
  • βœ… boot.asm β€” 32-bit β†’ Long Mode transition
  • βœ… Page tables with 2 MiB huge pages
  • βœ… Heap allocator
  • βœ… IDT + PIC 8259 + PIT 100Hz timer
  • βœ… Basic process scheduler & syscall interface

πŸ“ Filesystem & Storage

  • βœ… BerkeFS β€” custom filesystem (up to 12 drives)
  • βœ… ATA PIO disk read/write
  • βœ… Directory tree, file ops (create, read, write, delete)
  • βœ… Drive mount/unmount/format
  • πŸ§ͺ AHCI SATA controller detection (experimental)

🐚 Shell & User Interface

  • βœ… berkesh β€” interactive CLI with 30+ commands
  • βœ… VGA text mode with color support (80Γ—25)
  • βœ… Framebuffer graphics mode with font rendering
  • βœ… deno β€” built-in text editor
  • βœ… Calculator, neofetch, system info
  • βœ… Command history

πŸ”Œ Device Drivers

  • βœ… PS/2 keyboard with scan code translation
  • βœ… RTC (Real-Time Clock)
  • βœ… PC Speaker (beep, play melodies)
  • πŸ§ͺ RTL8139 network card driver (experimental)
  • πŸ§ͺ USB OHCI + mass storage (experimental)

separator

πŸ“Š Code Statistics

      ─────────────────────────────────────────────────────
             CODE AUTHORSHIP BREAKDOWN                    
      ─────────────────────────────────────────────────────
      
        Developer Written    β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–‘β–‘β–‘β–‘β–‘  43%       
        AI-Assisted          β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–‘  57%      
      
        Total Lines: ~14,288                           
        By Developer: ~6,143 lines                      
        AI-Assisted: ~8,145 lines                      
        Build Cost: 0 TL                                
      
      ─────────────────────────────────────────────────────

separator

πŸš€ Quick Start

πŸ“‹ Prerequisites

# Arch Linux
sudo pacman -S rust nasm grub xorriso qemu
rustup override set nightly
rustup component add rust-src llvm-tools-preview

# Ubuntu / Debian
sudo apt install build-essential rustc nasm grub-pc-bin xorriso qemu-system-x86
rustup override set nightly
rustup component add rust-src llvm-tools-preview

⚑ Build & Run

# 1️⃣  Clone the repository
git clone https://github.com/berkeoruc/berkeos.git
cd berkeos

# 2️⃣  Build the OS (creates bootable ISO)
chmod +x build.sh
./build.sh

# 3️⃣  Run in QEMU
chmod +x run.sh
./run.sh

# UEFI mode
./run.sh --uefi

πŸ”§ Build Process

build.sh Pipeline
─────────────────
  1. NASM compiles boot.asm β†’ boot.o (32-bit bootstrap)
  2. Cargo builds kernel as staticlib (x86_64-unknown-none)
  3. ld links boot.o + libkernelos.a β†’ kernel.bin
  4. grub-mkrescue packages into bootable ISO

separator

πŸ—οΈ Architecture

Boot Flow Diagram

graph TD
    A["πŸ”Œ Power On"] --> B["UEFI / BIOS<br/>(auto-detect)"]
    B --> C["boot.asm<br/>πŸ“¦ 32-bit Protected Mode"]
    
    C --> C1["βœ… Verify boot mode"]
    C1 --> C2["πŸ“‹ Set up page tables"]
    C2 --> C3["πŸš€ Enable Long Mode (64-bit)"]
    C3 --> C4["➑️ Jump to kernel_main"]
    
    C4 --> D["kernel_main()<br/>πŸ¦€ Rust Β· no_std"]
    
    D --> D1["πŸ–₯️ Initialize VGA / Framebuffer"]
    D1 --> D2["⌨️ Initialize PS/2 Keyboard"]
    D2 --> D3["πŸ”§ Setup IDT + PIC + PIT"]
    D3 --> D4["πŸ“‹ Initialize Scheduler"]
    D4 --> D5["πŸ’Ύ Detect ATA / AHCI Drives"]
    D5 --> D6["πŸ“ Mount BerkeFS"]
    D6 --> D7["🐚 Start berkesh Shell"]
    D7 --> D8["⏸️ Halt Loop"]
    
    style A fill:#E8792B,stroke:#333,color:#fff
    style B fill:#0071C5,stroke:#333,color:#fff
    style C fill:#333,stroke:#E8792B,color:#fff
    style D fill:#2EA44F,stroke:#333,color:#fff
    style D7 fill:#8957E5,stroke:#333,color:#fff
Loading

Project Structure

BerkeOS/
β”‚
β”œβ”€β”€ πŸ“„ Cargo.toml                 # Rust project config
β”œβ”€β”€ πŸ“„ linker.ld                  # Linker script
β”œβ”€β”€ πŸ”§ build.sh                   # Build pipeline
β”œβ”€β”€ πŸ”§ run.sh                     # QEMU launch
β”‚
β”œβ”€β”€ πŸ“‚ assets/                    # Images, screenshots
β”‚
└── πŸ“‚ src/
    β”œβ”€β”€ boot.asm                  # NASM bootstrap
    β”œβ”€β”€ main.rs                   # Cargo dummy entry
    β”œβ”€β”€ lib.rs                    # kernel_main + modules
    β”‚
    β”œβ”€β”€ idt.rs, pic.rs, pit.rs   # Interrupts
    β”œβ”€β”€ paging.rs, allocator.rs   # Memory
    β”œβ”€β”€ scheduler.rs, process.rs   # Process management
    β”œβ”€β”€ syscall.rs                # System calls
    β”‚
    β”œβ”€β”€ vga.rs, framebuffer.rs   # Graphics
    β”œβ”€β”€ keyboard.rs, ata.rs       # Drivers
    β”œβ”€β”€ rtc.rs, pcspeaker.rs     # Peripherals
    β”‚
    β”œβ”€β”€ berkefs.rs                # Filesystem
    β”œβ”€β”€ shell.rs                  # Shell
    β”œβ”€β”€ deno.rs, editor.rs       # Editor
    β”‚
    β”œβ”€β”€ usb/                      # USB stack πŸ§ͺ
    └── net/                      # Network πŸ§ͺ

separator

πŸ’» Shell Commands

Navigation

Command Description
cd <dir> Change directory
pwd Print working directory
ls / dir List directory contents
drives List available drives
df Disk free space

File Operations

Command Description
cat <file> Display file contents
touch <file> Create empty file
mkdir <dir> Create directory
rm <path> Remove file or directory
cp <src> <dst> Copy file
mv <src> <dst> Move/rename file
find <name> Search for files
stat <path> File/dir information

System

Command Description
help Show available commands
ver Version info
date Current date/time (RTC)
mem Memory usage
sysinfo Full system information
neofetch System info display
uptime System uptime

Tools & Admin

Command Description
calc <expr> Calculator
beep PC Speaker beep
play <melody> Play melody
deno <file> Open text editor
format <drv> Format a drive
fsck Filesystem check
reboot Reboot system
halt Halt / shutdown

separator

πŸ—ΊοΈ Roadmap

Version Goals
v0.7 Stability & Polish
v0.8 BerkeFS v2, Shell UX, Drive Registry
v0.9 TCP/IP, Sound Card, USB Stabilization
v1.0 SMP, GUI Desktop, Package Manager

v0.7 Priorities

# Task Impact
1 Version Consistency 🟒 High
2 CI/CD Pipeline 🟒 High
3 Panic Handler Improvements 🟒 High
4 First GitHub Release 🟒 High

separator

πŸ“œ Changelog

v0.6.3 β€” Stabilization

Date: March 2026

Change Description
πŸ”Œ Serial Port COM1 driver (115200 8N1) added
πŸ“ Log Macros kinfo!, kwarn!, kerr!, kdebug!
🚨 Panic Handler Serial output + stack dump
πŸ—‚οΈ DriveRegistry FS0..FS11 β†’ single struct
βœ… fsck BerkeFS validation tool
πŸ€– CI/CD GitHub Actions pipeline
πŸ“¦ Test Harness Automated test script

v0.6.2 β€” UI/UX & Code Quality

Date: March 2026

  • ASCII logo added
  • All Unicode boxes translated to English
  • Silent boot (GRUB timeout = 0)
  • Global state refactor (static mut β†’ spin::Mutex)

v0.6.1 β€” Stability Patch

Bug fixes and minor improvements

v0.6.0 β€” Initial Release

First public release with core functionality

separator

🀝 Contributing

PRs Welcome Issues

# 1️⃣  Fork the repository
# 2️⃣  Create your feature branch
git checkout -b feature/amazing-feature

# 3️⃣  Make your changes and commit
git commit -m "feat: add amazing feature"

# 4️⃣  Push to your fork
git push origin feature/amazing-feature

# 5️⃣  Open a Pull Request πŸŽ‰

🎯 Good First Issues

  • πŸ“ Improve inline documentation
  • πŸ§ͺ Test modules in QEMU and report bugs
  • πŸ“Έ Take screenshots and add them to assets/

separator

πŸ“„ License

Apache License 2.0 β€” Copyright 2024-2026 Berke OruΓ§

separator

πŸ™ Acknowledgments

  • Rust Community β€” no_std ecosystem
  • OSDev Wiki β€” Kernel development resources
  • Free AI Tools β€” Making this project possible at zero cost
  • Open Source β€” The spirit of sharing and collaboration

🌟 Sister Project: Qunix OS

If you enjoy exploring BerkeOS, you should definitely check out Qunix Operating System.

It is an ambitious project aiming for broad compatibility (including Linux ABI support) and a flexible architecture. We consider it a sister project, and your support there would be highly valued!

Packages

 
 
 

Contributors