Skip to content
Merged
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
12 changes: 6 additions & 6 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# AGENTS.md

**phoenix** is the PICO 4's headset module for [overpressure](https://github.com/overpressure/overpressure): Linux
**phoenix** is the PICO 4 plugin for [overpressure](https://github.com/overpressure/overpressure): Linux
and a SteamOS-compatible system on the original PICO 4 (2022, Snapdragon XR2), on Valve's Steam Frame kernel
(pinned by `kernel.json` from [overpressure/linux](https://github.com/overpressure/linux)) and Valve's Mesa;
overpressure's recovery in `recovery` runs on it too. The headset builds its own system. This repository is cloned
into `devices/phoenix/` of an overpressure checkout: paths are relative to it, commands run from the overpressure
checkout's root. Its tooling and tests import overpressure only through `overpressure.api.v2`, never its window or
command line. Status: the [README](README.md); open work: the GitHub issues; the project's rules for issues,
documents, code and changes: [conventions](https://github.com/overpressure/overpressure/blob/main/docs/develop/conventions.md).
checkout's root. Its tooling and tests import overpressure only through `overpressure.api.v2` (the plugin API),
never its window or command line. Status: the [README](README.md); open work: the GitHub issues; the project's
rules for issues, documents, code and changes: [conventions](https://github.com/overpressure/overpressure/blob/main/docs/develop/conventions.md).

## Setup and commands

Expand All @@ -34,7 +34,7 @@ integration test; overpressure's `tests/qemu/` covers only the recovery: run it

## Layout

`tooling/` the host tooling (`HEADSET` in `__init__.py`), `initramfs/` the PICO 4's part of overpressure's
`tooling/` the host tooling (`HEADSET` in `__init__.py`), `initramfs/` this plugin's part of overpressure's
recovery, `kernel.json` and `boot.json` the kernel's pin and the boot image's recipe, `userspace/` the system image
(`packages.json` pins [overpressure/packages](https://github.com/overpressure/packages), where the packages live),
`src/` C sources, `tests/` host tests, `docs/` ([use](docs/use/README.md), [internals](docs/internals/README.md),
Expand Down Expand Up @@ -75,6 +75,6 @@ recovery, `kernel.json` and `boot.json` the kernel's pin and the boot image's re
A branch and a pull request against `main`, titled as a conventional commit; merged by rebase or squash once `ci`
passes and the code owners approved
([conventions](https://github.com/overpressure/overpressure/blob/main/docs/develop/conventions.md#changes)). A
change overpressure's generic code needs lands there first, keeping the headset interface (`api` in
change overpressure's generic code needs lands there first, keeping the plugin API (`api` in
`headset.json`) backwards compatible; CI runs this repository against overpressure's `main`. A package change goes
to overpressure/packages, then a new tag there and the pin here. Releasing: [releasing.md](docs/develop/releasing.md).
2 changes: 1 addition & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Documents

The PICO 4's documents, in four parts by who reads them. What works and what you need: the
The PICO 4 plugin's documents, in four parts by who reads them. What works and what you need: the
[README](../README.md).

| Part | For | Contents |
Expand Down
18 changes: 9 additions & 9 deletions docs/develop/development.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Development

**TL;DR.** This repository is the PICO 4's part of overpressure, cloned into `devices/phoenix/` of an overpressure
**TL;DR.** This repository is the PICO 4 plugin of overpressure, cloned into `devices/phoenix/` of an overpressure
checkout. The headset stays in development mode, and a change reaches it with `dev recovery`, `dev install` (the
headset builds its system) and `dev check`. The host tests run in seconds without hardware. This page covers the
layout, the build host, the loop from a change to the headset and the Windows host; building:
Expand All @@ -25,11 +25,11 @@ git clone https://github.com/overpressure/phoenix devices/phoenix # never repl
## Repository layout

```text
headset.json codename, name, version, the overpressure headset interface (api); commit and date in a release
headset.json codename, name, version, the overpressure plugin API (api); commit and date in a release
env.example its keys in overpressure's .env (PICO4_), added to a new .env
overpressure.json the overpressure release (tag, commit) a release's signed update is made with
device.mk its targets of overpressure's Makefile (make DEVICE=phoenix ...): image, userspace, qemu-recovery
tooling/ the PICO 4's host tooling (Python): overpressure build|inspect|match|assets|stock-files|
tooling/ the plugin's host tooling (Python): overpressure build|inspect|match|assets|stock-files|
bootchain|device|hwtest|dev|cycle|kernel|rescue
__init__.py HEADSET, the index: its commands, the window's steps, the installer's workflows and questions,
its backup
Expand Down Expand Up @@ -75,15 +75,15 @@ userspace/ stage 2: the SteamOS-compatible userspace
stock-links.txt the image's links to PICO OS's files on the data partition and its partitions
flavours/steamos.sh SteamOS's part of the build: SteamVR's controller remapping, Steam Link's layer
boot.json the installed system's boot image's recipe (its command line words, the stock words dropped, the
ABL's limit), which boot_images.py and the headset's own update read alike
ABL's limit), which boot_images.py and the system's own update read alike
kernel.json the pinned release of overpressure/linux (tag, commit, build image, file hashes) and, under
build, what overpressure's build/build-kernel.sh builds it with (device tree, config fragment,
host name)
src/ C sources outside the packages: reboot/ (pico4-reboot), splash/ (pico4-splash)
prebuilt/ static aarch64 pico4-reboot and pico4-splash, so the recovery builds without a compiler
scripts/ c-tests.sh (the C tests of src/), preflight-hook.sh (the PICO 4's part of overpressure's
scripts/ c-tests.sh (the C tests of src/), preflight-hook.sh (this plugin's part of overpressure's
preflight under PICO OS)
userspace/build.sh this headset's part of the userspace build: its prefix, masks and adaptation hooks;
userspace/build.sh this plugin's part of the userspace build: its prefix, masks and adaptation hooks;
build-on-headset-hook.sh its part of the build on the headset (the fan). The builds themselves
are overpressure's build/ scripts, run with this folder
.github/ CI (against overpressure's main), the release, the weekly upgrade check
Expand All @@ -98,8 +98,8 @@ runtime's ([runtime.md](https://github.com/overpressure/overpressure/blob/main/d
`pico4-slamd`, which runs PICO OS's head tracker, is a package of overpressure/packages. The builds (the headset's
own, `kernel build`, the weekly `upgrade-check.sh`) are overpressure's `build/` scripts run with this folder.

What every headset shares is overpressure's, and this repository's tooling and tests reach it only through its
headset interface, never its window or command line, `overpressure.api.v2` ([the interface](https://github.com/overpressure/overpressure/blob/main/docs/develop/adding-a-headset.md#the-headset-interface)): `.env` settings, the doctor, the recovery
What every plugin shares is overpressure's, and this repository's tooling and tests reach it only through its
plugin API, never its window or command line, `overpressure.api.v2` ([its rules](https://github.com/overpressure/overpressure/blob/main/docs/develop/adding-a-headset.md#the-plugin-api)): `.env` settings, the doctor, the recovery
builder, OTA handling, adb and fastboot, Qualcomm EDL, verified backups and their words in the window, the
installer's stages and asks, processes and waits, SSH, recorded runs, the read-only storage policy, the
formats (with the ext4 and FAT readers) and the Windows USB link. So is the executor this repository describes
Expand Down Expand Up @@ -223,5 +223,5 @@ for Monado code); external sources pinned by commit or hash, patches as `.patch`
with regenerated `sha256sums`; the project's own sources in `src/`, `SKIP` in the recipes; documents state facts;
conventional commits. Issues go to this repository's GitHub issues, with the fields and stages
[the conventions](https://github.com/overpressure/overpressure/blob/main/docs/develop/conventions.md#issues) give;
the PICO 4's status in [README.md](../../README.md) is kept current. Coding agents start at
the plugin's status in [README.md](../../README.md) is kept current. Coding agents start at
[AGENTS.md](../../AGENTS.md) (`CLAUDE.md` is a link to it): this repository's commands and hard rules in short.
10 changes: 5 additions & 5 deletions docs/develop/releasing.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Releasing

**TL;DR.** A pushed, annotated tag that is `headset.json`'s calendar version (`2026.12.0`, a beta `2026.12.0b0`)
makes the release overpressure downloads (`overpressure headset add phoenix`, the app's *+*): the
makes the plugin release overpressure downloads (`overpressure headset add phoenix`, the app's *+*): the
source zip and its SHA-256, nothing uploaded by hand. Its image is checked against the
[release checklist](#release-checklist) first. overpressure's own release is
[overpressure's releasing page](https://github.com/overpressure/overpressure/blob/main/docs/develop/releasing.md).
Expand All @@ -16,8 +16,8 @@ coming release with `bN` from `b0`, and `main` between releases the next one as
(`2026.12.0.dev202612031154`). The tag is the version itself, the same as `version` in
[headset.json](../../headset.json). The releases before the switch (`v1.0-beta` to `v1.0-beta.5`) keep their tags and sort
before every calendar version. A beta is a pre-release: `headset add phoenix` takes it while there is no stable
release, later only with `--channel beta` or `--version`. `api` in `headset.json` names the overpressure headset
interface the release needs (`MAJOR.MINOR`): every overpressure that runs it installs the release, also later ones,
release, later only with `--channel beta` or `--version`. `api` in `headset.json` names the plugin API the release
needs (`MAJOR.MINOR`): every overpressure that runs it installs the release, also later ones,
so a release that needs a new minor or major comes after the overpressure release that brings it, and its notes name
that release. The image reports this version and commit, overpressure's version, the kernel's tag and the packages'
release in `/usr/share/pico4/version`; a release build's commit carries no `-dirty`.
Expand All @@ -37,8 +37,8 @@ release in `/usr/share/pico4/version`; a release build's commit carries no `-dir
same image root and file system ([userspace.md](../internals/userspace.md#reproducible-builds)). Run the
[checklist](#release-checklist) on that image.
4. **The tag.** An annotated tag on that commit of `main`, named exactly as the version: its first line the
release's title, the rest the release's own words, the checklist's results and what is known not to work. Then
push it.
release's title (`PICO 4 plugin 2026.12.0 beta 1`), the rest the release's own words, the checklist's results
and what is known not to work. Then push it.

```sh
git tag -a 2026.12.0b0 -F tag-message.md
Expand Down
12 changes: 6 additions & 6 deletions docs/develop/tests.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
# Tests

**TL;DR.** Host tests check the PICO 4's own code against fakes in seconds, with no hardware; formatting, lint,
**TL;DR.** Host tests check the plugin's own code against fakes in seconds, with no hardware; formatting, lint,
types, C tests, shellcheck, links and private data run beside them, all in CI. The integration test is the installed
system on the headset (`dev install`, `dev check`, [hardware-testing.md](hardware-testing.md)).

## Levels

| Level | Command | Takes |
| --- | --- | --- |
| Host tests: the PICO 4's protocols, validators, plans, hooks and words against fakes (overpressure's own tests cover the executor they run on) | `uv run python -m unittest discover -t . -s devices/phoenix/tests` (`uv run python -m unittest`: with the generic tests) | seconds |
| Formatting, lint and types (CI runs them; `make lint` runs them here and in every headset in `devices/`) | `uv run ruff format --check devices/phoenix`, `uv run ruff check devices/phoenix`, `uv run ty check devices/phoenix` | seconds |
| Host tests: the plugin's protocols, validators, plans, hooks and words against fakes (overpressure's own tests cover the executor they run on) | `uv run python -m unittest discover -t . -s devices/phoenix/tests` (`uv run python -m unittest`: with the generic tests) | seconds |
| Formatting, lint and types (CI runs them; `make lint` runs them here and in every plugin in `devices/`) | `uv run ruff format --check devices/phoenix`, `uv run ruff check devices/phoenix`, `uv run ty check devices/phoenix` | seconds |
| The host tests and every shell test above | `make test` (on Linux) | seconds |
| The same on any host, in the build container, as root | `overpressure container run -- make test` (`make container-test`) | as `make test`, once the image is built |
| C tests of this repository's own sources (CI runs them) | `bash devices/phoenix/scripts/c-tests.sh` (a C compiler) | seconds |
Expand All @@ -18,14 +18,14 @@ system on the headset (`dev install`, `dev check`, [hardware-testing.md](hardwar
| On the headset: the integration test | `overpressure dev install` and `dev check`, on the installed system | minutes; [hardware-testing.md](hardware-testing.md) |
| Optional, only when asked: the recovery on a QEMU test kernel (from overpressure's `tests/qemu/build-test-kernel.sh`); it covers only the recovery, the headset the rest | `tests/qemu/run-selftest.sh` (`make qemu-recovery`) | about 3 min |

CI ([ci.yml](../../.github/workflows/ci.yml)) runs overpressure's checks of a headset repository
CI ([ci.yml](../../.github/workflows/ci.yml)) runs overpressure's checks of a plugin repository
([headset-ci.yml](https://github.com/overpressure/overpressure/blob/main/.github/workflows/headset-ci.yml)), with the
pinned kernel release and its contracts: it also loads the headset as overpressure's own CI does
pinned kernel release and its contracts: it also loads the plugin as overpressure's own CI does
(`overpressure devices`), parses the PowerShell scripts on Windows and checks the workflows with a
pinned actionlint. Its job `ci` is the one required check: it passes when every check passed, or was
skipped because the same tree passed before against the same tree of overpressure's `main`.

New behaviour gets host tests with fakes for hardware and golden data for protocols, in the repository whose code it
is: a test of overpressure's code (its roles, recovery client, adb and EDL steps, command lines, runner, look)
goes to overpressure's tests, on generic fakes; this repository's check the PICO 4's own. The packages' tests (the
goes to overpressure's tests, on generic fakes; this repository's check the plugin's own. The packages' tests (the
driver's C protocol tests, the controller tracker's C++ tests) run inside their builds in overpressure/packages.
4 changes: 2 additions & 2 deletions docs/internals/installer.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# The installer

**TL;DR.** The PICO 4's installer is a set of plans that overpressure's engine runs: *Install* takes a headset
**TL;DR.** The PICO 4 plugin's installer is a set of plans that overpressure's engine runs: *Install* takes a headset
from PICO OS to the installed system in four stages (check this computer, connect the headset, prepare it: backup,
engineering bootloader, unlock, overpressure's recovery; install: the headset builds and starts its system),
*Upgrade* builds and installs a newer system over it and keeps the data, *Check the headset* runs the acceptance
Expand Down Expand Up @@ -61,7 +61,7 @@ off* and *Start over from…* a stage (starting over at Prepare your headset or
writes). A stop (*Stop*, closing the window, Ctrl-C) ends any wait at once, such as the up to ten minutes
Connect your headset waits for USB; a task that writes (`dev stage-abl`, the unlock, `dev flash`, `dev install`,
the Wi-Fi profile) finishes its write first. A headset in overpressure's recovery from this computer was found, backed up,
unlocked and flashed already: an install whose progress is gone (another release of this tooling starts it over)
unlocked and flashed already: an install whose progress is gone (another plugin release starts it over)
skips Connect your headset and Prepare your headset and goes on with the install, without asking to connect it.

## The install
Expand Down
8 changes: 4 additions & 4 deletions docs/internals/userspace.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,9 @@ only refreshes pacman's keys). What moves lives in the data partition:
| SteamVR, Mesa, PipeWire, systemd, the kernel, every other package | the system image (`/opt/steamvr` is the runtime `openvrpaths.vrpath` names) | only with a new image |

Holding the client at a tested version is open: whether an older client keeps working against Steam's servers is not
known. The image reports this repository's version (`headset.json`) and commit, and overpressure's version, in
`/usr/share/pico4/version` (`version=`, a preview's with its commit's time, `commit=`, `overpressure=`, `kernel=`
the kernel's tag, `packages=` the packages' release).
known. The image reports the plugin release it was built from (`headset.json`'s version) and its commit, and
overpressure's version, in `/usr/share/pico4/version` (`version=`, a preview's with its commit's time, `commit=`,
`overpressure=`, `kernel=` the kernel's tag, `packages=` the packages' release).

### systemd stays at 257.x

Expand Down Expand Up @@ -220,7 +220,7 @@ listed in `headset.json`:

Every flavour shares the kernel, overpressure's recovery and the PICO 4's packages for its hardware. A flavour's
image definition is overpressure/packages' `headsets/phoenix/<flavour>/` (a release before flavours has SteamOS's
in `headsets/phoenix/`), its part of the build overpressure's `build/flavours/<flavour>.sh`, and the PICO 4's own
in `headsets/phoenix/`), its part of the build overpressure's `build/flavours/<flavour>.sh`, and this plugin's own
part [userspace/flavours/steamos.sh](../../userspace/flavours/steamos.sh) (SteamVR's controller remapping and Steam
Link's layer); [userspace/build.sh](../../userspace/build.sh) is every flavour's. The installed system records its
flavour (`flavour=` in `/usr/share/pico4/version`); an upgrade builds the same one, and another one means
Expand Down
2 changes: 1 addition & 1 deletion docs/use/troubleshooting.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ that does not take that restart, needs a restart by hand: hold the power button
## Reporting a problem

Click **Save logs** on the PICO 4's page in the app. It writes one zip: the app's logs of the install, upgrade or
restore, what your computer is, and, when the installed system answers over the cable, the headset's own report:
restore, what your computer is, and, when the installed system answers over the cable, the system's own report:
its version, the logs of this start and the one before, failed services, Steam's and SteamVR's logs, the installed
packages, power, temperatures and network state. Serial numbers (also the headset's unlock code and chip ID), network
addresses, Steam IDs, account names and network names are masked; Steam's configuration and login data and the saved networks
Expand Down
4 changes: 2 additions & 2 deletions docs/use/using.md
Original file line number Diff line number Diff line change
Expand Up @@ -183,8 +183,8 @@ battery is above 59 °C, as PICO OS does ([the limits](../internals/cooling.md#h
The headset updates its system itself, over Wi-Fi or the USB cable's shared internet, without a computer. It looks
for a newer release once a day; **Overpressure Settings → Updates** shows what it found:

1. **Check for updates** looks now. A newer release on your headset's channel shows with what's new and its size; a
beta headset gets betas, a stable one only stable releases.
1. **Check for updates** looks now. A newer release on your system's channel shows with what's new and its size; a
beta system gets betas, a stable one only stable releases.
2. **Download** fetches it. The download goes on with the dashboard closed, and goes on where it stopped after a
lost connection.
3. **Restart and install** restarts the headset into overpressure's recovery, which installs the update in up to 10
Expand Down