RustForge

foundry

Foundry OS: the operating system built on the Rustbelt kernel

authorGrok Bot <grokbot@localhost>2026-10-31 20:27:32 -0700
commitd7751ad0c0d7c10bed972510639df574d995d49d
parent8c5294825551990c470bee8aad8779c984a3e70b
treebrowse files at this commit
Brand rbsh's banner and getty's greeting as Foundry OS

rbsh (interactive): 'Foundry OS shell (rbsh) on Rustbelt 0.21.0. Type
`help` for commands.' (kernel name and release from uname), then the
drives. getty: 'Foundry OS getty: shell on this terminal'. run-headless
expects the new greeting on hvc0; test-reference, which boots the kernel
repo's own getty, passes GETTY_GREETING with the old one.
MMakefile+1 -1
Mrust/rbsh/src/main.rs+5 -2
Mrust/sys/src/bin/getty.rs+1 -1
Mscripts/run-headless.sh+3 -1

4 files changed, 10 insertions, 5 deletions

@@ -149,7 +149,7 @@ test-v1: image-v1 kernel # The baseline: the kernel's own disk.img through the very same v1 checks # (without Foundry OS's own programs and expected lines, which it lacks). test-reference: kernel-	$(TEST_ENV) BIN_COUNT=$(words $(BIN_ORDER)) \+	$(TEST_ENV) BIN_COUNT=$(words $(BIN_ORDER)) GETTY_GREETING="Rustbelt getty: shell on this terminal" \ 	    scripts/run-headless.sh $(KTARGET)/disk.img $(KBOOT_HL) $(KTARGET) $(OUT)/reference  compare: image-v1 kernel
@@ -46,7 +46,7 @@ const DEFAULT_ALIASES: &[(&str, &str)] = &[ ];  const HELP: &str = "\-Rustbelt shell commands+Foundry OS shell (rbsh) commands   builtins   cd [dir]  pwd  echo [text]  ver  drives  alias [name=value]              history  jobs  wait [pid]  cls / clear  help  exit [code]              kill [-SIG] pid|%job ...  kill -l  fg [%job]  bg [%job]@@ -133,7 +133,10 @@ fn main() -> i64 {             sigaction_raw(sig, SIG_IGN, 0, 0);         }         let disks: Vec<String> = sh.drives.iter().map(|d| format!("{}: = {}", d.letter, d.path)).collect();-        println!("Rustbelt shell. Type `help` for commands. Drives: {}", disks.join(", "));+        let mut uts = [0u8; 6 * 65];+        let [kernel, _, release, ..] = uname(&mut uts);+        println!("Foundry OS shell (rbsh) on {} {}. Type `help` for commands.", kernel, release);+        println!("Drives: {}", disks.join(", "));     }      while sh.exit.is_none() {
@@ -44,7 +44,7 @@ fn become_shell(dev: &str) -> i64 {     if fd > 2 {         close(fd);     }-    let greeting = "\nRustbelt getty: shell on this terminal (type `exit` to end it)\n";+    let greeting = "\nFoundry OS getty: shell on this terminal (type `exit` to end it)\n";     write(1, greeting.as_bytes());     let mut st = Stat::default();     let (path, argv0) = SHELLS.iter().copied().find(|(p, _)| stat(p, &mut st) == 0).unwrap_or(SHELLS[1]);
@@ -236,7 +236,9 @@ if [ "$code" = 33 ]; then     # drop the '\r's before comparing whole lines.     tr -d '\r' < "$HVC_OUT" > "$HVC_OUT.txt" 2>/dev/null && mv "$HVC_OUT.txt" "$HVC_OUT"     # The shell on hvc0 ran the host's commands and answered over hvc0.-    for line in "Rustbelt getty: shell on this terminal" "Rustbelt $KERNEL_VERSION ($STAGE" \+    # Foundry OS's getty greets differently from the kernel repo's own getty+    # (test-reference passes GETTY_GREETING="Rustbelt getty: ...").+    for line in "${GETTY_GREETING:-Foundry OS getty: shell on this terminal}" "Rustbelt $KERNEL_VERSION ($STAGE" \                 "$ echo hi over hvc0" "hi over hvc0" "fb0" "hvc0"; do         grep -qF -- "$line" "$HVC_OUT" 2>/dev/null || { echo "[run-headless] MISSING on hvc0: $line"; missing=1; }     done