RustForge

foundry

Foundry OS: the operating system built on the Rustbelt kernel

authorGrok Bot <grokbot@localhost>2026-10-31 18:52:10 -0700
commit82182faf902deb074eb806d65d60582560aae102
parentf0db8ff6a57092f8450ec7c8c9e97d2f7de18356
parent4b42283414d837fd1579dfef9781be3169d3f26b
treebrowse files at this commit
Import rust-kernel disk/ with its history as rootfs/ (git subtree split at a55b41d)

git-subtree-dir: rootfs
git-subtree-mainline: f0db8ff6a57092f8450ec7c8c9e97d2f7de18356
git-subtree-split: 4b42283414d837fd1579dfef9781be3169d3f26b
Arootfs/notes/todo.txt+2 -0
Arootfs/readme.txt+3 -0
Arootfs/scripts/selftest.sh+120 -0

3 files changed, 125 insertions, 0 deletions

@@ -0,0 +1,2 @@+Done: the shell (cd, ls, cat, run, start, pipes, redirection, drive letters).+Next: more file systems -- ext2, exFAT, btrfs.
@@ -0,0 +1,3 @@+Hello from the FAT32 disk! This file lives on a virtio-blk disk, in a GPT+partition, in a FAT32 file system -- read through the kernel's VFS.+In the Rustbelt shell this disk is drive B: -- try `cd B:` and `ls`.
@@ -0,0 +1,120 @@+# Rustbelt shell self-test: `cargo run --features headless` runs this with+# `sh /mnt/disk0/scripts/selftest.sh` (B:/scripts/selftest.sh) and scripts/run-headless.sh checks the output.+ver+drives+pwd+cd B:+ls+ls -l notes+type B:/readme.txt+cat b:notes/todo.txt | grep -i EXT | wc -l+dir bin | wc -l+echo first line > A:/tmp/out.txt+echo second line >> /tmp/out.txt+cat < /tmp/out.txt+md /tmp/work+copy B:/notes/todo.txt /tmp/work+touch /tmp/work/empty.txt+ls -l A:/tmp/work+del /tmp/work/todo.txt /tmp/work/empty.txt /tmp/work+grep "B:" readme.txt+alias ll="ls -l"+ll A:/tmp+run --trace cat B:/notes/todo.txt+start sleep 1+jobs+wait+cd C:+ls+cat hello-link+grep "line 12345" big.txt+cp B:/notes/todo.txt C:/todo.txt+cat C:/todo.txt | grep -i ext2+md C:/made-here+echo written by Rustbelt > C:/made-here/note.txt+type C:/made-here/note.txt+ls -l C:/+cd D:+ls+cat "long file name with spaces.txt"+cp B:/notes/todo.txt D:/+cp C:/hello.txt "Copied From Ext2.txt"+cp mixedcase.txt C:/from-exfat.txt+cat C:/from-exfat.txt+md "New Folder"+echo hi from exFAT > "New Folder/Note.txt"+type "new folder/NOTE.TXT"+ls -l D:/+cd E:+ls -l+cat hello.txt+cat hello-link+cat docs/btrfs/cow.txt+wc big.txt+grep "line 119999" big.txt+cat projects/rustbelt/stage10.txt+cp docs/btrfs/cow.txt D:/cow.txt+type D:/COW.TXT | wc -l+cp docs/btrfs/chunks.txt C:/chunks.txt+cat C:/chunks.txt | wc -l+echo hi > new.txt+rm hello.txt+mkdir newdir+run evil+# Stage 11: a stack overflow hits the guard zone and is killed cleanly;+# then two CPU hogs in the background, and sysinfo shows the load per CPU.+run overflow+start spin+start spin+sysinfo+wait+# Stage 12: networking. DHCP gave us an address; ping QEMU's gateway; fetch+# from the test web server QEMU runs for 10.0.2.100 (guestfwd), and save a+# 108 KB file to D:; look up a name (only works if the host has DNS); then+# serve one request with httpd (run-headless.sh curls it through hostfwd).+ifconfig+ping -c 3 -i 200 10.0.2.2+fetch http://10.0.2.100/+wget -o D:/seq.txt http://10.0.2.100/big+cat D:/seq.txt | wc -l+host example.com+httpd -n 1 -t 20+# Stage 13: virtual drivers. The devices in /dev; random bytes from+# virtio-rng; a shell on the second console (getty -1 runs the commands+# QEMU feeds into hvc0 from a file; its output goes to another file that+# run-headless.sh checks); the tiling demo on the virtio-gpu framebuffer.+ls -l /dev+random -n 8+random -d 6 5+getty -1 /dev/hvc0+tile+tile -r+# Stage 14: processes. Every program above was started with fork + execve;+# these check the process model itself (each prints "all checks passed").+# Then a background job ended with the kill builtin (SIGTERM: 128+15).+forktest+cowtest+mmaptest+sigtest+start spin 1000+kill %1+wait+kill -l+# Stage 15: libc plumbing. Threads summing on all 4 CPUs (futex mutex,+# TLS), an epoll + poll echo server over 127.0.0.1, ptys and the line+# discipline, nonblocking I/O; each prints "all checks passed".+threads+echoserver+ptytest+nbtest+# Stage 15.1: musl prerequisites. FPU/SSE/AVX state per thread and in+# signal frames, the Linux C-string path syscalls, and rawabi: a plain+# Linux binary built by gcc with no libc at all.+fputest+pathtest+rawabi+nosuchprogram+cd Q:+cd A:/tmp+pwd+exit 0