Steps and the build container¶
TL;DR. A step is a command line: a command of the headset or a script in its folder, the same in Advanced mode
and in a terminal. Steps that build a userspace or Valve's kernel need Linux and root, so they run in overpressure's
build container on every host, one build at a time, from a pinned image. A RAM boot starts an image with
fastboot boot and writes nothing.
How a step runs¶
A step is a command line: a command of the headset (overpressure --device CODENAME ...) or a script in the
headset's folder. A step that works in Advanced mode works in a terminal, and the other way round. The process a
step is on this host (a Linux-root step's in the build container), its display, running and stopping it are
overpressure/runner.py's; Advanced mode's model of the steps, their values and
command lines is overpressure/steps.py's.
Linux-root steps¶
Building a userspace mounts file systems and chroots into an aarch64 root, so those steps (Step.linux_root: the
userspace build on the PC, Valve's kernel) run as root in overpressure's build container
(overpressure/linux.py) on every host, with Docker or Podman, whichever answers first
(OVERPRESSURE_CONTAINER_ENGINE chooses). A step's command line is overpressure container run -- COMMAND, from
the repository root (the container's commands).
- The image. overpressure/builder's release, which
overpressure/linux.pypins by tag and digest (IMAGE): Ubuntu 24.04 with every tool of the builds, LLVM 20's clang and lld, the kernel's cross compiler, pahole and qemu-user-static, for amd64 and arm64. The pin, not a package mirror, keeps a build's tools the same on every computer and later; the release lists every package's version.container pullgets it (container rundoes when it is missing);OVERPRESSURE_BUILDERnames another image, such as one built from the builder's recipe. Every run passes the image to the command asOVERPRESSURE_IMAGE. Its contract (entrypoint, ownership hand-back, the aarch64 handler) is in that repository's README. - What it sees. It runs privileged. The repository is at
/work;/var/tmp(the build roots) is the named volumeoverpressure-var, kept between runs. Nothing else of the host is visible: a step's paths lie in the repository (relative) or under/var/tmp. Private folders linked to another checkout (symlink or junction) are bound at their place under/work, and so are links one level inside a private folder of the worktree's own (cache/stock). In a git worktree the common.gitis bound at/gitandOVERPRESSURE_GIT_DIRnames the worktree's folder, which the scripts that ask git pass as--git-dir. In the app,/workis the data root, with overpressure's own files mounted read-only into it (two roots). - One build at a time.
container runnames its containeroverpressure-build, labelled with its client process and command. A second run is refused withanother build is running: COMMAND; let it finish or stop it, then start again. A leftover container whose client is gone is removed first. The doctor's probes run unnamed. - Stopping. Stopping a build (the installer's stop, Advanced mode's Stop, Ctrl-C or SIGTERM in
container run) removes its container (ENGINE rm -f overpressure-build), then ends the client. - Ownership. With a rootful engine the entrypoint gives what root created under
/workback to the host's user (OVERPRESSURE_UID,OVERPRESSURE_GID), whatever the exit status. A rootless engine, or one that maps ownership itself, needs nothing. - Parallel jobs. A package build in it (
build/packages.shof overpressure/packages) runs one job per CPU, but at most one per 1.5 GiB of the container's memory (MAKEFLAGS,CMAKE_BUILD_PARALLEL_LEVEL,OVERPRESSURE_BUILD_JOBSfor meson). - The aarch64 handler. The chroot runs arm64 programs through binfmt_misc with the F flag. Before a build on an
x86-64 engine without one, the container registers the image's
qemu-aarch64-staticasoverpressure-aarch64(as Ubuntu does:aarch64-binfmt-P, flagsPOF); it serves later containers until the host restarts. An arm64 engine needs none.
The doctor's checks of the container (the engine, the image, its memory, the handler) are in dependencies.
RAM boot¶
overpressure ram-boot [IMAGE] boots an image from RAM with fastboot boot: nothing is written, and the next
normal boot starts whatever the partitions hold, so it is the first contact with a new headset. The image must be
an Android boot image; the headset is brought into fastboot if needed and must be the only device there; its
bootloader must report unlocked; then fastboot boot and a bounded wait until the image answers. The headset says
how each of these looks for it (RAM boot for a headset), and Advanced
mode shows the step where it has one.
A bootloader without fastboot boot ("unknown command" after the transfer) ends it as refused (exit status 3),
apart from a failure (1): nothing was written and the headset stays in fastboot. It never falls back to flashing.