The AI-Written Kernel — Part of the LevitateOS experiment.
This kernel is written entirely by AI agents. It implements the Linux syscall ABI to run unmodified musl-linked binaries. The goal is capability, not code beauty.
| Language | Rust (no_std) |
| Architectures | x86_64, AArch64 |
| Platforms | QEMU only (real hardware aspirational) |
| Syscalls | 70+ implemented |
| libc | musl (static) |
| Shell | BusyBox ash |
This repository is a git submodule of the main LevitateOS project:
# Clone the full project
git clone --recursive https://github.com/LevitateOS/LevitateOS.git
cd LevitateOS
# Build and run
./run.sh # GUI mode
./run-term.sh # Terminal mode (Ctrl+A X to exit)
./run-vnc.sh # Browser at localhost:6080
# Or use xtask directly
cargo xtask build kernel --arch x86_64
cargo xtask run- BusyBox ash shell — interactive prompt, pipes, command substitution
- 80+ coreutils — ls, cat, grep, sed, sort, etc.
- fork/exec/wait — full process lifecycle
- VFS — tmpfs, devtmpfs, initramfs, FAT32, ext4 (read-only)
- Signals — basic sigaction/sigprocmask
arch/ # Architecture-specific crates
├── aarch64/ # ARM64 boot, exceptions, MMU
└── x86_64/ # x86_64 boot, exceptions, MMU
levitate/ # Main kernel binary
syscall/ # Linux syscall implementations (70+)
sched/ # Scheduler and task management
mm/ # Memory management (buddy, VMA)
vfs/ # Virtual filesystem layer
fs/ # Filesystem implementations
├── tmpfs/
├── devtmpfs/
├── initramfs/
├── ext4/
└── fat/
drivers/ # Device drivers
├── virtio-blk/
├── virtio-gpu/
├── virtio-input/
└── virtio-net/
| Subsystem | Status | Notes |
|---|---|---|
| Memory | ✅ Working | Buddy allocator, VMA tracking, mmap/brk |
| Syscalls | ✅ Working | 70+ Linux-compatible syscalls |
| VFS | ✅ Working | Linux-style superblock/inode/dentry |
| Scheduler | ✅ Working | Preemptive round-robin |
| Signals | 🟡 Partial | sigaction works, delivery is basic |
| Networking | ❌ Not yet | Driver exists, no TCP/IP stack |
| Flag | Purpose |
|---|---|
verbose |
Boot logging for debugging |
verbose-syscalls |
Log every syscall invocation |
diskless |
Skip initrd requirement |
- Assembly Entry — MMU setup, stack init
- Rust Entry (
kernel_main) —- Exception handlers, heap, console
- Interrupt controller (GIC/APIC)
- Physical memory from DTB/ACPI
- VirtIO device scan
- Mount filesystems, parse initramfs
- PID 1 — Spawn BusyBox init
- Main Project: github.com/LevitateOS/LevitateOS
- AI Team Logs: See
.teams/in main repo (469+ sessions) - Known Issues: See
docs/GOTCHAS.mdin main repo
MIT — See main repository.