Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,16 @@ hashes are given where a change is easiest to understand by reading the commit.
- A pattern can name a device slot (`hpc3/c1`, `xio15/pci0/2`, `slot_b`) in
place of its modules, for `log`, `--log`, `[debug] log` and `startup`.

### Keyboard

- `headless` unplugs the keyboard, through a `keyboard` slot and device that
`--list-slots` shows (not on the Origin 200, Origin 2000 and Onyx2, which
have none), so a PROM that finds none can use its serial console. The O2
already did; the others kept their keyboard.
- `headless` no longer drops the Indy's and Indigo2's Newport. Leave graphics
out with a `none` entry at `graphics`; the bench and cpu-test machines and
the snapshot fixtures do.

### Serial ports

- A port's host ends are a `serial` device at it: `backend` is one string or a
Expand Down
7 changes: 4 additions & 3 deletions FEATURES.md
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ the first `[section]`, because TOML tables continue until the next header.
| `nveeprom` | `"nveeprom.bin"` | Indigo2 motherboard EEPROM file. GUI paths are relative to the selected machine folder. |
| `banks` | `[128,128,0,0]` | RAM bank sizes in MB, up to eight entries (two banks on the Fuel, eight on the Tezro and the IP35 brick machines, four elsewhere; entries beyond the profile's bank count must be 0). On the O2 each entry is a DIMM pair's kit (32, 64, 128 or 256), largest first. On the Octane each entry is a pair of DIMMs, 64, 128, 256, 512, 1024 or 2048, filled from bank 0, 8192 in all. See profile constraints below. |
| `scale` | `1` | Standalone window scale: 1–4. GUI uses its separate vm_scale. |
| `headless` | `false` | Suppress the standalone window. Newport is not fitted; O2 uses a serial console. Other graphics boards can remain fitted. Audio is independent. |
| `headless` | `false` | Suppress the standalone window and unplug the keyboard (the `keyboard` slot stays empty), so a PROM that finds none uses its serial console. Hardware is otherwise unchanged: every graphics board stays fitted, and a `none` entry at `graphics` leaves it out. Audio is independent. |
| `no_audio` | `false` | Disable host audio output. The Indy and Indigo2 then have no HAL2; the O2's MACE audio, the Octane's and Onyx2's RAD1 and the Tezro's ICE1724 stay fitted and run silently. |
| `keyboard` | `ansi` | Physical shape of the host keyboard: `ansi` (US, `\|` above Enter), `iso` (European) or `jis` (Japanese 106/109; use it with the PROM's `keybd` set to Japanese). It decides which SGI key the host's ambiguous key left of Enter sends; the guest applies the character layout. `--keyboard` overrides. |
| `gdb_port` | `unset` | Start the GDB TCP stub; debugging is unavailable in lightning builds. |
Expand Down Expand Up @@ -430,6 +430,7 @@ takes; `--device [NAME:]TYPE[@SLOT][,KEY=VALUE]...` adds or replaces one from th
| `hostserial` | a serial port, `serialN`, N the number on the machine's case (`serial1` and `serial2`; the Onyx2's MediaIO adds `serial3` and `serial4`); `at` is required | `path` (required): a host serial port such as `"/dev/ttyUSB0"`. Its rate, framing, DTR, RTS and break follow the guest; its CTS, DCD, DSR and RI are the guest's modem inputs. Linux and macOS. See the serial ports section of [HELP.md](HELP.md). |
| `midi_synth` | a serial port, as `hostserial` | `path` (required): a General MIDI SoundFont (`.sf2`), loaded at start. `gain` (`1.0`, 0 to 16): times the synth's own level, which leaves room for many voices; the host mix clips above full scale. `backend` (the host's default): where it plays, as an `audio` entry's backend (`default`, `pulse`, `wasapi`, `coreaudio`, `null` or `file:PATH`), whatever the machine's own sound does. It plays as a stream of its own (muted by `no_audio`); with a `file:` backend, into a file beside it (`out.wav` → `out-midi.wav`); `IRIS_MIDI_CAPTURE=file.wav` also records it. |
| `midi_raw` | a serial port, as `hostserial` | `path` (required): a host MIDI port. A raw MIDI device (Linux: `"/dev/snd/midiC1D0"` or `"/dev/midi1"`) passes the bytes as they are, both ways; a host serial port with a MIDI interface (`"/dev/ttyUSB0"`) is set up as `hostserial` does. |
| `keyboard` | the `keyboard` slot, on every machine but the Origin 200, Origin 2000 and Onyx2 | The keyboard (PS/2, or USB on the machines whose keyboard is), placed by default. `headless`, or `none` at `keyboard`, leaves the slot empty unless an entry places one. |
| `newport`, `express`, `impact`, `vpro`, `kona` | the graphics slot (alias `graphics`) | A graphics board; see [Graphics boards](#graphics-boards). |
| `none` | any slot; `at` is required | Leaves the slot empty, so the default for it is not placed. A graphics board slot stays free for another board; any other slot stays held. At a serial, Ethernet or sound port it also drops the host end, as a `serial` with no `backend`; an Ethernet port's MAC goes too, and the machine's own is used, and a sound port's chip keeps running with its sound discarded. The Indy and Indigo2 always have their Ethernet. |

Expand Down Expand Up @@ -579,7 +580,7 @@ its environment; the DS1687's RAM goes beside it in `<nvram>.rtc`, the
Octane's 512-byte image, and its clock in `<nvram>.rtc.clock`), `banks`
(the kit in each of the four DIMM pairs: 32, 64,
128 or 256 MB, largest first), `serial_log`,
`headless` (serial console instead of the graphics console and keyboard),
`headless` (no keyboard, so a serial console instead of the graphics console),
`[clock] fixed_mhz` (CP0 Count; the CPU runs at twice it, so 90 MHz is a
180 MHz O2), a `net` device for the Ethernet (`mac`, or a `none` device at `ethernet` for an unplugged
cable), `[[port_forward]]`, `nat_subnet`, `[nfs]` and `[[devices]]`
Expand Down Expand Up @@ -689,7 +690,7 @@ iris-gui does not parse this standalone option set; use its named-machine UI.
| `--rsh-dir` | Let the guest `rsh <gateway> cat\|dd\|ls\|echo\|pwd` against this directory, read-only, through a built-in rsh server at the gateway (TCP 514). Nothing is executed on the host. Off when unset. |
| `--perfetto FILE` | Record a Perfetto trace from startup (`perfetto` builds). `--perfetto-cats LIST` (default `all`) and `--perfetto-clock host\|guest` (default `host`) select what and on which timeline. See [docs/perfetto.md](docs/perfetto.md). |
| `--load-elf` | Load a static ELF32 MSB (big-endian MIPS) binary into RAM before the CPU starts and set PC to its entry point, instead of booting the PROM. For bare-metal test binaries; see also the monitor's `loadelf`. |
| `--ci` | CI mode: enable the control socket and apply speed-favoring fidelity shortcuts. Hides the window unless --ci-display is set; offscreen graphics remain active unless --headless is explicitly set. |
| `--ci` | CI mode: enable the control socket and apply speed-favoring fidelity shortcuts. Hides the window unless --ci-display is set; offscreen graphics remain active. |
| `--ci-socket` | Override the default control-socket path (`iris.sock` in `$TMPDIR`, else `/tmp`; `iris-ci` finds it there only under the same `TMPDIR`). |
| `--ci-display` | With --ci, keep the Newport window visible for interactive test development (deferred rendering at 10–15 fps). |
| `--serial-log` | Write every byte the guest emits on its serial console to this file, as `serial_log`. Useful for live tailing during an install. |
Expand Down
11 changes: 6 additions & 5 deletions HELP.md
Original file line number Diff line number Diff line change
Expand Up @@ -737,8 +737,8 @@ WireGuard) instead of relying on it.

It works with every graphics board through the common display interface, with
the normal window open or under `--ci` with no window. A graphics board must be
fitted and producing frames: a serial-only machine, or an Indy or Indigo2
whose Newport `--headless` removed, has no screen to serve. The window, the
fitted and producing frames: a machine with a `none` entry at `graphics` has no
screen to serve. The window, the
monitor and any number of viewers can type and click at the same time.

**iris-gui** serves the screen too: set **Serve on** in the Performance tab
Expand Down Expand Up @@ -799,7 +799,7 @@ nveeprom = "nveeprom.bin" # 93CS56 NVRAM EEPROM file (Indigo2 only)
banks = [128, 128, 0, 0]

scale = 1 # window scale, kept across guest mode changes; --2x overrides
headless = false # no window; drops Newport, the O2 boots on its serial console (audio unaffected)
headless = false # no window, no keyboard; hardware otherwise unchanged (audio unaffected)
no_audio = false # no sound device output (graphics unaffected)
lock_aspect_ratio = true # false = free resize with letterboxing
vsync = false # true = wait for the host monitor's vertical sync
Expand Down Expand Up @@ -1114,7 +1114,7 @@ Display and audio
--renderer <RENDERER> gl (default) or wgpu (builds with the wgpu feature)
--raster <UNIT> VPro, IMPACT: cpu (default) or wgpu
--keyboard <LAYOUT> Host keyboard: ansi (default), iso or jis
--headless No window; drops Newport (other boards stay fitted), O2 uses serial
--headless No window, no keyboard; hardware otherwise unchanged
--noaudio Disable sound device output (graphics unaffected)

Networking
Expand Down Expand Up @@ -1177,7 +1177,8 @@ iris --config /opt/iris/my_machine.toml
# Headless — no window, suitable for Docker/CI (audio still active)
iris --headless

# Headless with audio also disabled (lightest possible server mode)
# Headless with audio also disabled (the graphics board is still fitted;
# for a machine with none, add `--device none@graphics`)
iris --headless --noaudio

# Network-boot from the PROM: then `boot -f bootp()/unix` at the PROM monitor
Expand Down
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -264,8 +264,7 @@ is incomplete; that guide states the limits.
### CI control socket and `iris-ci`

Use [STORAGE.md](STORAGE.md#ci-control-socket-and-iris-ci) for Unix/TCP setup,
commands, serial capture, and scripts. `--ci` keeps offscreen graphics alive
unless `--headless` is explicitly selected.
commands, serial capture, and scripts. `--ci` keeps offscreen graphics alive.

### Scratch volume — file injection without networking

Expand Down
5 changes: 2 additions & 3 deletions STORAGE.md
Original file line number Diff line number Diff line change
Expand Up @@ -294,9 +294,8 @@ directory (`$TMPDIR`, else `/tmp`); on Windows it is TCP `127.0.0.1:19851`.
default only when they run with the same `TMPDIR`; otherwise give both the
path, `--ci-socket` to iris and `--socket` or `$IRIS_SOCKET` to iris-ci.
`--ci` hides the host window unless you add `--ci-display`, while keeping
offscreen graphics alive for screenshots. Explicit `--headless`
disables Newport graphics. Use `--serial-log FILE` to keep a transcript of the
IRIX console.
offscreen graphics alive for screenshots. Use `--serial-log FILE` to keep a
transcript of the IRIX console.

```
cargo run --release --features lightning -- --ci
Expand Down
5 changes: 4 additions & 1 deletion bench/run/bare.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,13 @@
# it always is here.

banks = [128, 128, 0, 0]
headless = true
no_audio = true

[machine]
profile = "indy_ip24"

[[devices]]
type = "none"
at = "graphics"

[scsi]
2 changes: 1 addition & 1 deletion bench/run/run-local.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ timeout "$TIMEOUT" "$IRIS" \
--config run/bare.toml \
--load-elf "$ELF" \
--test-device \
--headless --noaudio \
--noaudio \
"$@" 2>&1 | tee "$LOG"
rc=${PIPESTATUS[0]}

Expand Down
7 changes: 5 additions & 2 deletions bench/run/run-prom.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,15 @@ cat > build/prom.toml <<'TOML'
# The image goes on SCSI ID 2 so nothing mistakes it for a system disk and so
# `boot -f dksc(0,2,8)irisbench` reads naturally.
banks = [128, 128, 0, 0]
headless = true
no_audio = true

[machine]
profile = "indy_ip24"

[[devices]]
type = "none"
at = "graphics"

[scsi]

[scsi.2]
Expand All @@ -44,7 +47,7 @@ TOML

rm -f "$SOCK" "$LOG"
"$IRIS" --config build/prom.toml --ci --ci-socket "$SOCK" \
--test-device --headless --noaudio --serial-log "$LOG" --serial-log-overwrite \
--test-device --noaudio --serial-log "$LOG" --serial-log-overwrite \
> build/prom-stdout.log 2>&1 &
IRIS_PID=$!
trap 'kill $IRIS_PID 2>/dev/null' EXIT
Expand Down
4 changes: 2 additions & 2 deletions clanker/irix/irix-install.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@ into normal operation. Two ready-to-edit templates live at the repo
root: `iris-irix53.toml` for 5.3, `iris-irix65.toml` for 6.5.22.
Launch with `--config <file> --ci --ci-display`.

> ⚠️ **`headless = false` is mandatory for the install — both
> versions.** With `headless = true`, iris doesn't map REX3 and
> ⚠️ **The install needs a Newport — both versions.** With
> a `none` entry at `graphics` (once, `headless = true`), iris doesn't map REX3 and
> miniroot's hinv records `GFXBOARD=SERVER`. Inst then applies its
> `RGFXBOARD!=SERVER` tag filters and strips every Newport-specific
> file — `Xsgi`, `gfxinit`, `/hw/gfx` autoconfig, board-specific
Expand Down
5 changes: 4 additions & 1 deletion cpu-tests/run/bare.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,15 @@
# well under 8 MB, so this is far more than it needs.

banks = [128, 128, 0, 0]
headless = true
no_audio = true

[machine]
profile = "indy_ip24"

[[devices]]
type = "none"
at = "graphics"

# No SCSI at all. The `scsi` key must be present-but-empty: when it is
# missing entirely, serde falls back to default_scsi(), which attaches
# scsi1.raw and cdrom4.iso and makes startup fatal if they are absent.
Expand Down
5 changes: 4 additions & 1 deletion cpu-tests/run/boot.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,15 @@
# reads naturally.

banks = [128, 128, 0, 0]
headless = true
no_audio = true

[machine]
profile = "indy_ip24"

[[devices]]
type = "none"
at = "graphics"

[scsi]

[scsi.2]
Expand Down
6 changes: 3 additions & 3 deletions cpu-tests/run/run-local.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@ DUMP="${DUMP:-build/dump.json}"
mkdir -p "$(dirname "$LOG")"
rm -f "$LOG" "$DUMP"

# --headless: no window. --noaudio: no cpal device in CI.
# --noaudio: no cpal device in CI. The bare machine has no graphics board, so no window.
# --test-device: PUTC/DUMP/EXIT, and the exit code we propagate.
# --config run/bare.toml: a bare-metal binary touches no disk, and bare.toml's
# present-but-empty [scsi] keeps SCSI out. Without it the default config
# attaches scsi1.raw and startup is fatal when that file is absent, which is
# always — nothing in this suite creates one.
#
# The log is a tee of stdout, not --serial-log: headless IRIS already writes
# The log is a tee of stdout, not --serial-log: IRIS already writes
# the guest's console to its own stdout, and --serial-log tees the channel-B
# *backend*, which in non-CI mode is the TCP listener nothing is attached to —
# so it produced an empty file and the diagnostics below had nothing to show.
Expand All @@ -39,7 +39,7 @@ timeout "$TIMEOUT" "$IRIS" \
--config run/bare.toml \
--load-elf "$ELF" \
--test-device --test-device-dump "$DUMP" \
--headless --noaudio \
--noaudio \
"$@" 2>&1 | tee "$LOG"
rc=${PIPESTATUS[0]}

Expand Down
2 changes: 1 addition & 1 deletion cpu-tests/run/run-prom.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ LOG="build/prom.log"

rm -f "$SOCK" "$LOG"
"$IRIS" --config run/boot.toml --ci --ci-socket "$SOCK" \
--test-device --headless --noaudio --serial-log "$LOG" \
--test-device --noaudio --serial-log "$LOG" \
> build/prom-stdout.log 2>&1 &
IRIS_PID=$!
trap 'kill $IRIS_PID 2>/dev/null' EXIT
Expand Down
16 changes: 12 additions & 4 deletions docs/octane-ip30.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ only it has. (`[machine] flash` is the older spelling, still read.)
# prom = "IP30prom.bin" # optional: overrides the built-in 4.17 PROM
nvram = "nvram.bin" # the DS1685 clock's NVRAM: the PROM's settings
banks = [128] # MB in each HEART bank
headless = true # no window; console=d in the NVRAM for a serial console
headless = true # no window, no keyboard
serial_log = "serial.log"
nat_subnet = "192.0.2.0/24"

Expand All @@ -48,6 +48,9 @@ flash = "flash-ip30.bin" # keep the PROM's flash records between runs

# The graphics board is a device entry: type = "impact" (default model "solid"; "high", "max"),
# type = "vpro" (model "v6", "v8", "v10" or "v12"), or type = "none" at = "graphics".
[[devices]] # headless: no board
type = "none"
at = "graphics"

[[port_forward]]
proto = "tcp"
Expand Down Expand Up @@ -149,9 +152,14 @@ The console is IOC3's first serial port, `serial1`, on TCP 127.0.0.1 (8880
unless a `serial` device says otherwise), and `serial_log` copies what it sends to a file, adding to
an existing log unless `serial_log_overwrite` is set; the second port is
`serial2`. The PROM's `console` variable picks between the
serial and graphics consoles; `headless` only removes the window.

A PS/2 keyboard and mouse are always plugged into IOC3's two PS/2 ports;
serial and graphics consoles; `headless` removes the window and unplugs the
keyboard. With no keyboard the Octane PROM sends its console to serial itself.
A power-on with blank NVRAM stops at "Diagnostics failed. [Press any key to
continue.]" until one key arrives on `serial1`. Whether real hardware stops there
too is unknown.

A PS/2 keyboard and mouse are plugged into IOC3's two PS/2 ports (the keyboard
is left out under `headless`);
the iris window (or iris-gui) and the monitor's `ps2` commands type and
move them. The PROM and IRIX run the keyboard in scan code set 3. How the
controller works and what each driver does with it is in
Expand Down
2 changes: 1 addition & 1 deletion iris-gui/core/src/controller/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1608,7 +1608,7 @@ mod tests {
let mut cfg = MachineConfig::default();
cfg.banks = iris::config::banks_from4([8, 8, 0, 0]);
crate::model::hardware::clear_disks(&mut cfg);
cfg.headless = true;
cfg.set_graphics(None);
cfg.monitor_port = Some(0);
prefs.save_machine("indy", &mut cfg).unwrap();
prefs.active_machine = Some("indy".into());
Expand Down
4 changes: 1 addition & 3 deletions iris-gui/core/src/controller/overview.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,7 @@ impl AppController {
HardwareRow {
icon: Icon::DisplayScale,
label: t!("ov-graphics"),
value: if cfg.headless {
t!("ov-headless")
} else if cfg.machine.profile == iris::config::MachineProfile::O2Ip32 {
value: if cfg.machine.profile == iris::config::MachineProfile::O2Ip32 {
// The O2's display is built in; the board key does not apply.
t!("extra-gbe")
} else {
Expand Down
22 changes: 20 additions & 2 deletions iris-gui/core/src/controller/serial.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,28 @@ impl SerialConsoleController {
}
}

/// A new machine started: an open console reconnects to its listener.
/// A new machine started: an open console reconnects to its listener. A headless machine has
/// no keyboard and no display, so its console opens.
pub(crate) fn reconnect(&mut self, cfg: &iris::config::MachineConfig, notify: Arc<dyn Notify>) {
if self.console.is_some() {
if self.console.is_some() || cfg.headless {
self.console = console_port(cfg).map(|port| SerialConsole::connect(port, notify));
}
}
}

#[cfg(test)]
mod tests {
use super::*;
use crate::model::job::NoWake;

#[test]
fn a_headless_machine_opens_the_serial_console_when_it_starts() {
let mut cfg = iris::config::MachineConfig::default();
let mut console = SerialConsoleController::default();
console.reconnect(&cfg, Arc::new(NoWake));
assert!(!console.is_open());
cfg.headless = true;
console.reconnect(&cfg, Arc::new(NoWake));
assert!(console.is_open());
}
}
2 changes: 1 addition & 1 deletion iris-gui/core/src/controller/settings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -605,7 +605,7 @@ impl SettingsController {
enabled: if boards.len() < 2 { Enabled::No(t!("settings-one-board")) } else { at_power_on() },
});
}
let newport = hardware::mc_machine(p) && board == Some(GraphicsBoard::Newport) && !cfg.headless;
let newport = hardware::mc_machine(p) && board == Some(GraphicsBoard::Newport);
if newport {
f.push(Field {
id: field::RESOLUTION,
Expand Down
2 changes: 1 addition & 1 deletion iris-gui/core/src/model/machines.rs
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ pub fn visit_paths(cfg: &mut MachineConfig, mut visit: impl FnMut(&mut String))
a.backend = format!("file:{path}");
}
}
DeviceModel::Net(_) | DeviceModel::Camera(_) | DeviceModel::XioBoard(_) | DeviceModel::PciBridge | DeviceModel::Ice1724 | DeviceModel::Qla2200 | DeviceModel::Ultra64 | DeviceModel::Empty => {}
DeviceModel::Net(_) | DeviceModel::Camera(_) | DeviceModel::XioBoard(_) | DeviceModel::PciBridge | DeviceModel::Ice1724 | DeviceModel::Qla2200 | DeviceModel::Ultra64 | DeviceModel::Empty | DeviceModel::Keyboard => {}
}
}
if let Some(nfs) = &mut cfg.nfs {
Expand Down
1 change: 0 additions & 1 deletion iris-gui/locales/en/overview.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ ov-spec = { $model } ({ $board })
ov-processor = Processor
ov-memory = Memory
ov-graphics = Graphics
ov-headless = None (serial console)
ov-prom = PROM
ov-prom-builtin = Built-in PROM
ov-scsi = SCSI { $id }
Expand Down
Loading