Skip to content

32-bit boards: boot through the patched iBSS and iBEC into m1n1 - #443

Merged
henrikklee merged 5 commits into
mainfrom
boot-32bit-m1n1-route
Dec 2, 2026
Merged

henrikklee merged 5 commits into
mainfrom
boot-32bit-m1n1-route

Conversation

@henrikklee

@henrikklee henrikklee commented Dec 2, 2026 •

Copy link
Copy Markdown
Contributor

What changes for users

Every 32-bit iPhone and iPad (A5, A5X, A6, A6X: 18 boards) gets the same boot chain as the 64-bit ones: DFU mode that a Pico's checkm8 entered, or kDFU → Apple's patched iBSS → patched iBEC → Apple's DeviceTree → m1n1's 32-bit build (m1n1-armv7.macho) → bootx → Linux. Before this, the ibss route covered only the A5 chips. The iPad 3, iPad 4, iPhone 4s, iPhone 5/5c and the other iPad 2 and iPad mini models had no route.

Cascadia's autogo route stays as the A5 fallback (--boot autogo, recovery-autogo, devices/p105/cascadia.toml, the platform's loader = "cascadia"). Nothing about it changed.

Evidence: an iPhone 5 (N42) booted Linux by this chain from kDFU on 2026-12-02 (OrchardLinux/m1n1#17, still open). No A5, A5X or A6X board has run it yet. Device capability data (features) is unchanged.

Data

  • routes.toml [boot.ibss]: fits adds s5l8945x, s5l8950x and s5l8955x, so the route now covers all five 32-bit chips. It stays ahead of autogo, which keeps named = true. tools picks a route from this file by chip, so this change is what turns the route on.
  • methods.toml: new method ibss-m1n1, with entries = ["pico-checkm8", "kdfu"], stages = ["iBSS", "iBEC"], loader = "m1n1", boot_json = false. It needs no per-method data in boot.json, only the board's IMG3 firmware and its keys. That matches tools' ibss route, which applies the open patcher to each chip stage.
  • devices/*/device.toml [boot]: ibss-m1n1 is now the first method on all 18 boards on those chips, with entries pico-checkm8 and kdfu. p105 keeps jailbreak-kdfu and recovery-autogo after it, k93 keeps recovery-autogo, and j1 keeps jailbreak-kdfu.
  • tools/catalog/generate: IMPLEMENTED_METHODS now includes ibss-m1n1 (tools main starts it in runtime/src/ibss.rs, start_arm). No Install cell in the matrix changes: j1 still has no writable storage.
  • New test (tests/test_routes.py): on every ARMv7 chip, ibss must be the first unnamed boot route, and every board on such a chip must list ibss-m1n1 first.

No new field. tools reads only what it already reads: routes.toml (ends, named, fits.chips), the chip's architecture/image_format/stages, and the board's boot.json firmware, keys and DeviceTree input. methods.toml and [boot] methods feed only the catalog and the matrix.

Keys (boot.json firmware[].keys, existing field). Public IMG3 keys for the iBSS, iBEC and DeviceTree are added on every 32-bit board whose selected firmware has them: k93, k93a, k94, k95, n94, p105, p107 and j1 (the DeviceTree key is new on p105 and k93). Each key comes from api.ipsw.me and was checked by downloading that IPSW member and decrypting it: the result has to show the iBoot version, or the DeviceTree's model has to match the board. From kDFU the iBEC only takes a decrypted DeviceTree. The iOS 10 images that n41, n42 (14G61), n48, n49, p101, p102 and p103 select are not encrypted (no KBAG), so they need no key. p106 (12H321), j2 and j2a (13G37) have no public keys, so --keys is needed there.

One m1n1. Every 32-bit board uses the same m1n1-armv7.macho, and there are no per-board m1n1 builds. m1n1 will pick the watchdog settings at run time (tracked separately).

Docs

New: docs/platforms/apple-armv7.md, one page on the 32-bit platform: chips and boards, the boot chain, storage and the standard install, the watchdog hand-off, Cascadia's autogo route as a fallback, and the state of each board. It is linked from docs/platforms-and-builds.md and docs/bring-up/armv7-m1n1.md.

docs/platforms-and-builds.md gets a new "32-bit boot" section, with Cascadia's chain kept as the fallback record. Also updated: boot/m1n1/README.md, docs/bring-up/armv7-m1n1.md (the N42 result and what is still unchecked), the p105 and j1 READMEs, the matrix (regenerated) and a CHANGELOG entry.

Order with #395

This one first. #395 (N42) is merged with main and built on this branch, and uses ibss-m1n1 in place of its own N42-only method.

Checks

Ran locally: the full suite (python -m unittest discover -s tests, 491 tests, OK), tools/catalog/generate matrix --check and git diff --check.

Every A5, A5X, A6 and A6X board now starts the way the 64-bit ones do:
from a boot ROM that checkm8 from a Pico entered, or from kDFU, Apple's
patched iBSS and iBEC take Apple's DeviceTree and m1n1's 32-bit build,
started with bootx. The ibss boot route fits all five 32-bit chips, and
the new ibss-m1n1 method is the first one of all 18 boards on them.
Cascadia's autogo route and recovery-autogo stay as the A5 fallback.

An iPhone 5 booted Linux this way on 2026-12-02 (OrchardLinux/m1n1#17).

Assisted-by: LLM
One page for the A5 to A6X boards: the chips and boards, the boot chain
every board shares (Pico checkm8 or kDFU, patched iBSS and iBEC, Apple's
DeviceTree, the 32-bit m1n1, bootx), storage and the standard install,
the watchdog hand-off, Cascadia's autogo route as the fallback, and what
each board has run so far.

Assisted-by: LLM
The ibss route sends Apple's DeviceTree decrypted from kDFU, and patches
the iBSS and iBEC: boot.json now has public keys for all three on every
32-bit board whose selected firmware has them (k93, k93a, k94, k95, n94,
p105, p107, j1). Each key was checked by decrypting the IPSW member: the
iBoot version string, or the DeviceTree's model. iOS 10's A6 and A6X
images are not encrypted; p106, j2 and j2a have no public keys.

Assisted-by: LLM
…chip

m1n1's 32-bit build now boots the A6 iPhone 5 (N42) and does the 32-bit
start-up steps for every A5 to A6X chip: it keeps the Swift L2 contents
and uses high exception vectors, starts the watchdog counter, selects
the board's device tree, brings up the A6 USB clocks, and passes the
touchscreen's factory calibration to Linux. It also reads the N42's
SanDisk flash read-only. Orchard's published m1n1-armv7.macho, which the
ibss route sends, is this build. The default options stay as they were:
the watchdog handoff stays off.

Assisted-by: LLM
@henrikklee
henrikklee merged commit 9b66079 into main Dec 2, 2026
11 checks passed
@henrikklee
henrikklee deleted the boot-32bit-m1n1-route branch December 2, 2026 14:08
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.

1 participant