From 932b8032e62e8a72bed0b11302f85a34e832bd84 Mon Sep 17 00:00:00 2001 From: Henrik Klee Date: Wed, 2 Dec 2026 21:49:09 +0800 Subject: [PATCH 1/5] 32-bit boards: boot through the patched iBSS and iBEC into m1n1 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 --- CHANGELOG.md | 7 +++++++ boot/m1n1/README.md | 6 ++++++ devices/j1/README.md | 7 ++++--- devices/j1/device.toml | 9 +++++---- devices/j2/device.toml | 4 ++++ devices/j2a/device.toml | 4 ++++ devices/k93/device.toml | 4 ++-- devices/k93a/device.toml | 4 ++++ devices/k94/device.toml | 4 ++++ devices/k95/device.toml | 4 ++++ devices/n41/device.toml | 4 ++++ devices/n42/device.toml | 4 ++++ devices/n48/device.toml | 4 ++++ devices/n49/device.toml | 4 ++++ devices/n94/device.toml | 4 ++++ devices/p101/device.toml | 4 ++++ devices/p102/device.toml | 4 ++++ devices/p103/device.toml | 4 ++++ devices/p105/README.md | 4 +++- devices/p105/device.toml | 7 ++++--- devices/p106/device.toml | 4 ++++ devices/p107/device.toml | 4 ++++ docs/bring-up/armv7-m1n1.md | 15 +++++++++++---- docs/compatibility.md | 36 ++++++++++++++++++------------------ docs/devices/j1.md | 4 ++-- docs/devices/p105.md | 2 +- docs/platforms-and-builds.md | 30 +++++++++++++++++++++++++++--- methods.toml | 17 +++++++++++++++-- routes.toml | 9 +++++---- tests/test_routes.py | 19 +++++++++++++++++++ tools/catalog/generate | 2 +- 31 files changed, 190 insertions(+), 48 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8aea3792b..42a1e106c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,13 @@ is missing or empty. - [Removing iOS](docs/remove-ios.md): on a device too small to keep iOS next to Linux, delete iOS's partitions from a RAM session and install Linux on the whole disk. The hardware-check RAM system carries `sfdisk` again for it. +- Every 32-bit iPhone and iPad (A5, A5X, A6, A6X) starts the same way as the + 64-bit ones: from DFU mode a Pico entered, or from kDFU, through Apple's + patched iBSS and iBEC into m1n1, which starts Linux. The iPad 3, iPad 4, + iPhone 4s, iPhone 5 and 5c and the remaining iPad 2 and iPad mini models + get this route too. An iPhone 5 has booted Linux this way with m1n1 + changes still in review; the A5, A5X and A6X boards have not run it yet. Cascadia's loader stays as the A5 fallback + (`--boot autogo`). ## [0.3.20] - 2026-12-02 diff --git a/boot/m1n1/README.md b/boot/m1n1/README.md index aff6ed835..dab1680be 100644 --- a/boot/m1n1/README.md +++ b/boot/m1n1/README.md @@ -13,6 +13,12 @@ compiles `m1n1.bin` with chainloading enabled. Next to it go the same build as kernel). Git and Podman are required. +`m1n1-armv7.macho` is one binary for every 32-bit board: the `ibss` boot +route (`ibss-m1n1` in `methods.toml`) sends it after the patched iBSS and +iBEC and Apple's DeviceTree, and starts it with `bootx`; what differs per +board comes from the Apple device tree. See [m1n1 on the 32-bit +boards](../../docs/bring-up/armv7-m1n1.md). + `orchard build` and `orchard run` run it with their cache directories; don't call it directly (see [AGENTS.md](../../AGENTS.md)). diff --git a/devices/j1/README.md b/devices/j1/README.md index 3ee8bf904..0bb2a02c4 100644 --- a/devices/j1/README.md +++ b/devices/j1/README.md @@ -38,9 +38,10 @@ features on 2026-10-26, and with Cascadia PR #35's tree on 2026-11-05. ## Boot -Orchard's launcher does not run this chain yet. The `jailbreak-kdfu` method -names it, and `docs/platforms-and-builds.md` ("A5 boot") plans it. As the kit -runs it: +orchard starts the board by the `ibss` route into the 32-bit m1n1 +(`ibss-m1n1`, `docs/platforms-and-builds.md`, "32-bit boot"), which has not +run on a J1 yet. The kit's own chain, which orchard does not run, is the +`jailbreak-kdfu` method: 1. iOS 9.3.5 (13G36), jailbroken (EverPwnage), runs `kloader` with a signature-patched iBSS. For kDFU the iBSS has to be decrypted, because the diff --git a/devices/j1/device.toml b/devices/j1/device.toml index a7b5ac28d..4745718a0 100644 --- a/devices/j1/device.toml +++ b/devices/j1/device.toml @@ -13,10 +13,11 @@ chip = 0x8945 board = 0x00 [boot] -methods = ["jailbreak-kdfu"] -entries = ["kdfu"] -# Booted from a jailbroken iOS 9.3.5 with kloader and Cascadia's staging -# loader (README.md); orchard's launcher does not run this chain yet. +methods = ["ibss-m1n1", "jailbreak-kdfu"] +entries = ["pico-checkm8", "kdfu"] +# orchard starts the board by its ibss boot route (routes.toml) into the 32-bit m1n1. +# It was booted before from a jailbroken iOS 9.3.5 with kloader and Cascadia's +# staging loader (README.md, jailbreak-kdfu), which orchard does not run. [kernel] platform = "apple-armv7" # kernel/series/apple-armv7, kernel/configs/apple-armv7 diff --git a/devices/j2/device.toml b/devices/j2/device.toml index dd6f6693b..f5b9c6755 100644 --- a/devices/j2/device.toml +++ b/devices/j2/device.toml @@ -11,3 +11,7 @@ apple_products = ["iPad3,2"] [match.dfu] chip = 0x8945 board = 0x02 + +[boot] +methods = ["ibss-m1n1"] +entries = ["pico-checkm8", "kdfu"] diff --git a/devices/j2a/device.toml b/devices/j2a/device.toml index 17313b57f..d778ba574 100644 --- a/devices/j2a/device.toml +++ b/devices/j2a/device.toml @@ -11,3 +11,7 @@ apple_products = ["iPad3,3"] [match.dfu] chip = 0x8945 board = 0x04 + +[boot] +methods = ["ibss-m1n1"] +entries = ["pico-checkm8", "kdfu"] diff --git a/devices/k93/device.toml b/devices/k93/device.toml index 5be0fc770..fad48513f 100644 --- a/devices/k93/device.toml +++ b/devices/k93/device.toml @@ -13,5 +13,5 @@ chip = 0x8940 board = 0x04 [boot] -methods = ["recovery-autogo"] -entries = ["kdfu"] +methods = ["ibss-m1n1", "recovery-autogo"] +entries = ["pico-checkm8", "kdfu"] diff --git a/devices/k93a/device.toml b/devices/k93a/device.toml index 0ad12bbd6..a28d336c7 100644 --- a/devices/k93a/device.toml +++ b/devices/k93a/device.toml @@ -11,3 +11,7 @@ apple_products = ["iPad2,4"] [match.dfu] chip = 0x8942 board = 0x06 + +[boot] +methods = ["ibss-m1n1"] +entries = ["pico-checkm8", "kdfu"] diff --git a/devices/k94/device.toml b/devices/k94/device.toml index 59a2caa11..ca4dd363c 100644 --- a/devices/k94/device.toml +++ b/devices/k94/device.toml @@ -11,3 +11,7 @@ apple_products = ["iPad2,2"] [match.dfu] chip = 0x8940 board = 0x06 + +[boot] +methods = ["ibss-m1n1"] +entries = ["pico-checkm8", "kdfu"] diff --git a/devices/k95/device.toml b/devices/k95/device.toml index 359950353..7e61e28cf 100644 --- a/devices/k95/device.toml +++ b/devices/k95/device.toml @@ -11,3 +11,7 @@ apple_products = ["iPad2,3"] [match.dfu] chip = 0x8940 board = 0x02 + +[boot] +methods = ["ibss-m1n1"] +entries = ["pico-checkm8", "kdfu"] diff --git a/devices/n41/device.toml b/devices/n41/device.toml index d2dc6decf..b69dd141a 100644 --- a/devices/n41/device.toml +++ b/devices/n41/device.toml @@ -11,3 +11,7 @@ apple_products = ["iPhone5,1"] [match.dfu] chip = 0x8950 board = 0x00 + +[boot] +methods = ["ibss-m1n1"] +entries = ["pico-checkm8", "kdfu"] diff --git a/devices/n42/device.toml b/devices/n42/device.toml index 6d0d45f29..ac9699969 100644 --- a/devices/n42/device.toml +++ b/devices/n42/device.toml @@ -11,3 +11,7 @@ apple_products = ["iPhone5,2"] [match.dfu] chip = 0x8950 board = 0x02 + +[boot] +methods = ["ibss-m1n1"] +entries = ["pico-checkm8", "kdfu"] diff --git a/devices/n48/device.toml b/devices/n48/device.toml index e33d9bcea..a2b3acfec 100644 --- a/devices/n48/device.toml +++ b/devices/n48/device.toml @@ -11,3 +11,7 @@ apple_products = ["iPhone5,3"] [match.dfu] chip = 0x8950 board = 0x0a + +[boot] +methods = ["ibss-m1n1"] +entries = ["pico-checkm8", "kdfu"] diff --git a/devices/n49/device.toml b/devices/n49/device.toml index 18390b384..b562d784c 100644 --- a/devices/n49/device.toml +++ b/devices/n49/device.toml @@ -11,3 +11,7 @@ apple_products = ["iPhone5,4"] [match.dfu] chip = 0x8950 board = 0x0e + +[boot] +methods = ["ibss-m1n1"] +entries = ["pico-checkm8", "kdfu"] diff --git a/devices/n94/device.toml b/devices/n94/device.toml index 362d10f88..88ea360d4 100644 --- a/devices/n94/device.toml +++ b/devices/n94/device.toml @@ -11,3 +11,7 @@ apple_products = ["iPhone4,1"] [match.dfu] chip = 0x8940 board = 0x08 + +[boot] +methods = ["ibss-m1n1"] +entries = ["pico-checkm8", "kdfu"] diff --git a/devices/p101/device.toml b/devices/p101/device.toml index e644c1d41..25ffd5ace 100644 --- a/devices/p101/device.toml +++ b/devices/p101/device.toml @@ -11,3 +11,7 @@ apple_products = ["iPad3,4"] [match.dfu] chip = 0x8955 board = 0x00 + +[boot] +methods = ["ibss-m1n1"] +entries = ["pico-checkm8", "kdfu"] diff --git a/devices/p102/device.toml b/devices/p102/device.toml index 8f3280482..314e39f8b 100644 --- a/devices/p102/device.toml +++ b/devices/p102/device.toml @@ -11,3 +11,7 @@ apple_products = ["iPad3,5"] [match.dfu] chip = 0x8955 board = 0x02 + +[boot] +methods = ["ibss-m1n1"] +entries = ["pico-checkm8", "kdfu"] diff --git a/devices/p103/device.toml b/devices/p103/device.toml index 71695ec70..721ef3107 100644 --- a/devices/p103/device.toml +++ b/devices/p103/device.toml @@ -11,3 +11,7 @@ apple_products = ["iPad3,6"] [match.dfu] chip = 0x8955 board = 0x04 + +[boot] +methods = ["ibss-m1n1"] +entries = ["pico-checkm8", "kdfu"] diff --git a/devices/p105/README.md b/devices/p105/README.md index 29b567d08..4ffedfedb 100644 --- a/devices/p105/README.md +++ b/devices/p105/README.md @@ -68,7 +68,9 @@ disabled. See [the alignment check](../../docs/bring-up/p105-alignment.md). partition belongs to the iOS resize step, which does not exist yet. There is no boot partition: starting the installed system later needs the Cascadia bundle the install leaves on the host, placed for iOS's boot - chain. Starting any payload needs `orchard-launcher` (recovery-autogo). + chain. orchard starts a payload by the `ibss` route into the 32-bit m1n1 + (`ibss-m1n1`), which has not run on a P105 yet; `--boot autogo` starts it + with Cascadia's loader (recovery-autogo). - USB: the cold-handoff topic (#90) awaits a device boot of its exact revision, and the iPad 3 (J1) a regression boot of the shared PHY code; see [USB handoff](../../docs/bring-up/p105-usb-handoff.md). diff --git a/devices/p105/device.toml b/devices/p105/device.toml index cc21a027a..afbc234d9 100644 --- a/devices/p105/device.toml +++ b/devices/p105/device.toml @@ -13,10 +13,11 @@ chip = 0x8942 board = 0x0a [boot] -methods = ["jailbreak-kdfu", "recovery-autogo"] +methods = ["ibss-m1n1", "jailbreak-kdfu", "recovery-autogo"] entries = ["pico-checkm8", "kdfu"] -# Python's CLI consumes an owner-private boot manifest. orchard starts the board by its ibss boot -# route (routes.toml) with the public firmware keys in boot.json. +# orchard starts the board by its ibss boot route (routes.toml) into the 32-bit m1n1, with +# the public firmware keys in boot.json; Cascadia's autogo route (--boot autogo) stays as +# the fallback. [kernel] platform = "apple-armv7" # kernel/series/apple-armv7, kernel/configs/apple-armv7 diff --git a/devices/p106/device.toml b/devices/p106/device.toml index a566b5433..35a766257 100644 --- a/devices/p106/device.toml +++ b/devices/p106/device.toml @@ -11,3 +11,7 @@ apple_products = ["iPad2,6"] [match.dfu] chip = 0x8942 board = 0x0c + +[boot] +methods = ["ibss-m1n1"] +entries = ["pico-checkm8", "kdfu"] diff --git a/devices/p107/device.toml b/devices/p107/device.toml index 060ba038f..e1ab2cd11 100644 --- a/devices/p107/device.toml +++ b/devices/p107/device.toml @@ -11,3 +11,7 @@ apple_products = ["iPad2,7"] [match.dfu] chip = 0x8942 board = 0x0e + +[boot] +methods = ["ibss-m1n1"] +entries = ["pico-checkm8", "kdfu"] diff --git a/docs/bring-up/armv7-m1n1.md b/docs/bring-up/armv7-m1n1.md index 84d08324a..169fc7c31 100644 --- a/docs/bring-up/armv7-m1n1.md +++ b/docs/bring-up/armv7-m1n1.md @@ -8,8 +8,13 @@ m1n1 starts Linux, with the same USB proxy, boot entries and splash. Like the 64-bit m1n1 it is one binary for all its boards; what differs comes from the Apple device tree. -**Nothing here has run on a tablet.** apple-armv7 therefore still builds -the Cascadia loader too, and that route stays the comparison. +It is the first boot method of every 32-bit board (`ibss-m1n1`). On +2026-12-02 an iPhone 5 (N42, A6, iOS 8.4.1 12H321) booted Linux by it from +kDFU, with the loader of OrchardLinux/m1n1#17 (not yet in `upstream.lock`): +iBSS, patched iBEC, DeviceTree, m1n1 with Linux behind it, `bootx`; Linux's +USB gadget came up 14 seconds after `bootx`. No A5, A5X or A6X board has run +it yet. apple-armv7 still builds the Cascadia loader too, and that route +(`--boot autogo`) stays the fallback and the comparison. ## How it starts @@ -58,8 +63,10 @@ sends is byte for byte the one the earlier Python producer made; that the P105's patched iBSS and iBEC are byte for byte Project Cascadia's. The 64-bit build from the same source boots a J71b. -Not checked anywhere: the real iBEC hand-off, USB, the flash controller and -map loading inside m1n1, timing, A5X and A6 boards. +On an iPhone 5 (OrchardLinux/m1n1#17): the real iBEC hand-off from kDFU, and +Linux behind m1n1 up to its USB gadget. Not checked anywhere yet: the flash +controller and map loading inside m1n1, the Pico checkm8 entry, and the A5, +A5X and A6X boards. ## First device session (P105) diff --git a/docs/compatibility.md b/docs/compatibility.md index 27b5f6679..704a62722 100644 --- a/docs/compatibility.md +++ b/docs/compatibility.md @@ -105,24 +105,24 @@ Which A9 do I have? iOS doesn't show it. In DFU mode, `orchard install` names th | Chip | Device | Board | Product | Status | Install | Methods | Firmware | Device tree | boot.json build | | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | -| A5 | iPad 2 (Wi-Fi) | `k93` | iPad2,1 | known | – | recovery-autogo | – | – | 12H321 | -| A5 | iPad 2 (GSM) | `k94` | iPad2,2 | known | – | – | – | – | 12H321 | -| A5 | iPad 2 (CDMA) | `k95` | iPad2,3 | known | – | – | – | – | 12H321 | -| A5 | iPhone 4s | `n94` | iPhone4,1 | known | – | – | – | – | 12H321 | -| A5 | iPad 2 (Mid 2012) | `k93a` | iPad2,4 | known | – | – | – | – | 12H321 | -| A5 | iPad mini 1 (Wi-Fi) | `p105` | iPad2,5 | supported | yes | jailbreak-kdfu, recovery-autogo | yes | yes | 12H321 | -| A5 | iPad mini (GSM) | `p106` | iPad2,6 | known | – | – | – | – | 12H321 | -| A5 | iPad mini (Global) | `p107` | iPad2,7 | known | – | – | – | – | 12H321 | -| A5X | iPad 3 (Wi-Fi) | `j1` | iPad3,1 | supported | – | jailbreak-kdfu | yes | yes | 13G36 | -| A5X | iPad 3 (CDMA) | `j2` | iPad3,2 | known | – | – | – | – | 13G37 | -| A5X | iPad 3 (GSM) | `j2a` | iPad3,3 | known | – | – | – | – | 13G37 | -| A6 | iPhone 5 (GSM) | `n41` | iPhone5,1 | known | – | – | – | – | 14G61 | -| A6 | iPhone 5 (Global) | `n42` | iPhone5,2 | known | – | – | – | – | 14G61 | -| A6 | iPhone 5c (GSM) | `n48` | iPhone5,3 | known | – | – | – | – | 14G60 | -| A6 | iPhone 5c (Global) | `n49` | iPhone5,4 | known | – | – | – | – | 14G60 | -| A6X | iPad 4 (Wi-Fi) | `p101` | iPad3,4 | known | – | – | – | – | 14G60 | -| A6X | iPad 4 (GSM) | `p102` | iPad3,5 | known | – | – | – | – | 14G61 | -| A6X | iPad 4 (Global) | `p103` | iPad3,6 | known | – | – | – | – | 14G61 | +| A5 | iPad 2 (Wi-Fi) | `k93` | iPad2,1 | known | – | ibss-m1n1, recovery-autogo | – | – | 12H321 | +| A5 | iPad 2 (GSM) | `k94` | iPad2,2 | known | – | ibss-m1n1 | – | – | 12H321 | +| A5 | iPad 2 (CDMA) | `k95` | iPad2,3 | known | – | ibss-m1n1 | – | – | 12H321 | +| A5 | iPhone 4s | `n94` | iPhone4,1 | known | – | ibss-m1n1 | – | – | 12H321 | +| A5 | iPad 2 (Mid 2012) | `k93a` | iPad2,4 | known | – | ibss-m1n1 | – | – | 12H321 | +| A5 | iPad mini 1 (Wi-Fi) | `p105` | iPad2,5 | supported | yes | ibss-m1n1, jailbreak-kdfu, recovery-autogo | yes | yes | 12H321 | +| A5 | iPad mini (GSM) | `p106` | iPad2,6 | known | – | ibss-m1n1 | – | – | 12H321 | +| A5 | iPad mini (Global) | `p107` | iPad2,7 | known | – | ibss-m1n1 | – | – | 12H321 | +| A5X | iPad 3 (Wi-Fi) | `j1` | iPad3,1 | supported | – | ibss-m1n1, jailbreak-kdfu | yes | yes | 13G36 | +| A5X | iPad 3 (CDMA) | `j2` | iPad3,2 | known | – | ibss-m1n1 | – | – | 13G37 | +| A5X | iPad 3 (GSM) | `j2a` | iPad3,3 | known | – | ibss-m1n1 | – | – | 13G37 | +| A6 | iPhone 5 (GSM) | `n41` | iPhone5,1 | known | – | ibss-m1n1 | – | – | 14G61 | +| A6 | iPhone 5 (Global) | `n42` | iPhone5,2 | known | – | ibss-m1n1 | – | – | 14G61 | +| A6 | iPhone 5c (GSM) | `n48` | iPhone5,3 | known | – | ibss-m1n1 | – | – | 14G60 | +| A6 | iPhone 5c (Global) | `n49` | iPhone5,4 | known | – | ibss-m1n1 | – | – | 14G60 | +| A6X | iPad 4 (Wi-Fi) | `p101` | iPad3,4 | known | – | ibss-m1n1 | – | – | 14G60 | +| A6X | iPad 4 (GSM) | `p102` | iPad3,5 | known | – | ibss-m1n1 | – | – | 14G61 | +| A6X | iPad 4 (Global) | `p103` | iPad3,6 | known | – | ibss-m1n1 | – | – | 14G61 | | A7 | iPad Air (Wi-Fi) | `j71` | iPad4,1 | supported | yes | checkm8-pongo | yes | yes | 16H88 | | A7 | iPad Air (Cellular) | `j72` | iPad4,2 | supported | yes | checkm8-pongo | yes | yes | 16H81 | | A7 | iPad Air (China) | `j73` | iPad4,3 | supported | yes | checkm8-pongo | yes | yes | 16H88 | diff --git a/docs/devices/j1.md b/docs/devices/j1.md index ebf450b85..f1990c349 100644 --- a/docs/devices/j1.md +++ b/docs/devices/j1.md @@ -44,8 +44,8 @@ Driver: this board's device tree has not been read yet (`tools/catalog/generate ## Boot -- **Methods:** jailbreak-kdfu -- **Entries:** kdfu +- **Methods:** ibss-m1n1, jailbreak-kdfu +- **Entries:** pico-checkm8, kdfu - **Platform:** apple-armv7, –-byte pages - **Firmware recipe:** yes - **Device tree:** `s5l8945x-j1` diff --git a/docs/devices/p105.md b/docs/devices/p105.md index af34cfefb..c80584d7c 100644 --- a/docs/devices/p105.md +++ b/docs/devices/p105.md @@ -44,7 +44,7 @@ Driver: this board's device tree has not been read yet (`tools/catalog/generate ## Boot -- **Methods:** jailbreak-kdfu, recovery-autogo +- **Methods:** ibss-m1n1, jailbreak-kdfu, recovery-autogo - **Entries:** pico-checkm8, kdfu - **Platform:** apple-armv7, –-byte pages - **Firmware recipe:** yes diff --git a/docs/platforms-and-builds.md b/docs/platforms-and-builds.md index 3b2c0ecb3..95358773a 100644 --- a/docs/platforms-and-builds.md +++ b/docs/platforms-and-builds.md @@ -301,8 +301,8 @@ a newer kernel arrives with the next distro release or nightly. A **method** (`methods.toml`, `[boot] methods`) is the chain that runs once a device is entered: `checkm8-pongo` is Pongo, then m1n1, then Linux. An **entry** is how the -device gets there: `palera1n` and `checkra1n` both reach `checkm8-pongo`, and an iBSS -chain would have its own. `methods.toml` says which entries reach which method, and +device gets there: `palera1n` and `checkra1n` both reach `checkm8-pongo`, and `pico-checkm8` and +`kdfu` reach `ibss-m1n1` on the 32-bit boards. `methods.toml` says which entries reach which method, and `apple/entries.py` says how to run each one, because device data updates on its own and must not choose what gets executed. @@ -485,7 +485,31 @@ system's boot entries ([boot contract](boot-contract.md#kernel-packages)). and garbage (temporary directories), reports real sizes, and cleans only the last two. -## A5 boot (planned; record of how it works) +## 32-bit boot (A5 to A6X) + +Every 32-bit board boots the way the 64-bit ones do: (pwned or kDFU) DFU, +patched iBSS, patched iBEC, m1n1, Linux. That is the `ibss` boot route +(`routes.toml`) and the `ibss-m1n1` method (`methods.toml`), listed first on +every A5, A5X, A6 and A6X board: + +1. **Entry.** A boot ROM that checkm8 from a Raspberry Pi Pico entered (shown + as `PWND:[checkm8]`), or kDFU from a jailbroken iOS. +2. **Patched iBSS and iBEC**, Apple's own from the board's IPSW (`boot.json`) + with the open patcher's changes; nothing per board beyond the firmware + and its keys. +3. **Apple's DeviceTree** with `devicetree`, then **m1n1's 32-bit build** + (`m1n1-armv7.macho`, one binary for all of these boards) as the kernel, + started with `bootx`, as iBoot starts XNU. +4. **m1n1** starts Linux sent behind it, or a boot entry from the device's + boot partition, as on the 64-bit boards ([m1n1 on the 32-bit + boards](bring-up/armv7-m1n1.md)). + +An iPhone 5 (N42) booted Linux this way on 2026-12-02 from kDFU +(OrchardLinux/m1n1#17). Project Cascadia's chain below stays as the fallback +of the A5 boards (`recovery-autogo`, `--boot autogo`); the platform's `loader` +still names its payload format. + +### Cascadia's chain (fallback; record of how it works) Project Cascadia's chain, as shaynelegault ran it on a P105: diff --git a/methods.toml b/methods.toml index 2859f1fdc..f226689e6 100644 --- a/methods.toml +++ b/methods.toml @@ -2,8 +2,8 @@ # once the device is entered. `entries` are the ways to reach it; a board can name its # preferred ones in [boot] entries, and the first this Orchard implements is used. A method says # what it needs; a board's boot.json says which Apple files it uses them with. -# The code says which of these it implements (hardware.IMPLEMENTED_METHODS), so data -# can name a method newer than a CLI. Names may still change. +# The code says which of these it implements (IMPLEMENTED_METHODS in tools/catalog/generate), +# so data can name a method newer than a CLI. Names may still change. ["checkm8-pongo"] entries = ["palera1n", "checkra1n"] description = "checkm8 from DFU, PongoOS, then m1n1" @@ -11,6 +11,18 @@ boot_json = false stages = [] loader = "m1n1" +# The 32-bit boards' route to m1n1, the `ibss` boot route (routes.toml) on the A5 to A6X: +# from a boot ROM that checkm8 from a Pico entered, or from kDFU, Apple's iBSS and iBEC +# with the open patcher's changes, Apple's DeviceTree, then m1n1's 32-bit build +# (m1n1-armv7.macho) as the kernel, started with bootx. It needs no boot.json method +# data: only the board's IMG3 firmware and its keys. +["ibss-m1n1"] +entries = ["pico-checkm8", "kdfu"] +description = "Patched iBSS and iBEC, Apple's DeviceTree, then the 32-bit m1n1 with bootx" +boot_json = false +stages = ["iBSS", "iBEC"] +loader = "m1n1" + ["jailbreak-kdfu"] entries = ["kdfu"] description = "kDFU from a jailbroken iOS, then Cascadia's staging loader" @@ -18,6 +30,7 @@ boot_json = false stages = [] loader = "cascadia" +# Project Cascadia's route, kept as the fallback of the A5 boards (`--boot autogo`). ["recovery-autogo"] entries = ["pico-checkm8", "kdfu"] description = "Patched iBSS and iBEC with an autogo hook, then an ARM32 staging bundle" diff --git a/routes.toml b/routes.toml index d4d7439a0..4a7ac74e5 100644 --- a/routes.toml +++ b/routes.toml @@ -22,12 +22,13 @@ ends = "m1n1" fits = [{ chips = ["s5l8960x", "t7000", "t7001", "s8000", "s8001", "s8003", "t8010", "t8011", "t8015"] }] source = "https://checkra.in: iPhone 5s to iPhone X (A7 to A11)" -# On the A5 chips no tool of ours enters the boot ROM: the route starts from one that -# checkm8 from a Pico entered, or from kDFU. +# On the 32-bit chips (A5 to A6X) no tool of ours enters the boot ROM: the route starts +# from one that checkm8 from a Pico entered, or from kDFU, and ends in m1n1's 32-bit build +# (the `ibss-m1n1` method, methods.toml). [boot.ibss] ends = "m1n1" -fits = [{ chips = ["s5l8960x", "t7000", "t7001", "s8000", "s8001", "s8003", "t8010", "t8011", "t8015", "t8020", "t8027", "s5l8940x", "s5l8942x"] }] -source = "HoolockLinux/remote_boot@e254a58: gaster and a patched iBSS (and iBEC) on A7 to A11; rzxvx/Project-Cascadia@091d441 devices/a5: patched iBSS and iBEC, devicetree and bootx on A5" +fits = [{ chips = ["s5l8960x", "t7000", "t7001", "s8000", "s8001", "s8003", "t8010", "t8011", "t8015", "t8020", "t8027", "s5l8940x", "s5l8942x", "s5l8945x", "s5l8950x", "s5l8955x"] }] +source = "HoolockLinux/remote_boot@e254a58: gaster and a patched iBSS (and iBEC) on A7 to A11; rzxvx/Project-Cascadia@091d441 devices/a5: patched iBSS and iBEC, devicetree and bootx on A5; OrchardLinux/m1n1#17: kDFU, patched iBSS and iBEC, DeviceTree and the 32-bit m1n1 with bootx booted Linux on an iPhone 5 (A6, 2026-12-02)" [boot.autogo] ends = "cascadia" diff --git a/tests/test_routes.py b/tests/test_routes.py index 1b010f6a0..88579bfe5 100644 --- a/tests/test_routes.py +++ b/tests/test_routes.py @@ -37,6 +37,25 @@ def test_boot_routes_say_where_they_end(self): for name, route in self.routes['boot'].items(): self.assertIn(route['ends'], ('m1n1', 'cascadia'), name) + def test_every_32_bit_chip_boots_into_m1n1_first(self): + # One boot chain for every board: the ibss route into the 32-bit m1n1 + # is the first route of every ARMv7 chip, and every board on one lists + # its method first; Cascadia's autogo route stays a named fallback. + chips = [tomllib.loads(path.read_text()) for path in (ROOT / 'chips').glob('*.toml')] + arm = {chip['cpid']: chip['soc'] for chip in chips if chip['architecture'] == 'arm'} + self.assertTrue(arm) + for soc in sorted(arm.values()): + with self.subTest(chip=soc): + fitting = [name for name, route in self.routes['boot'].items() + if not route.get('named') and any(soc in fit['chips'] for fit in route['fits'])] + self.assertEqual(fitting[:1], ['ibss']) + self.assertTrue(self.routes['boot']['autogo']['named']) + for path in sorted((ROOT / 'devices').glob('*/device.toml')): + device = tomllib.loads(path.read_text()) + if device['match']['dfu']['chip'] in arm: + with self.subTest(board=path.parent.name): + self.assertEqual(device['boot']['methods'][0], 'ibss-m1n1') + def test_access_routes_need_an_ios_version(self): for name, route in self.routes['access'].items(): self.assertTrue(all(fit.get('ios') for fit in route['fits']), name) diff --git a/tools/catalog/generate b/tools/catalog/generate index 4d79bfbc7..778eb576a 100755 --- a/tools/catalog/generate +++ b/tools/catalog/generate @@ -60,7 +60,7 @@ HTTP_HOST, HTTPS_HOST = 'http://appldnld.apple.com/', 'https://secure-appldnld.a CATALOG_SCHEMA = 1 # a breaking data change publishes to a new catalog-vN # The boot methods the matrix counts as installable: `orchard install` boots each once it finds the device # prepared (checkm8 from the Mac, or the DFU a Pico stick, kDFU or usbliter8 left). -IMPLEMENTED_METHODS = {'checkm8-pongo', 'custom-dfu-recovery', 'recovery-autogo'} +IMPLEMENTED_METHODS = {'checkm8-pongo', 'custom-dfu-recovery', 'ibss-m1n1', 'recovery-autogo'} # Boards an open pull request adds; generating them here would conflict with it. IN_REVIEW = {} From 52131f56cc256abdde0e698b0e50b5af92df53d8 Mon Sep 17 00:00:00 2001 From: Henrik Klee Date: Wed, 2 Dec 2026 21:56:17 +0800 Subject: [PATCH 2/5] Docs: the 32-bit platform, boot chain to install 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 --- docs/bring-up/armv7-m1n1.md | 3 + docs/platforms-and-builds.md | 3 + docs/platforms/apple-armv7.md | 143 ++++++++++++++++++++++++++++++++++ 3 files changed, 149 insertions(+) create mode 100644 docs/platforms/apple-armv7.md diff --git a/docs/bring-up/armv7-m1n1.md b/docs/bring-up/armv7-m1n1.md index 169fc7c31..066f2a607 100644 --- a/docs/bring-up/armv7-m1n1.md +++ b/docs/bring-up/armv7-m1n1.md @@ -1,5 +1,8 @@ # m1n1 on the 32-bit boards +How the 32-bit platform works as a whole, boot chain to install, is in +[The 32-bit platform](../platforms/apple-armv7.md); this page is m1n1's part. + m1n1 has a 32-bit build for Apple's ARMv7 chips (A5, A5X, A6, A6X), from the same source as the 64-bit one ([OrchardLinux/m1n1](https://github.com/OrchardLinux/m1n1)). `boot/m1n1/build` makes it as `m1n1-armv7.macho` and the nightly publishes it. diff --git a/docs/platforms-and-builds.md b/docs/platforms-and-builds.md index 95358773a..2c690286d 100644 --- a/docs/platforms-and-builds.md +++ b/docs/platforms-and-builds.md @@ -487,6 +487,9 @@ system's boot entries ([boot contract](boot-contract.md#kernel-packages)). ## 32-bit boot (A5 to A6X) +The whole platform, boot to install, is described in +[The 32-bit platform](platforms/apple-armv7.md). + Every 32-bit board boots the way the 64-bit ones do: (pwned or kDFU) DFU, patched iBSS, patched iBEC, m1n1, Linux. That is the `ibss` boot route (`routes.toml`) and the `ibss-m1n1` method (`methods.toml`), listed first on diff --git a/docs/platforms/apple-armv7.md b/docs/platforms/apple-armv7.md new file mode 100644 index 000000000..d45bedaf6 --- /dev/null +++ b/docs/platforms/apple-armv7.md @@ -0,0 +1,143 @@ +# The 32-bit platform (apple-armv7) + +How Orchard starts and installs Linux on Apple's 32-bit iPhones and iPads, +and what of it runs today. Each section says which parts are **the design** +(how it is meant to work on every board) and which **work today** (seen on a +device). + +## What it is + +- **Chips:** A5 (S5L8940X, S5L8942X), A5X (S5L8945X), A6 (S5L8950X) and A6X + (S5L8955X), described in `chips/`. +- **Boards:** 18 boards in `devices/` run on these chips. The ones with + bring-up work are the iPad mini 1 (`p105`), iPad 3 (`j1`), iPad 2 (`k93`), + iPhone 5 (`n42`) and iPad 4 (`p103`). +- **One kernel** for all of them: the `armv7` branch of + [OrchardLinux/linux](https://github.com/OrchardLinux/linux), built as a + `zImage` with one device tree (DTB) per board + (`platforms/apple-armv7.toml`). +- **One loader:** m1n1's 32-bit build, `m1n1-armv7.macho`. It comes from the + same source as the 64-bit m1n1 ([boot/m1n1](../../boot/m1n1/README.md)). + What differs per board comes from Apple's device tree. + +## The boot chain + +The design gives every board the same chain, the one the 64-bit boards use. +Only the way into the first step differs: + +``` + entry: a boot ROM that takes unsigned images + Pico running checkm8 (standard) | kDFU from a jailbroken iOS (second) + | + v + patched iBSS -> patched iBEC -> Apple's DeviceTree -> m1n1 (32-bit), started with bootx + | + v + Linux: sent behind m1n1, or a boot entry from the boot partition +``` + +- **Entry.** The standard entry is a Raspberry Pi Pico plugged into the + device that runs checkm8 on its boot ROM. It plays the role usbliter8 plays + on the A12. `orchard devices` then shows the device as `pwned checkm8`. The + second entry is kDFU: a jailbroken iOS starts a patched iBSS with + `kloader`. kDFU has to be entered again before each boot. Over USB it looks + like plain DFU mode. +- **Patched iBSS and iBEC.** These are Apple's own files from the board's + IPSW (`devices//boot.json`) with the open patcher's changes. Nothing + else is per board: only the firmware and its keys. +- **DeviceTree, m1n1, bootx.** The iBEC takes Apple's DeviceTree, then m1n1 + as its kernel, and `bootx` starts m1n1 the way iBoot starts iOS. m1n1 then + starts Linux. + +In orchard's data this chain is the `ibss` boot route (`routes.toml`), which +fits all five chips, and the `ibss-m1n1` method (`methods.toml`), which every +board on them lists first. OrchardLinux/tools runs it (`orchard run`, +`install`, `launch`; tools `docs/run.md`). + +**Differences from the 64-bit boards, and why:** + +- **IMG3, not IMG4.** These chips' iBoot loads IMG3 images, so the iBSS and + iBEC are patched and wrapped as IMG3, with the keys from `boot.json` or + `--keys`. +- **iBEC and bootx, not Pongo or the monitor stub.** No checkm8 tool on the + computer reaches these chips, so there is no Pongo stage. The iBEC loads + m1n1 directly as its kernel. +- **No proxy upload yet.** The kernel goes to the device behind m1n1 in the + same upload. `--proxy` (sending it through m1n1's USB proxy afterwards) is + not available on these boards yet. + +**Works today:** on 2026-12-02 an iPhone 5 (`n42`) booted Linux by this +chain from kDFU (OrchardLinux/m1n1#17, still open). The A5, A5X and A6X +boards have not run it yet. The Pico entry has not run with m1n1 yet. + +## Storage and install + +- **The flash.** iOS keeps its data on raw NAND, behind Apple's flash + translation layer (SFTL), and divides it into partitions with LwVM. Linux + reads both: the disk is `applesftlN`, and its LwVM partitions show up as + ordinary partitions with their PARTUUIDs. +- **The design for every install:** the same as on every board. A boot + partition (XBOOTLDR, 512 MiB) holds the same boot entries m1n1 reads + everywhere, and the root sits next to it. Both go into free LwVM space. + Nothing of iOS is resized or touched, so the free space has to be there + already (tools `docs/install.md`). +- **Scattered partitions.** iOS can spread a partition over several separate + runs of flash. The kernel registers those partitions too, with their + PARTUUID, so `root=PARTUUID=` works as on every board, with no workaround + in the initrd (OrchardLinux/linux#89, open). +- **Writable today:** the 64 GB iPad mini 1. Writes, garbage collection and + later iOS boots were all checked on it + ([qualification](../bring-up/p105-sftl-device-qualification.md)). The 16 GB + iPad mini 1 is read-only, because SFTL does not model its writer yet. Its + reader is fixed for iOS 9's records (OrchardLinux/linux#87, merged). + `devices//device.toml` (`storage_read`, `storage_write`) has the + state of each board. + +## Watchdog + +The design: m1n1 can start the hardware watchdog and hand it, still running, +to Linux. Linux keeps it armed (60 s; `apple_wdt_timeout=` changes it) and +pets it until systemd takes over `/dev/watchdog`. This is turned on by chip +family once that family's kernel takes the watchdog over: A6 and A6X first, +A5 later. As a result: + +- **A hang restarts the device** on its own within the timeout, with no + button pressed. +- **Power off restarts into iOS.** These devices cannot cut their own power, + so power off and halt restart through the watchdog. + +**Works today:** on the iPhone 5 (OrchardLinux/m1n1#17). Linux took over the +handed-off watchdog, armed for 60 s and petted by the kernel. The kernel side +for every 32-bit board is OrchardLinux/linux#88 (open). m1n1's watchdog +options are off by default. + +## Cascadia's autogo route: a fallback only + +Project Cascadia's chain starts the same patched iBSS, then an iBEC with an +autogo hook that jumps straight into Cascadia's loader with the kernel +(`--autogo`, method `recovery-autogo`, `boot/cascadia`). It is not the +product path. It stays for two reasons: + +- **Fallback** on the A5 boards it is known to boot. +- **Split test:** both routes start the same iBSS and iBEC the same way. If + `--ibss` fails and `--autogo` boots, the fault is in m1n1 or its hand-off. + +It will be removed once the m1n1 route has run on those boards. The +platform's `loader = "cascadia"` still names that route's payload format +until then. + +## State per board today + +Only what the data and the linked PRs record: + +| Board | Chip | Booted by | By whom | What is proven | +|---|---|---|---|---| +| iPad mini 1 (`p105`) | A5 | kDFU or Pico, then Cascadia's autogo route | shaynelegault | From RAM: display, USB serial and network, flash read. 64 GB flash writes. 16 GB read-only. The m1n1 route has not run. | +| iPad 3 (`j1`) | A5X | kDFU (kloader from iOS 9.3.5), then Cascadia's staging loader | – | Linux from RAM with Cascadia's kit (`devices/j1/README.md`). No flash access. The m1n1 route has not run. | +| iPad 2 (`k93`) | A5 | – | – | Boot data only (`boot.json`, autogo addresses). | +| iPhone 5 (`n42`) | A6 | kDFU, then patched iBSS and iBEC into m1n1 | brkosebay | Linux from RAM through m1n1, and the watchdog handed over (OrchardLinux/m1n1#17). Board data is in orchard#395. | +| iPad 4 (`p103`) | A6X | – | – | Identity and boot data. Kernel groundwork in OrchardLinux/linux#80, not run yet. | + +Supported status and every feature of each board are in its +`devices//device.toml` and in the [compatibility +matrix](../compatibility.md). From 1a93c1054545c060ad08aaf739828fb5785812a5 Mon Sep 17 00:00:00 2001 From: Henrik Klee Date: Wed, 2 Dec 2026 22:02:16 +0800 Subject: [PATCH 3/5] 32-bit boards: public IMG3 keys for iBSS, iBEC and DeviceTree 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 --- devices/j1/boot.json | 20 ++++++++++++++++++++ devices/k93/boot.json | 6 ++++++ devices/k93a/boot.json | 20 ++++++++++++++++++++ devices/k94/boot.json | 20 ++++++++++++++++++++ devices/k95/boot.json | 20 ++++++++++++++++++++ devices/n94/boot.json | 20 ++++++++++++++++++++ devices/p105/boot.json | 6 ++++++ devices/p107/boot.json | 20 ++++++++++++++++++++ docs/platforms/apple-armv7.md | 16 ++++++++++++---- 9 files changed, 144 insertions(+), 4 deletions(-) diff --git a/devices/j1/boot.json b/devices/j1/boot.json index 18c7cd008..640480cb7 100644 --- a/devices/j1/boot.json +++ b/devices/j1/boot.json @@ -11,6 +11,26 @@ "sha256": "ceec5670fe63f113b766a09b189c50a31e96e4c538905076216fb21170385c95" }, "selected_by": "newest", + "keys": { + "Firmware/dfu/iBSS.j1.RELEASE.dfu": { + "kind": "img3", + "iv": "7ced82eb8778ca7547610a10414463db", + "key": "f18b2d640ac277c41ffd1c611cca7af7f2fc87932980d737cb1701b1c7ff9162", + "source": "api.ipsw.me v4 keys (13G36, public firmware keys); checked 2026-12-02 by decrypting this member (iBoot-2817.60.2)" + }, + "Firmware/dfu/iBEC.j1.RELEASE.dfu": { + "kind": "img3", + "iv": "578ef2d32e6a31b68c696d1343592a94", + "key": "c35d7184d6b1c5cfc3eb3dc7a74c125b36419c529a69fd6114418d3bad1dc9c9", + "source": "api.ipsw.me v4 keys (13G36, public firmware keys); checked 2026-12-02 by decrypting this member (iBoot-2817.60.2)" + }, + "Firmware/all_flash/all_flash.j1ap.production/DeviceTree.j1ap.img3": { + "kind": "img3", + "iv": "db4ef0605f0ab89b2e59de4f871213b4", + "key": "05c43a2bac2adb83d0a1ced2a9b068c21fbdf5386aab42d0bdebec18dbb65ea8", + "source": "api.ipsw.me v4 keys (13G36, public firmware keys); checked 2026-12-02 by decrypting this member (model iPad3,1)" + } + }, "inputs": { "BuildManifest.plist": { "ipsw": { diff --git a/devices/k93/boot.json b/devices/k93/boot.json index 0dc937635..8255ef4c2 100644 --- a/devices/k93/boot.json +++ b/devices/k93/boot.json @@ -23,6 +23,12 @@ "iv": "83220a369c9525f3febb3edd331c65fb", "key": "179027ef30b5008882d6dbd723ceb50c39cba40bb33ba620b71bcbc53ff2d424", "source": "rzxvx/Project-Cascadia@091d441f19e101699f7e1835a80ccb48d6e54eec devices/a5/tools/k93-extract-firmware.py (public firmware keys)" + }, + "Firmware/all_flash/all_flash.k93ap.production/DeviceTree.k93ap.img3": { + "kind": "img3", + "iv": "5bffad9ad82108c5ae3d38150dc56aea", + "key": "12433a4c85ec86ac6e14884f01661e2c5de43adee0323d1e88d4edd8d1ae9fda", + "source": "api.ipsw.me v4 keys (12H321, public firmware keys); checked 2026-12-02 by decrypting this member (model iPad2,1)" } }, "inputs": { diff --git a/devices/k93a/boot.json b/devices/k93a/boot.json index 1ca07c4f1..0d5c44e16 100644 --- a/devices/k93a/boot.json +++ b/devices/k93a/boot.json @@ -11,6 +11,26 @@ "sha256": "82b2571f7433fec6d90d32cf98ee955aeb2e5a1e764da229cc3fdb0f621925a0" }, "selected_by": "chip-reference", + "keys": { + "Firmware/dfu/iBSS.k93a.RELEASE.dfu": { + "kind": "img3", + "iv": "976aa656929ac699fff36715de96876d", + "key": "5fe5c47b5620c2b40b1ca2bd1764a92d568901a24e1caf8faf0cf0f84ae11b4e", + "source": "api.ipsw.me v4 keys (12H321, public firmware keys); checked 2026-12-02 by decrypting this member (iBoot-2261.30.37)" + }, + "Firmware/dfu/iBEC.k93a.RELEASE.dfu": { + "kind": "img3", + "iv": "27a1dedaf83ccb53088fd9fb82974062", + "key": "019947f0da4258ce36c0fd1b2f3d61fc7add1fd9065cb96be24f86c322832cda", + "source": "api.ipsw.me v4 keys (12H321, public firmware keys); checked 2026-12-02 by decrypting this member (iBoot-2261.30.37)" + }, + "Firmware/all_flash/all_flash.k93aap.production/DeviceTree.k93aap.img3": { + "kind": "img3", + "iv": "dd6d2ee190455770e5bb930db280e42d", + "key": "db9945495d24e808cfe305a9a062b28f6c341e4577018482d3f51f7d19057443", + "source": "api.ipsw.me v4 keys (12H321, public firmware keys); checked 2026-12-02 by decrypting this member (model iPad2,4)" + } + }, "inputs": { "BuildManifest.plist": { "ipsw": { diff --git a/devices/k94/boot.json b/devices/k94/boot.json index 63d980df7..44bff8edc 100644 --- a/devices/k94/boot.json +++ b/devices/k94/boot.json @@ -11,6 +11,26 @@ "sha256": "cf35fb32d8a08e7794ced086bd7a899791372391ccea2d4b7888453e591636ef" }, "selected_by": "chip-reference", + "keys": { + "Firmware/dfu/iBSS.k94.RELEASE.dfu": { + "kind": "img3", + "iv": "883c92ed915e4d2481570a062583495b", + "key": "ccfadf3732904885d38f963cce035d7e03b387b67212d526503c85773b58e52f", + "source": "api.ipsw.me v4 keys (12H321, public firmware keys); checked 2026-12-02 by decrypting this member (iBoot-2261.30.37)" + }, + "Firmware/dfu/iBEC.k94.RELEASE.dfu": { + "kind": "img3", + "iv": "57fba54b264b0911d3329de2231bd4b8", + "key": "e7677abd8b4cef14f9f75e02dec7fdbb0cc1ecc0707fb51367a783e4eeea731e", + "source": "api.ipsw.me v4 keys (12H321, public firmware keys); checked 2026-12-02 by decrypting this member (iBoot-2261.30.37)" + }, + "Firmware/all_flash/all_flash.k94ap.production/DeviceTree.k94ap.img3": { + "kind": "img3", + "iv": "31eafb5f2872333f49c391407533b913", + "key": "2340ba7b12093ebe1c4f9ad6adefb78b8aa5df718f63f4671dbc882cc657abfe", + "source": "api.ipsw.me v4 keys (12H321, public firmware keys); checked 2026-12-02 by decrypting this member (model iPad2,2)" + } + }, "inputs": { "BuildManifest.plist": { "ipsw": { diff --git a/devices/k95/boot.json b/devices/k95/boot.json index abe040a90..1b264c838 100644 --- a/devices/k95/boot.json +++ b/devices/k95/boot.json @@ -11,6 +11,26 @@ "sha256": "83912c77f2d2f242076c46be019358e8acb60c6a3cfab2719444c916bacda79a" }, "selected_by": "chip-reference", + "keys": { + "Firmware/dfu/iBSS.k95.RELEASE.dfu": { + "kind": "img3", + "iv": "460116385cca6d5596221c58ae122669", + "key": "7852f1fd93d9d49ebea44021081e8f1dffa336d0d3e9517374f8be451dd92eb7", + "source": "api.ipsw.me v4 keys (12H321, public firmware keys); checked 2026-12-02 by decrypting this member (iBoot-2261.30.37)" + }, + "Firmware/dfu/iBEC.k95.RELEASE.dfu": { + "kind": "img3", + "iv": "2cec1c5aa4a6fbc8630ef22a668271c0", + "key": "0f8e5042b574f246016c04b904dce329fcf0adcc08d23357058d9e5bd5e586e1", + "source": "api.ipsw.me v4 keys (12H321, public firmware keys); checked 2026-12-02 by decrypting this member (iBoot-2261.30.37)" + }, + "Firmware/all_flash/all_flash.k95ap.production/DeviceTree.k95ap.img3": { + "kind": "img3", + "iv": "9f1dd056d28cb0afd775a31910ecbc35", + "key": "2aeb4fa57f51a2246b1521cc81f18ceef7205e75de9610d60044c701858560ea", + "source": "api.ipsw.me v4 keys (12H321, public firmware keys); checked 2026-12-02 by decrypting this member (model iPad2,3)" + } + }, "inputs": { "BuildManifest.plist": { "ipsw": { diff --git a/devices/n94/boot.json b/devices/n94/boot.json index f605b2999..33ac98b5e 100644 --- a/devices/n94/boot.json +++ b/devices/n94/boot.json @@ -11,6 +11,26 @@ "sha256": "68a5f724ec43b020caec7e83768252727173f0c180f12ee3d6ba8fc8aa90b27a" }, "selected_by": "chip-reference", + "keys": { + "Firmware/dfu/iBSS.n94.RELEASE.dfu": { + "kind": "img3", + "iv": "147cdef921ed14a5c10631c5e6e02d1e", + "key": "6ea1eb62a9f403ee212c1f6b3039df093963b46739c6093407190fe3d750c69c", + "source": "api.ipsw.me v4 keys (12H321, public firmware keys); checked 2026-12-02 by decrypting this member (iBoot-2261.30.37)" + }, + "Firmware/dfu/iBEC.n94.RELEASE.dfu": { + "kind": "img3", + "iv": "b9f99de35e106350d89af30482249df3", + "key": "03d3ecffe7df8729a85df6eafc96ee78bead7822f63ebab21016ac4157dee793", + "source": "api.ipsw.me v4 keys (12H321, public firmware keys); checked 2026-12-02 by decrypting this member (iBoot-2261.30.37)" + }, + "Firmware/all_flash/all_flash.n94ap.production/DeviceTree.n94ap.img3": { + "kind": "img3", + "iv": "70860c7ffbd16f51b4ac998eda7db70d", + "key": "ca597a5833a96eafcf4316790a25f37fb2593b2da170b0c5e855c4fab93c2469", + "source": "api.ipsw.me v4 keys (12H321, public firmware keys); checked 2026-12-02 by decrypting this member (model iPhone4,1)" + } + }, "inputs": { "BuildManifest.plist": { "ipsw": { diff --git a/devices/p105/boot.json b/devices/p105/boot.json index 0dae2ad95..dc5c92687 100644 --- a/devices/p105/boot.json +++ b/devices/p105/boot.json @@ -23,6 +23,12 @@ "iv": "8460cab6348e74ba7134ba0f9462b632", "key": "485ddb5f7e70cecfc25c036f812641b9e55bd97783de1488306e3a80abf6950b", "source": "rzxvx/Project-Cascadia@091d441f19e101699f7e1835a80ccb48d6e54eec devices/a5/scripts/build-firmware.sh (public community firmware keys)" + }, + "Firmware/all_flash/all_flash.p105ap.production/DeviceTree.p105ap.img3": { + "kind": "img3", + "iv": "c9c12cfe3a16823f1d678775c7aedc88", + "key": "050f2457801615132e7455b622c8c8dfb65f09d4ff1eb86b5c0a1160678117c2", + "source": "api.ipsw.me v4 keys (12H321, public firmware keys); checked 2026-12-02 by decrypting this member (model iPad2,5)" } }, "inputs": { diff --git a/devices/p107/boot.json b/devices/p107/boot.json index ab693f0ee..61cde7612 100644 --- a/devices/p107/boot.json +++ b/devices/p107/boot.json @@ -11,6 +11,26 @@ "sha256": "5d5506635af7aa15ea47f2731f5dbd8c4ebebe0d71a413f3b866ff58d796fc5a" }, "selected_by": "chip-reference", + "keys": { + "Firmware/dfu/iBSS.p107.RELEASE.dfu": { + "kind": "img3", + "iv": "fa39c596b6569e572d90f0820e4e4357", + "key": "34b359fcc729a0f0d2853e786a78b245ed36a9212c8296aaab95dc0401cf07de", + "source": "api.ipsw.me v4 keys (12H321, public firmware keys); checked 2026-12-02 by decrypting this member (iBoot-2261.30.37)" + }, + "Firmware/dfu/iBEC.p107.RELEASE.dfu": { + "kind": "img3", + "iv": "6569eed96df512cc8e8807a50fe79270", + "key": "23c2d76e12dbef7c2a107d8733b96dc79cbbb353bf649cdc7fea63c91904f623", + "source": "api.ipsw.me v4 keys (12H321, public firmware keys); checked 2026-12-02 by decrypting this member (iBoot-2261.30.37)" + }, + "Firmware/all_flash/all_flash.p107ap.production/DeviceTree.p107ap.img3": { + "kind": "img3", + "iv": "ade3c16e5919c6a820d631c95da3fae2", + "key": "7faab4991cefdea2b460305e45c1557d4dddd072ddf492a8f756e5ece156f238", + "source": "api.ipsw.me v4 keys (12H321, public firmware keys); checked 2026-12-02 by decrypting this member (model iPad2,7)" + } + }, "inputs": { "BuildManifest.plist": { "ipsw": { diff --git a/docs/platforms/apple-armv7.md b/docs/platforms/apple-armv7.md index d45bedaf6..24bf837c6 100644 --- a/docs/platforms/apple-armv7.md +++ b/docs/platforms/apple-armv7.md @@ -16,9 +16,11 @@ device). [OrchardLinux/linux](https://github.com/OrchardLinux/linux), built as a `zImage` with one device tree (DTB) per board (`platforms/apple-armv7.toml`). -- **One loader:** m1n1's 32-bit build, `m1n1-armv7.macho`. It comes from the - same source as the 64-bit m1n1 ([boot/m1n1](../../boot/m1n1/README.md)). - What differs per board comes from Apple's device tree. +- **One loader:** m1n1's 32-bit build, `m1n1-armv7.macho`, the same file for + every board. It comes from the same source as the 64-bit m1n1 + ([boot/m1n1](../../boot/m1n1/README.md)). What differs per board comes from + Apple's device tree, and m1n1 is to pick board settings such as the + watchdog's at run time. Orchard builds no per-board m1n1. ## The boot chain @@ -44,7 +46,13 @@ Only the way into the first step differs: like plain DFU mode. - **Patched iBSS and iBEC.** These are Apple's own files from the board's IPSW (`devices//boot.json`) with the open patcher's changes. Nothing - else is per board: only the firmware and its keys. + else is per board: only the firmware and its keys. The public keys for the + iBSS, iBEC and DeviceTree are in `boot.json` (`firmware[].keys`), each + checked by decrypting the file. From kDFU the iBEC only takes a decrypted + DeviceTree, so the route needs that key there. iOS 10's images for the A6 + and A6X are not encrypted and need no keys. The iPad mini (GSM, `p106`) + and the iPad 3 (CDMA, GSM; `j2`, `j2a`) have no public keys for the firmware + they select, so they need `--keys FILE` for now. - **DeviceTree, m1n1, bootx.** The iBEC takes Apple's DeviceTree, then m1n1 as its kernel, and `bootx` starts m1n1 the way iBoot starts iOS. m1n1 then starts Linux. From a192c3302c68554d4ce912617b152acf7219fc52 Mon Sep 17 00:00:00 2001 From: Henrik Klee Date: Wed, 2 Dec 2026 22:04:04 +0800 Subject: [PATCH 4/5] m1n1: the 32-bit build boots the iPhone 5 and starts every A5 to A6X 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 --- boot/m1n1/upstream.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/boot/m1n1/upstream.lock b/boot/m1n1/upstream.lock index 16549ae6a..e256abc29 100644 --- a/boot/m1n1/upstream.lock +++ b/boot/m1n1/upstream.lock @@ -1,2 +1,2 @@ url=https://github.com/OrchardLinux/m1n1.git -commit=1e53a9f97d8ce3e71be3024729035da26fc6b95e +commit=ddd6f7244d1b2c895d0961329bc2f8f375642754 From 1794622ae76ba8666d05833dfdebb754971956e3 Mon Sep 17 00:00:00 2001 From: Henrik Klee Date: Wed, 2 Dec 2026 22:04:18 +0800 Subject: [PATCH 5/5] Docs: m1n1#17 is in the m1n1 orchard builds Assisted-by: LLM --- CHANGELOG.md | 6 +++--- docs/bring-up/armv7-m1n1.md | 2 +- docs/platforms/apple-armv7.md | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 42a1e106c..08df15cf8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,9 +20,9 @@ is missing or empty. 64-bit ones: from DFU mode a Pico entered, or from kDFU, through Apple's patched iBSS and iBEC into m1n1, which starts Linux. The iPad 3, iPad 4, iPhone 4s, iPhone 5 and 5c and the remaining iPad 2 and iPad mini models - get this route too. An iPhone 5 has booted Linux this way with m1n1 - changes still in review; the A5, A5X and A6X boards have not run it yet. Cascadia's loader stays as the A5 fallback - (`--boot autogo`). + get this route too, and the m1n1 it starts now boots the iPhone 5. An + iPhone 5 has booted Linux this way; the A5, A5X and A6X boards have not + run it yet. Cascadia's loader stays as the A5 fallback (`--boot autogo`). ## [0.3.20] - 2026-12-02 diff --git a/docs/bring-up/armv7-m1n1.md b/docs/bring-up/armv7-m1n1.md index 066f2a607..a5ad2751b 100644 --- a/docs/bring-up/armv7-m1n1.md +++ b/docs/bring-up/armv7-m1n1.md @@ -13,7 +13,7 @@ Apple device tree. It is the first boot method of every 32-bit board (`ibss-m1n1`). On 2026-12-02 an iPhone 5 (N42, A6, iOS 8.4.1 12H321) booted Linux by it from -kDFU, with the loader of OrchardLinux/m1n1#17 (not yet in `upstream.lock`): +kDFU, with the loader of OrchardLinux/m1n1#17, which `upstream.lock` now names: iBSS, patched iBEC, DeviceTree, m1n1 with Linux behind it, `bootx`; Linux's USB gadget came up 14 seconds after `bootx`. No A5, A5X or A6X board has run it yet. apple-armv7 still builds the Cascadia loader too, and that route diff --git a/docs/platforms/apple-armv7.md b/docs/platforms/apple-armv7.md index 24bf837c6..3ad7e346c 100644 --- a/docs/platforms/apple-armv7.md +++ b/docs/platforms/apple-armv7.md @@ -75,7 +75,7 @@ board on them lists first. OrchardLinux/tools runs it (`orchard run`, not available on these boards yet. **Works today:** on 2026-12-02 an iPhone 5 (`n42`) booted Linux by this -chain from kDFU (OrchardLinux/m1n1#17, still open). The A5, A5X and A6X +chain from kDFU (OrchardLinux/m1n1#17, in the m1n1 orchard builds). The A5, A5X and A6X boards have not run it yet. The Pico entry has not run with m1n1 yet. ## Storage and install