Installer: check free space; README: what the Frame's SteamOS provides

A survey of a Steam Frame (SteamOS 0.4.3, build 20260930) found podman
5.5.2 set up for rootless use (subuid/subgid for steamos, crun, overlay
storage in the home folder) running aarch64 containers natively, plus
every tool the installer uses there (bash, python3, rsync, curl, tar,
bsdtar, unzip, sftp-server; no 7-Zip, which bsdtar covers). It also found
a nearly full home partition, which is what would break a build first.

- The installer checks the work folder has room before starting: about
  20 GB for a first build, 5 once Dawn is built, plus the disc's
  extraction. Short of it, it points at --work-dir on the SD card.
- Before copying the disc to the Frame it checks the destination has room
  for it, pointing at --frame-disc on the card otherwise.
- $USER may be unset (cron, some containers); the message falls back to
  id -un rather than tripping set -u.
- README: building on the Frame is confirmed to work with SteamOS's own
  podman, with the work folder on the SD card when home is short; the
  sizes involved are given where they matter.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019HBRGKTE1GnN2ah8gcZKr3
This commit is contained in:
Claude committed 2026-10-05 08:06:27 +00:00
1 parent 15ee82f59f
commit f867c94fb4
2 files changed
+46 -15

No files matched your search

+28 -3
View File
@@ -160,6 +160,22 @@ fi
[[ "$jobs" =~ ^[1-9][0-9]*$ ]] || fail "--jobs must be a positive number" [[ "$jobs" =~ ^[1-9][0-9]*$ ]] || fail "--jobs must be a positive number"
note "$jobs parallel compiles" note "$jobs parallel compiles"
# Room for the build. A first one (the toolchain, Dawn's source and build, the game's build) takes
# about 20 GB; later ones reuse Dawn. Extracting a disc image takes about 5 GB more, plus the
# archive's size while one is unpacked. Running out halfway is worse than stopping here.
need_gb=20
[[ -f "$work_dir/dawn/package/aurora-dawn.json" ]] && need_gb=5
if [[ -n "$disc" && -f "$disc" && ! -f "$work_dir/disc/sys/main.dol" ]]; then
need_gb=$(( need_gb + 5 + $(du -k "$disc" | cut -f1) / 1024 / 1024 ))
fi
free_gb=$(( $(df -Pk "$work_dir" | awk 'NR == 2 { print $4 }') / 1024 / 1024 ))
if (( free_gb < need_gb )); then
fail "$work_dir has $free_gb GB free; this run needs about $need_gb GB. Free some space, or put
the work folder on a bigger drive with --work-dir (on the Frame, a mounted card such as
--work-dir /run/media/${USER:-$(id -un)}/<card>/wiicompiled-frame)."
fi
note "$free_gb GB free in $work_dir"
# --------------------------------------------------------------------------------------------- # ---------------------------------------------------------------------------------------------
# The source: the tree this script is in, an explicit --source, or a release kept in the work dir. # The source: the tree this script is in, an explicit --source, or a release kept in the work dir.
if [[ -z "$source_dir" && -z "$release" && -n "$script_dir" && -f "$script_dir/../runtime/CMakeLists.txt" ]]; then if [[ -z "$source_dir" && -z "$release" && -n "$script_dir" && -f "$script_dir/../runtime/CMakeLists.txt" ]]; then
@@ -474,11 +490,20 @@ EOF
) )
if [[ "$has_disc" != yes ]]; then if [[ "$has_disc" != yes ]]; then
[[ -n "$disc_dir" ]] || fail "the Frame has no disc at $frame_disc yet: pass --disc" [[ -n "$disc_dir" ]] || fail "the Frame has no disc at $frame_disc yet: pass --disc"
on_frame "$frame_disc_path" <<'EOF' || fail "cannot write $frame_disc on the Frame. SteamOS's system is read-only: # The folder must be writable, and have room for the disc (prints its free space in KB).
pick a folder in the home folder (the default, wiicompiled/disc) or on a mounted card." frame_free_kb=$(on_frame "$frame_disc_path" <<'EOF'
[[ "$1" = /* ]] && d=$1 || d="$HOME/$1" [[ "$1" = /* ]] && d=$1 || d="$HOME/$1"
mkdir -p "$(dirname "$d")" 2>/dev/null && [[ -w "$(dirname "$d")" ]] && rm -rf "$d.partial" mkdir -p "$(dirname "$d")" 2>/dev/null && [[ -w "$(dirname "$d")" ]] && rm -rf "$d.partial" &&
df -Pk "$(dirname "$d")" | awk 'NR == 2 { print $4 }'
EOF EOF
) || fail "cannot write $frame_disc on the Frame. SteamOS's system is read-only: pick a folder in
the home folder (the default, wiicompiled/disc) or on a mounted card."
disc_kb=$(du -sk "$disc_dir" | cut -f1)
if (( frame_free_kb < disc_kb + 1024 * 1024 )); then
fail "the Frame has $(( frame_free_kb / 1024 / 1024 )) GB free where the disc goes and the disc
needs $(( disc_kb / 1024 / 1024 + 1 )) GB. Free some space, or put it on a mounted card with
--frame-disc /run/media/<user>/<card>/wiicompiled-disc."
fi
note "copying the extracted disc to $frame_disc (a few GB)" note "copying the extracted disc to $frame_disc (a few GB)"
copy_to_frame "$disc_dir" "$frame_disc_path.partial" copy_to_frame "$disc_dir" "$frame_disc_path.partial"
on_frame "$frame_disc_path" <<'EOF' on_frame "$frame_disc_path" <<'EOF'
+18 -12
View File
@@ -82,7 +82,8 @@ curl -fsSL https://raw.githubusercontent.com/mitch030504/Wiicompiled_VR_Frame/op
[Frame Control](https://github.com/saphid/frame-control), pass `--frame frame` instead: its SSH [Frame Control](https://github.com/saphid/frame-control), pass `--frame frame` instead: its SSH
key answers to that name. key answers to that name.
- Everything it builds lives in `~/wiicompiled-frame` (`--work-dir` to change that): the toolchain, - Everything it builds lives in `~/wiicompiled-frame` (`--work-dir` to change that): the toolchain,
Dawn, the source, the extracted disc and the build log, `build.log`. Dawn, the source, the extracted disc and the build log, `build.log`. A first build needs about
20 GB there, and the script checks for it before starting.
- It runs as many compiles at once as fit in memory (a quarter of your memory in GB). If the machine - It runs as many compiles at once as fit in memory (a quarter of your memory in GB). If the machine
still freezes, run it again with a lower `--jobs`, such as `--jobs 2`. still freezes, run it again with a lower `--jobs`, such as `--jobs 2`.
- If it stops for any reason, the same command picks up where it left off. - If it stops for any reason, the same command picks up where it left off.
@@ -100,7 +101,7 @@ Everything it puts on the Frame is in your home folder, where it survives SteamO
| Where | What | | Where | What |
| --- | --- | | --- | --- |
| `~/devkit-game/WiiCompiled/` | the game | | `~/devkit-game/WiiCompiled/` | the game |
| `~/wiicompiled/disc/` | your extracted disc (`--frame-disc` puts it elsewhere in your home folder or on a mounted card) | | `~/wiicompiled/disc/` | your extracted disc, about 4.5 GB (`--frame-disc` puts it elsewhere in your home folder or on the SD card, `/run/media/steamos/<card>/...`) |
| `~/.local/share/WiiCompiled/` | `Config.toml`, saves and logs, written by the game itself | | `~/.local/share/WiiCompiled/` | `Config.toml`, saves and logs, written by the game itself |
| Steam's library | the **WiiCompiled** shortcut, made through Valve's devkit tools in `~/devkit-utils` | | Steam's library | the **WiiCompiled** shortcut, made through Valve's devkit tools in `~/devkit-utils` |
@@ -312,21 +313,26 @@ is open.
## Other ways to build ## Other ways to build
**On the Frame itself.** This needs podman, which has to come with SteamOS: its system is read-only, **On the Frame itself.** SteamOS on the Frame (0.4.3, September 2026) comes with podman 5.5, set
and anything installed into it with `pacman` (after switching the read-only mode off) is gone at the up for rootless containers with its storage in the home folder, so the install script runs there
next update, so don't. The script checks and says so if it is missing; then build on a PC as above. natively, with no emulation and nothing installed into the read-only system. Don't add tools to
If it is there, run the script over SSH (`ssh steamos@<frame-ip>`) or in a Desktop Mode terminal: SteamOS with `pacman`: that means switching the read-only mode off, and the next update undoes it.
The script checks for podman and stops with a pointer to building on a PC if an image lacks it.
The first build needs about 20 GB in its work folder, and podman's storage
(`~/.local/share/containers`) grows by about 1.5 GB for the build container. If the home folder is
short of that (the script checks), put the work folder on the SD card, which SteamOS mounts under
`/run/media/<user>/<card>` (on the Frame the user is `steamos`). Over SSH
(`ssh steamos@<frame-ip>`) or in a Desktop Mode terminal:
```bash ```bash
curl -fsSL https://raw.githubusercontent.com/mitch030504/Wiicompiled_VR_Frame/openxr-work/Launcher/steam-frame-install.sh \ curl -fsSL https://raw.githubusercontent.com/mitch030504/Wiicompiled_VR_Frame/openxr-work/Launcher/steam-frame-install.sh \
| bash -s -- --disc "/path/to/Mario Kart Wii.wbfs" --frame local | bash -s -- --disc "/path/to/Mario Kart Wii.wbfs" --frame local --work-dir /run/media/steamos/<card>/wiicompiled-frame
``` ```
It is native ARM64, so no emulation, but the Frame has less memory and cooling than a PC; keep it Leave out `--work-dir` to keep it in `~/wiicompiled-frame`. With 15 GB of memory the Frame runs three
on its charger. Everything stays in your home folder: the container image and its packages in compiles at once; it has less cooling than a PC, so keep it on its charger. The game then reads the
podman's storage (`~/.local/share/containers`), the toolchain, Dawn and the build in disc straight from the work folder's `disc`. By hand, the
`~/wiicompiled-frame` (about 20 GB), and the game reads the disc straight from
`~/wiicompiled-frame/disc`. By hand, the
steps under [Building by hand](#building-by-hand) work the same in a container started without steps under [Building by hand](#building-by-hand) work the same in a container started without
`--platform linux/arm64`, with `nodtool-linux-aarch64` in place of `nodtool-linux-x86_64`. `--platform linux/arm64`, with `nodtool-linux-aarch64` in place of `nodtool-linux-x86_64`.