Skip to content

32-bit boards boot recovery-less from the Cascadia loader; 32-bit index - #96

Merged
henrikklee merged 10 commits into
mainfrom
armv7-direct-boot
Nov 7, 2026
Merged

henrikklee merged 10 commits into
mainfrom
armv7-direct-boot

Conversation

@henrikklee

Copy link
Copy Markdown
Contributor

32-bit boards (first: iPad mini 1, P105) now boot the way 64-bit ones do, with no recovery: orchard builds one file from the platform layer's kernel, initrd and board DTB plus the install add-on, with the Cascadia loader in m1n1's place. orchard build --device p105 produces it from orchard's own inputs; handing it to a patched iBEC is not part of orchard yet and says so.

  • Cascadia loader built from source (Shayne Legault's commits from build: add ARMv7 Cascadia recovery producers #82, authorship kept, original IDs noted), in the form Project Cascadia booted P105 with: archive copied to 0x88000000 before the MMU goes off, DTB initrd placeholders set in place, board boot arguments kept.
  • ARMv7 static tools are cross-compiled, so they build on Apple Silicon and ARM64 CI.
  • The initrd loads the USB gadget's modules where the kernel has them as modules (the ARMv7 kernel's NCM today); arm64 initrds load nothing new.
  • Releases: platforms-armv7.toml next to the unchanged platforms.toml (ARMv7 layers with every 32-bit DTB, ARMv7 install tools, per-board Cascadia loader); a 32-bit release manifest names [cascadia] loaders instead of m1n1/Pongo. Contract additions in docs/distribution-contract.md.
  • CI publishes the 32-bit index with every nightly.

64-bit payloads, indexes and releases are unchanged (tests). Not booted on hardware yet.

shaynelegault and others added 10 commits November 7, 2026 20:41
Select ARM/v7 or ARM64 tool recipes explicitly and keep their outputs in
separate caches. Pin Debian's ARMHF BusyBox package and verify each finished
tool's ELF architecture and static linkage. Native builds require a host
whose architecture matches the selected target.

Assisted-by: LLM

(cherry picked from commit 8d859a3, #82)
Use board-owned handoff data to compile the ARM32 staging loader. Preserve
Cascadia's cache/MMU handoff and require executable code at the upload
address. A checked configuration places the supplied external initramfs
in reserved RAM before entering Linux through its edited DTB.

Bound the zImage decompressor workspace and preserve the kernel bytes.
Add synthetic layout tests and a Linux fixture that exercises the actual
loader C copy and rejection paths. Source provenance is recorded in NOTICE.
The external-initramfs handoff still requires physical qualification.

Assisted-by: LLM

(cherry picked from commit 12928a3, #82;
left out here: the chips/s5l8942x.toml, devices/p105/device.toml and README notes)
Clear the profile watchdog before reading the checked handoff configuration. Rejected payloads now remain available for inspection instead of resetting while the loader waits.

Cover the rejected-config path in the Linux runtime fixture.

Assisted-by: LLM
(cherry picked from commit 78ed09b)
Platform layers use the declared kernel image and the platform's own early
storage modules (an empty list for built-in storage), and check the root
architecture they are asked for. Static recovery tools are built per
architecture into separate cache entries; the Cascadia loader is built from
the board's profile; RAM payloads of a Cascadia platform are assembled for
one selected board through the Cascadia producer, without Pongo. The ELF
reader handles ELF32 and ELF64 alike.

Assisted-by: LLM

Adapted from commit 02dcc19
(#82). Left out here: board selection for distribution
builds (orchard.inputs --device, selects-device), per-board platform layers,
the recovery's runtime staging and its producer-contract text. arm64 platform
layers keep their platform.json and receipt unchanged; the ARMv7 layer holds
every board's DTB.
The initramfs goes to 0x88000000, where Cascadia's own P105 boot put its
extra archive and where the board DTB's /chosen initrd placeholders point,
inside what iBEC maps; the loader copies it there before it turns the MMU
off, as before. The DTB's two initrd cells are set in place, as Cascadia's
assemble.py does, instead of rewriting the tree: its boot arguments stay
the board's, and no memory reservation is added. A tree without the
placeholders is refused. RAM payloads of a Cascadia board pass no m1n1 boot
arguments.

Assisted-by: LLM
Apple Silicon, and most ARM64 machines, cannot run 32-bit ARM code, so an
ARMv7 container cannot build the tools there. They are now cross-compiled in
a container of the host's own architecture (Containerfile.arm, with Debian's
armhf GCC and musl), statically against musl as the arm64 tools are; the
Debian armhf BusyBox package is only unpacked. The arm64 tools build as
before. install-toolchain --cross arm lists or installs the extra packages.

Assisted-by: LLM
…dules

orchard's ARMv7 kernel builds the configfs gadget functions as modules
(NCM today; with the legacy g_cdc gadget off, libcomposite and ACM too). The
initrd now carries libcomposite, usb_f_ncm and usb_f_acm with their
dependencies when the kernel has them as modules, and loads them before the
storage modules, so USB serial and SSH come up on install and installed
boots. A module that fails to load costs USB only, never the boot. The
arm64 kernels build the gadget in: their initrd has no list and loads
nothing new.

Assisted-by: LLM
As on 64-bit, the host builds one file from the platform layer's kernel,
initrd and board DTB plus the boot's add-on (writer, Dropbear, e2fsprogs
tools, this boot's keys); on a 32-bit board the board's Cascadia loader
takes m1n1's place. The loader copies the initrd and the add-on to the
board's initrd address before it turns off the MMU, the DTB's placeholders
are set to it, and the board's own boot arguments stay. The addresses come
from orchard's device data (devices/BOARD/cascadia.toml), so no release
names them. Handing the file to a patched iBEC is not orchard's yet, and
says so.

orchard publishes for 32-bit roots next to the unchanged platforms.toml:
platforms-armv7.toml lists the ARMv7 platform layers (every 32-bit DTB),
install-tools-armv7.tar.gz and per board cascadia-BOARD.bin.
orchard.inputs resolves a 32-bit root's kernels, tools and loaders. A
32-bit release manifest names its boards' loaders under [cascadia] instead
of m1n1 and Pongo. 64-bit payloads, indexes and releases are unchanged.

Contract change (docs/distribution-contract.md): orchard.inputs --loader,
platforms_index --architecture and --loader, cascadia.py by path.

Assisted-by: LLM
The tools job also cross-compiles the ARMv7 tools and builds a Cascadia
loader for each board with a devices/BOARD/cascadia.toml; the publication
writes platforms-armv7.toml next to platforms.toml and lists it in
SHA256SUMS. ci/install-toolchains recovery-arm adds the armhf cross
toolchain.

Assisted-by: LLM
@henrikklee
henrikklee merged commit d334c9b into main Nov 7, 2026
24 checks passed
@henrikklee
henrikklee deleted the armv7-direct-boot branch November 7, 2026 13:55
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