foundry
Foundry OS: the operating system built on the Rustbelt kernel
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 | # 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.
| |
|
|
|
|
# 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.
# 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).
|
# 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.
# 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).
# 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".
# 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.
# ---- Foundry OS ----
# Foundry OS's own programs (milestone M2): C on musl, built by
# toolchain/foundry-cc as static-PIEs. hello-musl prints one line; fprobe
# checks the C library's view of the kernel (files, processes, signals,
# threads, mmap, clocks, timerfd) and prints a summary line at the end.
# dash (ports/dash), a POSIX sh built the same way, runs a script of checks.
# It is /bin/dash, not /bin/sh: the kernel starts /bin/sh, which is rbsh.
# ---- end Foundry OS ----
|