Skip to content

Describe the iPhone 5 (N42) and its 12H321 firmware recipes - #395

Merged
henrikklee merged 21 commits into
OrchardLinux:mainfrom
brkosebay:submit/n42-board
Dec 2, 2026
Merged

henrikklee merged 21 commits into
OrchardLinux:mainfrom
brkosebay:submit/n42-board

Conversation

@brkosebay

@brkosebay brkosebay commented Dec 1, 2026 •

Copy link
Copy Markdown
Contributor

Adds the iPhone 5 (Global, N42, iPhone5,2) as a board on the 32-bit platform (apple-armv7), with its firmware recipes for iOS 8.4.1 (12H321).

What changes for users

  • Boot. The iPhone 5 starts the same way as every 32-bit board: the shared ibss route and its ibss-m1n1 method (orchard#443). Entered from a Pico's checkm8 or from kDFU, the device runs a patched iBSS and iBEC, then Apple's DeviceTree, then the 32-bit m1n1 started with bootx. It has no route of its own.
  • One m1n1. The phone uses the shared m1n1-armv7.macho, the same file every 32-bit board uses. m1n1#17's N42 support is in it. This PR adds no per-board m1n1 builds; m1n1 is to pick its watchdog settings at run time later.
  • Firmware and keys. boot.json selects 12H321 and holds the public IMG3 keys for its iBSS, iBEC and DeviceTree. Each key was checked by decrypting the file from Apple's IPSW (iBoot-2261.30.37; the DeviceTree's model is iPhone5,2). firmware.json makes the peripheral firmware: multitouch, Wi-Fi, Bluetooth and the SGX event template. All of it comes from the user's own IPSW; none is distributed.
  • What works with orchard's kernel today. Orchard builds OrchardLinux/linux armv7. That branch has the A6, the iPhone 5's device tree, both cores, the framebuffer, the USB gadget (serial and network) and the watchdog (linux#88). These are marked working.
  • Evidence. On 2026-12-02 an iPhone 5 on iOS 8.4.1 booted Linux by this chain from kDFU (arm32: Boot the Apple A6 iPhone 5 m1n1#17).

What else is in it

  • chips/s5l8950x.toml: reference version 8.4.1 and its evidence.
  • The release ships methods.toml in its board data, both in the release producer and in the CLI's list.
  • The firmware recipe schema gets hash-pinned byte ranges, used for the SGX event template.
  • The installer puts the SGX event template where Mesa reads it.
  • The kernel lock and config are unchanged. The armv7 lock moves in its own PR with tools/kernel-tree/take. CONFIG_MTD_APPLE_SFTL_N42_WRITE belongs in the armv7 defconfig, together with the N42 NAND writer (linux#69).

Merge order

After the armv7 kernel-lock PR. Main's current armv7 lock has no N42 device tree yet.

Maintainer commits on top of Berkay's: merges of main and of #443, the shared route and m1n1, the keys, and the features aligned with the kernel orchard builds. Berkay's own commits are unchanged.

Assisted-by: LLM
Signed-off-by: Berkay Kösebay <brkosebay@users.noreply.github.com>
brkosebay and others added 8 commits December 1, 2026 22:28
Select the ARMv7 component from the N42 m1n1 review head. Keep the production watchdog loader alongside the generic loader in releases. The local diagnostic enables visible stages and per-stage PRAM records for a bare proxy flight.

Assisted-by: LLM
Signed-off-by: Berkay Kösebay <brkosebay@users.noreply.github.com>
Assisted-by: LLM
Signed-off-by: Berkay Kösebay <brkosebay@users.noreply.github.com>
Assisted-by: LLM
Signed-off-by: Berkay Kösebay <brkosebay@users.noreply.github.com>
Assisted-by: LLM
Signed-off-by: Berkay Kösebay <brkosebay@users.noreply.github.com>
Assisted-by: LLM
Signed-off-by: Berkay Kösebay <brkosebay@users.noreply.github.com>
Assisted-by: LLM
Signed-off-by: Berkay Kösebay <brkosebay@users.noreply.github.com>
Assisted-by: LLM
Signed-off-by: Berkay Kösebay <brkosebay@users.noreply.github.com>
The kernel and m1n1 locks keep this branch's commits, which contain
main's.

Assisted-by: LLM
The iPhone 5 takes the shared method of every 32-bit board (orchard#443)
in place of its own jailbreak-kdfu-m1n1: the same ibss route, entered
from a Pico's checkm8 or from kDFU. routes.toml and methods.toml are the
route branch's; the N42 is installable by the matrix's rules now.

Assisted-by: LLM
producers/platforms_index.py puts methods.toml into board-data.tar.gz;
src/orchard/hardware.py lists the same files.

Assisted-by: LLM
Every 32-bit board starts the same m1n1-armv7.macho. The N42 watchdog and
diagnostic builds, their release files and index entries go; m1n1 is to
pick its watchdog settings at run time instead. The -g0 builds and
methods.toml in the board data stay.

Assisted-by: LLM
From api.ipsw.me, each checked by decrypting the IPSW member
(iBoot-2261.30.37; DeviceTree model iPhone5,2).

Assisted-by: LLM
@henrikklee
henrikklee marked this pull request as ready for review December 2, 2026 14:08
The N42 board data no longer moves the armv7 kernel by hand: the lock
pointed at an unmerged OrchardLinux/linux commit and the config was not
what that commit's defconfig gives, so the platform build refused it.
The lock moves to the merged armv7 tip in its own pull request, with
tools/kernel-tree/take. CONFIG_MTD_APPLE_SFTL_N42_WRITE belongs in the
armv7 defconfig with the N42 NAND writer (OrchardLinux/linux#69).

Assisted-by: LLM
Orchard builds OrchardLinux/linux armv7, which has the A6, the iPhone 5's
device tree, both cores, the framebuffer, the USB gadget and the
watchdog (linux#88). Those keep their states. What the open kernel PRs
bring (flash, touch, buttons, backlight, Wi-Fi, Bluetooth, battery,
charging, GPU, gyroscope, cameras) is missing until that PR is in armv7,
each with the PR named, so the matrix shows no N42 install yet.

Assisted-by: LLM
@henrikklee
henrikklee merged commit 8ad69f9 into OrchardLinux:main Dec 2, 2026
11 checks passed
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