CubeCactusCpp / os /
@agalyaramadoss agalyaramadoss authored on 6 Dec
..
boot shell impelment 4 months ago
drivers shell impelment 4 months ago
kernel shell impelment 4 months ago
lib shell impelment 4 months ago
servers shell impelment 4 months ago
userland shell impelment 4 months ago
BUILD.md shell impelment 4 months ago
README.md shell impelment 4 months ago
SETUP.md shell impelment 4 months ago
SHELL-COMPLETE.md shell impelment 4 months ago
SUCCESS.md shell impelment 4 months ago
install-toolchain.sh shell impelment 4 months ago
setup.sh shell impelment 4 months ago
README.md

CubeCactusOS

A custom operating system based on MINIX3 microkernel architecture.

Overview

CubeCactusOS is a microkernel-based operating system inspired by MINIX3, designed for educational purposes and modern system development. It follows the MINIX3 philosophy of modularity and reliability.

Project Structure

os/
├── kernel/         # Microkernel core
├── servers/        # System servers (PM, VFS, etc.)
├── drivers/        # Device drivers
├── userland/       # User-space programs and utilities
├── lib/            # System libraries
└── boot/           # Boot loader and initialization

Architecture

Following MINIX3's microkernel design:

  • Microkernel: Minimal kernel handling IPC, scheduling, and low-level operations
  • Servers: System services running as user-space processes (Process Manager, Virtual File System, etc.)
  • Drivers: Device drivers isolated in separate processes
  • User Programs: Standard utilities and applications

Prerequisites

  • GCC/Clang compiler toolchain
  • GNU Make
  • QEMU or VirtualBox (for testing)
  • Git (for MINIX3 source)
  • Cross-compilation tools (optional for x86 targets)

Building from MINIX3 Source

Step 1: Get MINIX3 Source Code

# Clone MINIX3 repository
git clone https://github.com/Stichting-MINIX-Research-Foundation/minix.git minix3-source
cd minix3-source

Step 2: Build the OS

# From the project root
make os-build

Step 3: Create Bootable Image

make os-image

Step 4: Run in QEMU

make os-run

Development Workflow

  1. Modify Kernel: Edit files in os/kernel/
  2. Add Drivers: Create new drivers in os/drivers/
  3. Build: Run make os-build
  4. Test: Run make os-run to test in QEMU

Customization

Adding a New System Call

  1. Define the system call in os/kernel/syscall.h
  2. Implement the handler in os/kernel/syscall.c
  3. Update the system call table
  4. Rebuild the kernel

Creating a New Driver

  1. Create driver directory in os/drivers/
  2. Implement driver following MINIX3 driver interface
  3. Register driver with the system
  4. Rebuild and test

Key Features (Planned)

  • Microkernel architecture based on MINIX3
  • Message-passing IPC mechanism
  • Isolated device drivers
  • Virtual File System (VFS)
  • Process and Memory Management
  • Basic networking stack
  • POSIX compatibility layer
  • Modern hardware support

Resources

Contributing

This is an educational project. Contributions and learning improvements are welcome!

License

Based on MINIX3 (BSD-style license). Check MINIX3 source for complete license terms.

Acknowledgments

  • Andrew S. Tanenbaum and the MINIX3 team
  • The MINIX Research Foundation
  • OSDev community

Note: Building a complete OS is a complex undertaking. Start with understanding MINIX3's architecture before making modifications.