Skip to content

A8 and A9 GPU firmware, and inputs from another restore image - #1

Merged
henrikklee merged 4 commits into
OrchardLinux:mainfrom
brkosebay:a8-gpu-fw-steps
Nov 25, 2026
Merged

henrikklee merged 4 commits into
OrchardLinux:mainfrom
brkosebay:a8-gpu-fw-steps

Conversation

@brkosebay

Copy link
Copy Markdown
Contributor

The installer now builds the A8 and A9 GPU firmware that orchard's recipes ask for, and reads the recipe form that takes an input from another restore image. With these changes the graphical installer installed Omarchy A on an iPod touch 6 (N102) end to end.

Commits

  • Peripheral firmware: the A8 and A9 GPU firmware steps. Ports agx-g4p-ldr-from-kernelcache@1, agx-g4p-border-from-kernelcache@1 and agx-g5p-ldr-from-kernelcache@1 from orchard's Python, with tests. Before, these steps were skipped as unsupported, so A8 and A9 installs got no GPU firmware.
  • Installer: a recipe it can't use is not a download failure. A recipe parse or format error no longer says "check the internet connection".
  • Peripheral firmware: a kernelcache from another restore image. Supports "kernelcache": "<board>ap" + "restore": {version, build, url, bytes, sha256}, the way orchard's recipe.py resolves it. It reads only that board's KernelCache member by range requests and checks the input's sha256. Before, the iPad mini 4 (J96, J97), six A9 iPhones and orchard v0.3.8's N102 board data failed with invalid type: string "n102ap", expected a boolean.
  • Installer: the least room for the system is orchard's. It now asks for 9.7 GB (orchard's 8 GiB root + 1 GiB boot) instead of the 12 GB placeholder.

Tested

  • cargo test --release --workspace: 557 passed, 0 failed, 2 ignored.
  • orchard2 --data <orchard> fw build n102 --type peripheral from an empty cache writes all 12 files, matching the recipe; gfx-t7000.bin is 5f99a8ab… (from iOS 12.5.8). fw build j96 against v0.3.8's board data writes both GPU files from the 12.4 kernel.
  • iPod touch 6 (N102, iOS 12.5.8): the GUI, run with ORCHARD_ENTRY=checkra1n and orchard's board data, created the account, replaced an old Linux partition with boot + root, streamed and verified the root image (761 MB), and started the installed system. On it, the GPU firmware hash matches and powervr draws the desktop.
  • With ORCHARD_TEST_DATA set, the board-data test still lists 17 boards whose SmartIO kexts this version doesn't know (S5L8960X, T7000 on J81/J82, T8011). N102 is not among them.

How to test

cargo test --release --workspace
orchard2 --data <orchard checkout> --cache "$(mktemp -d)" fw build n102 --type peripheral
orchard2 --data <orchard checkout> --cache "$(mktemp -d)" fw build j96 --type peripheral

Both firmware builds should write gfx-t7000.bin and gfx-t7000-border.bin with the recipe's hashes.

agx-g4p-ldr-from-kernelcache@1, agx-g4p-border-from-kernelcache@1 and
agx-g5p-ldr-from-kernelcache@1, ported from orchard's apple/agx.py.
Without them the installer skipped gfx-t7000.bin, gfx-t7000-border.bin
and gfx-s8003.bin as unsupported, so A8 and A9 installs had no GPU
firmware.

- G4P: every META LDR in the decoded kernel whose records walk cleanly,
  and every 0x800-byte table that opens with 0x440 zero bytes and the
  word 0x02040000; the output's pinned hash picks the one installed, as
  for BlueTool's streams (both now share that pick).
- G5P: AGXFirmwareKextG5P's __TEXT.__const, only the iPadOS 16.7.10 C0
  image (size and SHA-256), like agx.py.

The candidates match what agx.py finds in the iPod touch 6's iOS 12.4
and 12.5.8 kernels and the iPad 5's iPadOS 16.7.10 kernel
(ORCHARD_TEST_KERNELCACHES runs that comparison; Apple's files are not
in the tree). "orchard2 fw build n102 --type peripheral" and "... j71t
..." against Apple's server write all 12 and 19 files, the GPU ones with
the recipe's hashes.

ORCHARD_TEST_DATA names an orchard checkout and lists every board whose
recipe this version can't plan or whose GPU firmware it would skip. It
still fails: 8 recipes take a kernelcache from another restore image
("kernelcache": "<board>ap", which this version doesn't parse) and 17
need SmartIO kexts it doesn't know.
A firmware recipe the installer couldn't parse (orchard's n102 recipe,
for 0.1.3) was shown as "A download didn't work ... Check the internet
connection". An asset failure now carries its cause: Network after the
retries, Data for a format or unsupported error (a recipe or file the
installer can't use), Other for the rest. The dialog's title and text
come from the cause; only a network failure points at the connection.
orchard's recipes name an input from another pinned restore image as
"kernelcache": "<board>ap" with "restore": {version, build, url, bytes,
sha256}: the iPad mini 4 (j96, j97) takes its GPU firmware from the iPod
touch 6's iOS 12.4 kernel, six A9 iPhones from the iPad 5's iPadOS 16.7.10
kernel. This version refused those recipes ("invalid type: string, expected
a boolean"), and with them orchard v0.3.8's board data for n102.

- The input reads only the named board's KernelCache member of that image,
  by range requests like every other input; each image is opened once,
  when an input from it is missing.
- As in orchard's recipe.py, an input from another image needs its sha256
  and a board name, and a kernelcache input is the decoded Mach-O: that is
  what the recipes' hashes cover (1d996c85… for n102 16G77, c6b95fcf… for
  j71t 20H350), and what the cache keeps under it. The GPU and SmartIO
  steps take it as it is.

"orchard2 fw build j96 --type peripheral" against v0.3.8's board data, from
an empty cache, writes gfx-t7000.bin and gfx-t7000-border.bin from the
12.4 kernel; n102 writes all 12 files. ORCHARD_TEST_DATA (orchard main or
v0.3.8) now lists only the 17 boards whose SmartIO kexts this version
doesn't know.
The flow asked for 12 GB outside iPadOS, a placeholder until the release
states its unpacked size. orchard's install layout needs an 8 GiB root and
a 1 GiB boot partition, 9.7 GB, and a smaller device that has that much
(the iPod touch 6 with iOS kept at 20 GiB) was sent back to the split.
@henrikklee
henrikklee merged commit 73ccf35 into OrchardLinux:main Nov 25, 2026
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