AS OF 2025-10-13:06:00 THIS IS NOW SPECIFICALLY GOING TO BE A SECURITY ANGLED OS AND HENCE THERE IS SOME CHANGING OF DIRECTION.
Architecture: RISC-V 64-bit
Kernel Type: Microkernel
Language: Rust
Version: 0.4.0 - Interactive Shell
- Stability First: Microkernel architecture + Rust memory safety
- Resource Efficiency: Optimized for minimal memory/CPU usage
- Modern Design: Clean RISC-V ISA, no legacy baggage
woflOS implements a two-tier memory management system:
- Type: Bitmap-based allocator
- Page Size: 4KB (standard RISC-V)
- Thread-Safe: Uses atomic operations for SMP safety
- Performance: O(n) allocation in worst case, but with hints for O(1) average case
- Capacity: Up to 128MB (32,768 frames)
- Type: Bump allocator (simple and fast)
- Size: 1MB dedicated kernel heap
- Features: Enables
alloccrate (Vec, String, Box, etc.) - Trade-off: No deallocation support (fine for long-lived kernel objects)
Memory Layout:
0x88000000 ┌─────────────────────┐ Top of RAM
│ Free Physical Pages │ ← Frame allocator manages this
├─────────────────────┤
│ Kernel Heap (1MB) │ ← Bump allocator
├─────────────────────┤
│ Kernel .data/.bss │
0x80200000 ├─────────────────────┤ Kernel starts here
│ OpenSBI Firmware │
0x80000000 └─────────────────────┘ RAM starts here
In your WSL Ubuntu terminal:
mkdir -p woflOS/{src,.cargo}
cd woflOSCopy each artifact into its respective file:
Cargo.toml→ project root.cargo/config.toml→.cargo/directorylinker.ld→ project rootsrc/main.rs→src/directorysrc/uart.rs→src/directorybuild.sh→ project root
chmod +x build.sh./build.shYou should see woflOS boot with ASCII art and status messages!
- Quit QEMU: Press
Ctrl+AthenX - View QEMU monitor: Press
Ctrl+AthenC
woflOS/
├── Cargo.toml # Rust project config
├── .cargo/
│ └── config.toml # RISC-V build settings
├── linker.ld # Memory layout
├── src/
│ ├── main.rs # Kernel entry point
│ └── uart.rs # Serial console driver
└── build.sh # Build and run script
- Boots on RISC-V in QEMU
- Serial console output via UART
- BSS initialization
- Panic handler
- Power-efficient idle loop (WFI instruction)
- Memory management (page allocator)
- Process/thread scheduling
- Interrupt handling
- System calls
- IPC for microkernel services
Build fails with "can't find crate":
rustup target add riscv64gc-unknown-none-elfQEMU not found:
sudo apt install qemu-system-miscNothing appears in QEMU:
- Make sure you're using
-nographicand-serial mon:stdio - Check that the binary was created in
target/riscv64gc-unknown-none-elf/release/
Built with 🐺 by wofl and Claude
