RustForge

rust-kernel

Rustbelt: a hobby x86_64 kernel written in Rust

authorTyler Fowler <tyler@localhost>2026-10-30 11:48:50 -0700
commit58fc4fd3656324fc67db37322de2bdd6e563faf8
parentc01312bd1a5e452ced8b564a6ae52dca022714f3
treebrowse files at this commit
Stage 15.1: musl prerequisites (0.15.1)
MREADME.md+4 -0
Mboot.png+0 -0
Mscripts/screenshot.sh+7 -1

3 files changed, 11 insertions, 1 deletion

@@ -4161,6 +4161,10 @@ and for a UEFI/framebuffer setup later, the newer [`bootloader` 0.11](https://gi   - *`ls -l` and the old `Stat.mode == 0`.* FAT and ramfs files used to     show no permission bits. With Linux's `struct stat`, `st_mode` always     has some, so `ls -l` always prints them (`-rw-r--r--`).+  - *Typing ahead into the screenshot.* `screenshot.sh` waits 0.8 s after+    each command; `fputest` takes longer, so the next command's echo was+    printed in the middle of its output. A session line `{SLEEP n}` now+    waits before typing the next command. - **Pitfalls hit in stage 15:**   - *`write` must return what the caller asked for, not what went out.*     With ONLCR a 6-byte `"hello\n"` becomes 7 bytes on the wire. The tty

Binary file changed.

@@ -29,7 +29,9 @@ if [ -z "$SESSION" ]; then     # stage 15's libc plumbing (threads summing on all CPUs, the epoll/poll     # echo server over 127.0.0.1) and stage 15.1's musl prerequisites: the     # FPU and path-syscall tests and rawabi, a no-libc Linux binary.-    # "vx{BS}er" types a typo and fixes it.+    # "vx{BS}er" types a typo and fixes it. A line "{SLEEP n}" types+    # nothing and waits n seconds (fputest runs a while; without it the next+    # command's echo lands in the middle of its output).     SESSION=$(mktemp /tmp/session.XXXXXX)     cat > "$SESSION" <<'TXT' tile@@ -39,6 +41,7 @@ spin 1000 > /tmp/hog.txt threads | grep threads echoserver | grep echoes fputest | grep passed+{SLEEP 3} pathtest | grep passed rawabi | grep -v "ok   " TXT@@ -80,6 +83,9 @@ def key(c):     return c s = socket.socket(socket.AF_UNIX); s.connect(sock) for line in open(session):+    m = re.fullmatch(r'\{SLEEP ([0-9.]+)\}', line.strip())+    if m:+        time.sleep(float(m.group(1))); continue   # wait, type nothing     if line.strip() == '{^C}':         line = '{^C}'   # Ctrl+C alone, no Enter after it     for c in re.findall(r'\{\^?[A-Z]+\}|.|\n', line, re.S):