Design agreed in October 2026. Sections marked done are implemented; the rest is the plan.
- A user installs a distribution on a supported device, with as little friction as possible.
- The same user starts it again. A tethered boot needs a host tool on every boot.
- Someone brings up a device or a driver. The most common development work. It changes kernel patches, device data, recipes and often host code, and needs no distribution.
- Someone works on a distribution (the desktop, its installer), with mainline orchard or with orchard changes of their own.
- Someone creates a distribution. Rare; minimal-linux is the reference to start from.
Changes are frequent: many commits a day across orchard and the distributions, most of them never released on their own. Nothing in daily work may depend on version numbers or pins.
- OrchardLinux/orchard: hardware support and the
orchardtool in one repository (formerlyhardware, withclimerged in as a subtree, its commit IDs unchanged;cliis archived). A device change carries its descriptor, firmware recipe, converter steps, kernel patches and tests in one pull request. - omarchy-a and minimal-linux: the two maintained distributions.
Inside orchard, code is split by where it runs and how it is used:
src/orchard/: all Python imported on the host, one package.devices/,schemas/,features.toml: data.kernel/,boot/: recipes, standalone programs. They runsrc/orchard/buildenv.pyby path and need only Python 3.11 and its standard library.runtime/: device-side code, copied into images, never imported.examples/: RAM payloads to start from.
There is no wheel: orchard runs from a checkout. One version for the repository (0.2.0); releases publish component bundles, the loaders m1n1.bin and pongo.bin, sources and checksums.
git clone, ./setup, orchard run examples/minimal-boot. ./setup (and orchard setup) shows every host requirement as ready, todo or yours, asks once, and can be
rerun until everything is ready; orchard doctor shows the same and changes
nothing. The requirements are one list shared with the installer's boot tools
(setup-host): OpenSSH, libusb, palera1n and Linux USB permissions for booting;
git, Podman (and its machine on macOS), the orchard command and PATH for building.
Packages come from glu, then Homebrew on macOS (neither is installed for you), or
apt, dnf or pacman. The orchard command is a copy of tools/launcher,
which runs the newest nightly, so it does not depend on any clone. Pongo comes from the latest release while its recipe
is unchanged, so most builds need no Xcode.
Two launchers, and neither looks at the current directory:
orchardon PATH istools/launcher(./setupinstalls it,orchard updatereplaces it with the newest nightly's). Every command runs the newest nightly: looked up once (nightly/latest.json), a shallow clone of its tag in~/.cache/orchard/tooling/NAME, so a command runs one version from start to end. Offline: the newest cached nightly.ORCHARD_VERSION=nightly-YYYYMMDD-COMMIT(orvX.Y.Z) pins one, e.g. to reproduce a bug. A launcher older than the nightly it runs says so.- A checkout's
bin/orchardruns that checkout, called by its path (~/src/orchard/bin/orchard build …), from any directory: that is how to work on orchard itself, in a worktree per branch (git worktree add ../orchard-gpu -b gpu-a10). uv installs it editable; an edit counts from the next command.
orchard python ARGS runs Python in the running version's environment, for a distribution's own scripts. An orchard = "PATH" line in orchard.local.toml, which used to choose the checkout, is refused with what to use instead.
| File | Committed | Contains |
|---|---|---|
orchard.toml beside a payload's init or at a distribution's root |
yes | the project: name, and [payload] (transport, modules, firmware) or [release] (build, selects-platform); commented, since the examples teach the system |
orchard.local.toml |
never | this checkout's build arguments: platform, device = "BOARD", kernel-tree |
No repository and no per-person setting names a board: many contributors work on several. A payload serves every board of one platform (out/PLATFORM/); orchard run takes the platform from the attached board, builds what is missing and adds that board's firmware as its own layer from the private cache; orchard build takes it from --platform, --device, orchard.local.toml or the attached board (listing USB devices only). A distribution release serves every board: one root image, and per platform a recovery and orchard's platform layer (kernel, DTBs, modules; see boot contract). Which boards are supported, and how well, is only orchard's device data (status, caveats), which the installer shows.
A distribution has no submodule, no launcher and no root configuration. orchard runs the newest nightly, whose components it then takes too; a checkout's bin/orchard runs that checkout. Distribution CI tests against orchard main; a release build uses one published orchard release whole, its tools and its per-platform component bundles alike (ORCHARD_REF overrides the tools). A release's manifest and build receipt record the exact orchard commit (orchard.hardware.revision()).
orchard python tools/qemu-install/run RELEASE_DIRECTORY --board BOARD runs orchard's real
device installer against a 16 GiB loop disk (an APFS-like partition first, as on an
iPad): partitions, root image, the board's platform layer, account and boot entry. Then
QEMU cold-boots that disk as NVMe through orchard's initrd into the system's init. QEMU
cannot run orchard's Apple kernels, so the boot uses Alpine's virt kernel with its storage
modules in orchard's initrd; drivers and the desktop stay for the device. It needs Podman
with a rootful connection (loop devices) and qemu-system-aarch64.
All shared by every checkout in ~/.cache/orchard:
| Layer | |
|---|---|
| Source | shared Git object store (git/), one kernel tree per platform and upstream pin (kernel-work/) |
| Intermediate | the kernel tree's incremental output; ccache (ccache/kernel/); recipe work directories (work/RECIPE/KEY) |
| Result | content-addressed components (components-v2/), each file stored once; orchard cache --prune keeps the most recently used |
Measured on apple-16k (j71b), switching between two patch sets that recompile 109 objects: 120 s without ccache, 83 s with it, 47 s after applying the series in one git apply, hashing it in one call and running one make job per CPU. The kernel key for a fully cached build went from 16.3 s to 0.8 s. The real cache went from 3.1 GB to 287 MB on disk.
Measuring on the shared tree: hold the tree lock across runs (ORCHARD_KERNEL_WORK_LOCKED) and register test series in the shared Git store first, or another session's build switches the tree between runs.
Not used: Docker/BuildKit layers are linear; Nix would rebuild every patch variant of the kernel fully and fits poorly with macOS and Podman; Bazel and Buck2 fight Kbuild.
Recipes run $ORCHARD_PYTHON (default python3), which orchard sets to its own interpreter. Python 3.11 is the minimum; CI tests 3.11 and 3.14.
One step, because all three need a distribution build that does not depend on the board:
- Device layer (done): kernel, initrd, DTBs and modules are orchard's platform
layer, which the installer writes into the root, and the installer writes the boot
entry; a distribution builds one root image for every platform, names no board and
needs no kernel-install. Release format:
schemas/v2. - A distribution as a project (done):
orchard.toml(name,[release] build) names its build entry. In a distribution checkoutorchard buildruns it asENTRY --version VERSION --output out/releases/VERSION(default versiondev-DATE-TIME), checks the index, its distro and version and every file it pins, and records the build inout/releases/latest.json.orchard runbuilds, then boots that release's recovery for the attached board from RAM, installing nothing;orchard installwithout a source installs the last build. Entries keep their parts withorchard.distro.component(keyed by their files underout/components/) and take Pongo and the recovery tools fromorchard.build.prepare_shared; the kernels come from the platform layer as before. - The installer and the user's orchard, below.
Done; src/orchard/installer.py and src/orchard/user.py.
- Core: the part of
src/orchardthat install and launch need (everything but the development modulesinstaller.DEVELOPMENT: building kernels, payloads and distributions). Standard library only;tests/test_core.pychecks every import and imports every module without site-packages. - Installer per distribution release:
orchard.installer release DIRaddsorchard-install.pyz(core, the release'sindex.tomland therelease.tomlit pins, the device data of the release's boards, Pongo and the storage-capable m1n1) andinstall.shto a release directory.install.shdownloads a hash-pinned standalone Python 3.14 into the store (installer.PYTHON) and the zipapp (--installer-url, or the one next to it), checks both by SHA-256 and runsinstall, prompting on the terminal even when piped from curl. No system Python, no uv. The zipapp unpacks once intoSTORE/core/VERSION-HASH. - The user's
orchard:STORE/core/current.jsonand~/.local/bin/orchard, a launcher of the core withinstall,launch,devicesandupdate. An installer writes it before installing (soorchard launchremains even if the install stops) and replaces it only with a newer core; a development orchard on PATH (the nightly launcher./setupinstalls) stays.orchard updateinstalls the latest orchard release'sorchard-core.pyzif it is newer. Later a self-contained Rust/C binary. - State: the store and the build cache record their layout version
(
cache.STATE_VERSION,state.json); an orchard that finds a newer one refuses to touch it. - Validation: jsonschema is the
validateextra and a development dependency.python -m orchard.manifestsand the tests validate against the schemas; release CI installs.[validate]. The core checks what it relies on.
orchard runin a distribution boots the locally built system over NFS root (#30) without installing: the desktop's edit-and-run loop.- Prebuilt kernel layers from CI, first for a newcomer's first build, which otherwise compiles Linux.
- Keep the kernel tree inside the Podman VM (the largest remaining build cost is
makewalking the tree through the host file share). - A
kernel/buildshortcut when tree, config, image and series match the last build; skip the image check when its inputs match. - Warn about hand edits in the shared kernel tree; they are built silently and reach every checkout with the same series.
- Prebuilt kernel layers also for upstream pin bumps, which are always full builds.
- Several kernel trees per platform, if checkouts waiting for each other becomes a problem.
- Converter steps next to the device data; IOKit USB on macOS (no libusb); no checkra1n dependency; the iOS app installer with APFS resize.
Checking attestations on the client (releases are attested and publish.yml verifies them), Windows hosts, splitting the tablet desktop into upstream-style packages yet.