TinyOS is a deliberately minimal x86_64 hobby kernel written in Rust. The first milestone is an interactive kernel monitor that boots in QEMU, prints text, logs over serial, reads a PS/2 keyboard, exposes a tiny shell, and stores files in RAM.
Current status: TinyOS 0.2 GUI desktop complete. The kernel boots through Limine, initializes a basic x86_64 IDT, remaps the PIC, enables PS/2 keyboard and mouse IRQs, clears the VGA text screen, prints:
TinyOS booted
>
logs boot/panic messages to the first serial port, idles with hlt until interrupts arrive, edits a fixed-size input line from basic US-layout PS/2 keyboard or interrupt-driven serial input, and runs a tiny host-tested shell with help, version, clear, halt, reboot, mem, uptime, desktop, open, edit, echo, ls, cat, write, rm, and stat backed by a flat in-memory filesystem. The desktop command enables the TinyOS 0.2 framebuffer desktop at 1024x768x32 with larger bitmap labels, larger draggable/closable windows, serial open sysinfo / open terminal / open editor controls, edit <text>, optimized double-buffered rendering, cursor-only mouse repaints, and a software mouse cursor when PS/2 mouse input is available.
-
Rust with the
x86_64-unknown-nonetarget:rustup target add x86_64-unknown-none
-
make -
git -
xorrisoformake iso/make run -
mtoolsandpartedformake hdd/make run-hdd -
qemu-system-x86_64with SDL display support (qemu-ui-sdlorqemu-desktopon Arch)
Host-unit-test the shell parser and line buffer:
cargo test --manifest-path kernel/Cargo.toml --target x86_64-unknown-linux-gnumake isoThis builds kernel/target/x86_64-unknown-none/debug/tinyos, downloads Limine into .build/limine, and creates tinyos.iso.
If xorriso is unavailable, build a bootable raw HDD image instead:
make hddThis creates tinyos.img.
Graphical QEMU run, with SDL display by default for better mouse capture, PS/2 keyboard input captured by the QEMU window, and serial I/O in the terminal:
make runmake run is an alias for:
make run-guiYou can type shell commands either in the QEMU window after clicking it, or in the terminal attached to serial I/O. Press Ctrl+Alt+G to release keyboard/mouse capture. To use GTK instead of SDL, run GUI_DISPLAY=gtk make run-gui.
Run the graphical target:
make run-guiAt the serial prompt, run:
desktop smoke
open sysinfo
open terminal
edit hello from TinyOS
open editor
desktop redraw
desktop off
desktop
Expected serial output includes desktop smoke ok, opened sysinfo, opened terminal, editor updated, opened editor, desktop redrawn, desktop off, and desktop on. Expected QEMU behavior: SDL captures the mouse while the window is focused, the TinyOS cursor moves inside the desktop, System Info updates once per second, the Terminal window mirrors recent shell activity, and the Editor shows the latest edit <text> content. Press Ctrl+Alt+G to release capture if needed.
For a headless command smoke, build the ISO and pipe the smoke commands into serial:
{ sleep 3; printf 'desktop smoke\ndesktop off\n'; } | timeout 12 qemu-system-x86_64 -cdrom tinyos.iso -serial stdio -display none -no-reboot -no-shutdownThe timeout terminates QEMU after the smoke output appears; seeing desktop smoke ok and desktop off means the GUI command path rendered successfully.
Headless serial-only run, where shell commands are typed directly in the terminal:
make run-headlessOr, for the raw HDD image path:
make run-hddEquivalent QEMU commands:
qemu-system-x86_64 -cdrom tinyos.iso -serial stdio -display sdl -no-reboot -no-shutdown
qemu-system-x86_64 -cdrom tinyos.iso -serial stdio -display gtk -no-reboot -no-shutdown
qemu-system-x86_64 -cdrom tinyos.iso -serial stdio -display none -no-reboot -no-shutdown
qemu-system-x86_64 -drive format=raw,file=tinyos.img -serial stdio -no-reboot -no-shutdownSee docs/ROADMAP.md for the completed TinyOS 0.1 monitor and TinyOS 0.2 GUI desktop summary. See docs/RELEASE_0_2.md for TinyOS 0.2 release notes.
make run-debugThen attach GDB to QEMU's server on port 1234.
