Skip to content

Open-source x86_64 operating system project focused on developing a 64-bit kernel with preemptive multitasking. Engineering thesis. Plans to incorporate a shell and support for user-mode applications.

License

Notifications You must be signed in to change notification settings

AlkOS-Dev/AlkOS

Repository files navigation

AlkOS

License Stars Issues Contributors

A modern kernel written in C++23. Can run doom.

⚡ Capabilities

  • Architecture: Portable HAL-based core (x86_64 implemented), Higher Half, SMP-ready.
  • Memory: PMM (Buddy/Bitmap), VMM (Higher Half Direct Map, VMA), Heap (Slab).
  • Scheduling: Preemptive Multitasking via MLFQ and Round Robin policies.
  • Userspace: Ring 3 isolation, ELF64 loader, Syscall interface (int 0x80).
  • Filesystem: VFS abstraction with FAT12/16/32 and Initrd support.
  • Graphics: Linear Framebuffer, Compositor/Window Manager, Double Buffering.
  • Hardware: ACPI (via uACPI), IO/Local APIC, HPET, PCI, PS/2, Serial.
  • Runtime: Custom libc and libcpp implementation (no upstream deps).
  • Apps: Shell, GUI Demo, Doom.

🚀 Quick Start

Prerequisites: Linux (Arch/Ubuntu recommended) or Docker.

1. Setup Environment Builds the custom GCC 15.1.0 cross-toolchain. System dependency installation is automated for Arch and Ubuntu.

./scripts/alkos_cli.bash --install all --verbose

Note

On other distributions, install prerequisites manually (see scripts/env/), then run with --install toolchain.

2. Configure Build Generates CMake configuration and feature flags.

./scripts/alkos_cli.bash --configure

3. Build & Run Compiles the kernel, userspace apps, generates the ISO, and launches QEMU.

./scripts/alkos_cli.bash --run

Tip

If something doesn't work during the quickstart: append the --verbose flag to see the exact error

🛠 CLI Tooling

The project is managed via scripts/alkos_cli.bash.

Command Description
-i, --install [all/deps/toolchain] Sets up the dev environment.
-c, --configure Generates CMake configs and feature flags.
-r, --run Builds the ISO and boots QEMU.
-g, --git-hooks Installs pre-commit hooks (clang-format).

📂 Structure

  • kernel/ - Core kernel source (Arch specific, MM, Sched, Drivers).
  • libs/ - Custom implementation of libc, libcpp, and containers.
  • userspace/ - Ring 3 applications (Shell, Doom, GUI tests).
  • scripts/ - Build system, CI/CD, and environment automation.

🔧 Debugging

To attach GDB to a running QEMU instance:

# Terminal 1
./scripts/alkos_cli.bash --run --gdb

# Terminal 2
./scripts/install/attach_to_qemu_gdb.bash build/alkos/sysroot/boot/alkos.kernel

Tests

To run UT:

Build AlkOS in test mode

./scripts/actions/build_and_run_tests.bash

Run tests

./scripts/actions/run_tests.bash

📄 License

MIT License. See LICENSE.

About

Open-source x86_64 operating system project focused on developing a 64-bit kernel with preemptive multitasking. Engineering thesis. Plans to incorporate a shell and support for user-mode applications.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •