Skip to content

iris-ci: runtime cdrom-load + sh-compatible get/put#29

Merged
techomancer merged 2 commits into
techomancer:mainfrom
hanshuebner:pr/iris-ci-getput-cdrom
May 31, 2026
Merged

iris-ci: runtime cdrom-load + sh-compatible get/put#29
techomancer merged 2 commits into
techomancer:mainfrom
hanshuebner:pr/iris-ci-getput-cdrom

Conversation

@hanshuebner
Copy link
Copy Markdown
Contributor

Two independent iris-ci automation improvements:

  • cdrom-load — swap an arbitrary CD image into a SCSI CD-ROM at runtime (ci.rs, iris_ci_main.rs, scsi.rs, wd33c93a.rs), so install/automation scripts can cycle discs without restarting iris.
  • get/put under /bin/shiris-ci get/put hardcoded csh redirect syntax (>& /dev/null) and the $status rc-marker. On a guest whose root shell is /bin/sh the redirect errors ("bad file unit number") and the rc-marker comes back empty, breaking get/put (and making every iris-ci run report a bogus exit code). Detect the guest shell via $0 and pick the matching redirect (2>&1 vs >&) + rc-marker ($? vs $status); works for both sh- and csh-root guests.

🤖 Generated with Claude Code

hanshuebner and others added 2 commits May 31, 2026 14:59
cdrom-eject only cycles through the configured changer list. Add
`iris-ci cdrom-load <id> <path>` to load an arbitrary host ISO into a
SCSI CD-ROM and make it the active disc immediately (medium change /
unit attention so mediad remounts), as if hand-swapping the disc.

ScsiDevice::load_disc opens the path as a Direct (raw ISO) backend —
matching eject_next — inserts it at the front of the changer list, and
signals unit_attention. Wired through Wd33c93a::load_disc, the ci.rs
"cdrom-load" dispatch/handler, and the iris-ci CdromLoad subcommand.

Lets you install extra media (e.g. the dev/compiler discs) onto a
running, booted IRIX without halting and rewriting the changer config.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
cmd_get/cmd_put hardcoded csh redirect syntax (>& /dev/null) and the $status
rc-marker. When the guest's root login shell is /bin/sh (the klindert 6.5
disk), the csh redirect errors with "bad file unit number" and the rc-marker
comes back empty — which broke `iris-ci get`/`put` entirely and is also why
every `iris-ci run` reported "guest exit -1".

Add detect_guest_shell() (probes $0, which both shells expand, with a sentinel
so it doesn't itself depend on the rc-marker) and devnull_redirect(); get/put
now select the matching redirect (2>&1 vs >&) and rc-marker ($? vs $status).
Works for both sh-root (6.5 klindert) and csh-root (classic 5.3) guests, so the
fast scratch-volume file pull works again (~1.8s for a 294 KB frame).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@techomancer techomancer merged commit e2bd1ac into techomancer:main May 31, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants