Automation & AI
From a 1998 source dump to a clean-room Rust IRIX
The 6.5.7m kernel rebuilt from its source dump, the binary-only drivers relinked, and a Ghidra fork taught to read MIPSpro binaries.
Problem
The IRIX 6.5.7m customer source release cannot build a complete system on its own. It ships stubs for the graphics and audio subsystems, which SGI supplied as binaries only. No current compiler targets IRIX either: GCC removed the target in version 4.7, and MIPSpro is binary-only and runs only on IRIX. The binaries are the only documentation for the hardware they drive.
Diagnosis
- The install media still ships the real drivers unstripped, with symbols, inside
.swimages that come with checksummed manifests. Where the 6.5.7m overlay re-ships a module, that revision is the canonical one. - Stock Ghidra dies on every MIPSpro object with the same
EOFException: SGI's DWARF dialect omits the end-of-table marker and concatenates per-unit blocks. - N32 objects imported as 32-bit MIPS truncate: 71 of 101 functions in one archive, with a 1,548-byte function looking like a 28-byte stub.
- binutils 2.47 regresses three ways: it no longer creates
.rld_map, it emits aDT_MIPS_RLD_MAP_RELentry the IRIX loader has never seen, and it floors the capturedcrt1.o.initalignment of 27 to 1.
Action
- Assembled MIPSpro 7.3 by hand on an emulated Indy, then fixed three bootstrap bugs before the kernel would link: a stale 0-byte spec, an
lbootfrom the wrong vintage, and one missing defs line. - Extracted the binary-only modules from the install media's
.swimages, verified them against the manifests, and relinked the kernel with the real drivers. - Patched a Ghidra 12.1.2 fork: DWARF abbreviation parsing, function bodies from DWARF ranges, ECOFF stabs, MIPS small-common symbols, and inline dispatch tables.
- Carried a GCC 16.2 and binutils 2.47 patch series so the tree builds from a Linux host.
Outcome
unix.kdebug: 9,833,128 bytes, ELF32 big-endian N32, and it booted first try.- The relinked kernel grew from 9.8 to 10.4 MB and reports
Graphics board: Indy 24-bit; Xsgi starts on it. - Hand-written assembly bodies matching their DWARF ranges went from 285 of 366 to 366 of 366.
- The 6.5.22 kernel imports as 10,188 functions, all named, with 12,763 types; libGLcore decompiles with zero unnamed
FUN_stubs. - The GCC cross builds o32 and n32 objects, libc and libm rebuild from the tree, and a static hello runs on the guest.
What I'd do differently
Long commands go in a script file now, never down a serial console; a mangled rm -rf once deleted /etc and fifteen /var directories.
Next is the 6.5.22 fold: decompile those binaries and bring the differences back into the tree. Then the Rust port, which stays clean-room by design. Source to AST to Rust, verified against behaviour, so no SGI code travels into the result and the finished OS can ship under its own licence.
0
Open a window and its geometry shows up here.
No events yet.
The desk blanks itself after a quiet spell, then runs one of thirteen effects named after the IRIX screen savers. Move the pointer or press a key to wake it; lock it and only Unlock brings it back.
Settings load with the desktop.
The environment
About this desktop
jupiter.au is set up as a working desktop: the Toolchest, the objects, the status strip and the windows stay with you on every page. Drag a title bar to move a window, pull any edge or corner to resize it, drag it to the side of the desk to snap it into place, and right-click a title bar for that window's menu. Right-click the desk itself for the root menu.
Toolchest
The panel in the corner carries the classic seven menus — Desktop, Find, People, Applications, Shared Resources, System and Help — above the command field. Collapse it to the chip with the arrow in its title strip, or press Ctrl+K to bring it back.
Desks
Four desks, as 4Dwm kept them. Each surface belongs to the desk it was opened on — switch with the status strip, the Toolchest, or Ctrl+Alt+1…4. The Desks Overview window maps all four at once.
The catalogue
The Icon Catalogue lists every application the desk knows — click to select, double-click to open, right-click for the icon's own menu. The objects on the right edge can be dragged into a new order, and the one that will take the drop turns royal blue.
Customise
Desktop → Customise… holds the background (signal wash, flat or dim), the bevels (flat 2026 or the classic two-line), and the way to the Screen Saver. Choices stick to this machine.
Screen saver
Thirteen effects named after the IRIX screen savers, with a timeout, a Random mode and an optional lock. Open the Screen Saver window to change them.
Desks
Four desks, as 4Dwm kept them. Each surface belongs to the desk it was opened on — switch with the status strip, the Toolchest, or Ctrl+Alt+1…4.
Winterm
Type help for the commands — ls, open,theme, date.
Loading the desks…
12 icons shown; sorted by Name
No audio hardware on this host.
Background
Bevels
Screen saver
The timeout, the effect and the lock live in the Screen Saver window.
