diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7eff0c6d5..a153cb80c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -268,12 +268,8 @@ jobs: PY release=$(cat "$stage/kernel.release") test -s "$stage/lib/modules/$release/modules.dep" - # p105_capture comes from the kernel tree once the armv7 lock names a - # commit that has it; the config copy then builds it as a module. - if grep -qx 'CONFIG_MTD_APPLE_H2FMI_P105_CAPTURE=m' kernel/configs/apple-armv7/config; then - test -s "$stage/lib/modules/$release/kernel/drivers/mtd/devices/p105_capture.ko" - modprobe -d "$stage" -S "$release" --show-depends p105_capture - fi + test -s "$stage/lib/modules/$release/kernel/drivers/mtd/devices/p105_capture.ko" + modprobe -d "$stage" -S "$release" --show-depends p105_capture test -s "$stage/lib/modules/$release/extra/p105_map_audit.ko" - uses: actions/upload-artifact@v4 if: steps.p105_capture.outcome == 'success' diff --git a/CHANGELOG.md b/CHANGELOG.md index 08df15cf8..10b40d7b4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -24,6 +24,20 @@ is missing or empty. 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`). +### Devices + +- Every 32-bit iPhone and iPad (A5, A5X, A6, A6X): a hung system restarts + the device on its own within 60 s, and power off restarts into iOS + instead of sitting there. Linux takes over the watchdog m1n1 hands it. + A Linux partition that iOS scattered over the flash now gets its PARTUUID + (on a read-only disk), so the root is found the usual way. Booted with + the watchdog on the iPhone 5 only so far. +- iPhone 5: the kernel Orchard builds runs both CPU cores, USB serial and + network, and restart. +- iPad mini 1 (16 GB): Linux no longer refuses the flash after iOS has + written to it (6 of 6 cold boots read it). Its images carry the raw flash + capture module (`p105_capture`) again, now built from the kernel. + ## [0.3.20] - 2026-12-02 ### Devices diff --git a/devices/p105/README.md b/devices/p105/README.md index e21769098..ef0c8f63f 100644 --- a/devices/p105/README.md +++ b/devices/p105/README.md @@ -80,9 +80,13 @@ disabled. See [the alignment check](../../docs/bring-up/p105-alignment.md). - Storage: the NAND driver (OrchardLinux/orchard#86, #87), the iOS disk translation layer and its append writes (#89, #91) are in OrchardLinux/linux `armv7` (`drivers/mtd`); the disk is `applesftlN`: read and write on - the 64 GB model, read-only on the 16 GB model. The merged 16 GB reader - refuses the disk (-EBADMSG, -74) on many boots after iOS has written to it - (the loop of 2026-12-01: 9 of 13 boots refused); the fix is pending. Reclamation (#93) is unfinished: until it lands, writes stop once + the 64 GB model, read-only on the 16 GB model. The 16 GB reader used to + refuse the disk (-EBADMSG, -74) on many boots after iOS had written to it + (the loop of 2026-12-01: 9 of 13 boots refused); it now accepts iOS 9's + flag-1 records (OrchardLinux/linux#87: 6 of 6 cold boots read the flash). A + Linux partition iOS scattered over the flash gets its PARTUUID on the + read-only disk `applesftl0lwvm` (OrchardLinux/linux#89, not booted yet), so + the `dm-mod.create` table is no longer needed. Reclamation (#93) is unfinished: until it lands, writes stop once the blank flash blocks are used up. - Installing: `orchard install` writes a root into an existing Linux LwVM partition (the shared initrd finds it by its LwVM GUID); creating that diff --git a/devices/p105/device.toml b/devices/p105/device.toml index 5075d8e0a..ff4aa238a 100644 --- a/devices/p105/device.toml +++ b/devices/p105/device.toml @@ -71,10 +71,11 @@ touch_id = "missing" # A 64 MiB file written through SFTL survived fresh Linux recovery and two # iOS boots with an unchanged SHA-256. The 16 GB P105 reads its disk # (applesftl0, read-only: no writer is modelled) and ran Omarchy A from it -# through dm-linear on 2026-11-30 (linux#33). The merged 16 GB reader refuses the -# disk (-EBADMSG, -74) on many boots after iOS has written to it (the loop of -# 2026-12-01: 9 of 13 boots refused); a fix is pending. storage_read stays -# "working" on the 64 GB evidence. +# through dm-linear on 2026-11-30 (linux#33). The 16 GB reader refused the +# disk (-EBADMSG, -74) on many boots after iOS had written to it (the loop of +# 2026-12-01: 9 of 13 boots refused); with linux#87 it accepts iOS 9's flag-1 +# records, and 6 of 6 cold boots read the flash. storage_read stays "working" +# on the 64 GB evidence. storage_read = "working" # Qualified on the 64 GB model only (the SFTL writer above). The 16 GB package # (4 dies x 1064 blocks) mounts read-only: its layout is not modelled for diff --git a/docs/devices/p105.md b/docs/devices/p105.md index b9b4a0e12..a21fa28a4 100644 --- a/docs/devices/p105.md +++ b/docs/devices/p105.md @@ -23,7 +23,7 @@ Driver: this board's device tree has not been read yet (`tools/catalog/generate - ❌ **Gyroscope** - ❌ **Light sensor** - ❌ **Touch ID** -- ✅ **Internal storage read**: On the 64 GB P105, the whole logical disk matched an independent reconstruction from raw flash captured during the same boot. A 64 MiB file written through SFTL survived fresh Linux recovery and two iOS boots with an unchanged SHA-256. The 16 GB P105 reads its disk (applesftl0, read-only: no writer is modelled) and ran Omarchy A from it through dm-linear on 2026-11-30 (linux#33). The merged 16 GB reader refuses the disk (-EBADMSG, -74) on many boots after iOS has written to it (the loop of 2026-12-01: 9 of 13 boots refused); a fix is pending. storage_read stays "working" on the 64 GB evidence. +- ✅ **Internal storage read**: On the 64 GB P105, the whole logical disk matched an independent reconstruction from raw flash captured during the same boot. A 64 MiB file written through SFTL survived fresh Linux recovery and two iOS boots with an unchanged SHA-256. The 16 GB P105 reads its disk (applesftl0, read-only: no writer is modelled) and ran Omarchy A from it through dm-linear on 2026-11-30 (linux#33). The 16 GB reader refused the disk (-EBADMSG, -74) on many boots after iOS had written to it (the loop of 2026-12-01: 9 of 13 boots refused); with linux#87 it accepts iOS 9's flag-1 records, and 6 of 6 cold boots read the flash. storage_read stays "working" on the 64 GB evidence. - 🤔 **Internal storage write**: Qualified on the 64 GB model only (the SFTL writer above). The 16 GB package (4 dies x 1064 blocks) mounts read-only: its layout is not modelled for writing, as the kernel says at boot ("read-only"). Seen on a 16 GB iPad mini 1, 2026-11-30. "untested" is for the 16 GB model; see README.md. - ✅ **Wi-Fi**: 2026-11-30, 16 GB P105: joined a WPA2 network, DHCP and NTP worked, the saved profile reconnected on a later boot. An intermittent HSIC re-enumeration race can leave wlan0 missing after boot until the EHCI controller is rebound. The race was seen on 1 of about 8 boots; a candidate fix is not merged. - 🤔 **Bluetooth input devices**: Only a Bluetooth speaker was paired; no input device has been tried. diff --git a/docs/platforms/apple-armv7.md b/docs/platforms/apple-armv7.md index 3ad7e346c..edce33ca9 100644 --- a/docs/platforms/apple-armv7.md +++ b/docs/platforms/apple-armv7.md @@ -92,12 +92,15 @@ boards have not run it yet. The Pico entry has not run with m1n1 yet. - **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). + in the initrd (OrchardLinux/linux#89). They sit on a second, read-only + disk, `applesftlNlwvm`, as `applesftlNlwvmP`. This has not been booted on + a device yet. - **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). + reader accepts iOS 9's records, so it no longer refuses the disk after iOS + has written to it (OrchardLinux/linux#87; 6 of 6 cold boots read it). `devices//device.toml` (`storage_read`, `storage_write`) has the state of each board. @@ -105,9 +108,8 @@ boards have not run it yet. The Pico entry has not run with m1n1 yet. 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: +pets it until systemd takes over `/dev/watchdog`. The kernel does this on +every 32-bit board (A5, A5X, A6, A6X; OrchardLinux/linux#88). As a result: - **A hang restarts the device** on its own within the timeout, with no button pressed. @@ -115,9 +117,9 @@ A5 later. As a result: 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. +handed-off watchdog, armed for 60 s and petted by the kernel. The other +boards have the same kernel but have not run it yet. m1n1's watchdog options +are off by default. ## Cascadia's autogo route: a fallback only @@ -144,7 +146,7 @@ Only what the data and the linked PRs record: | 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. | +| iPad 4 (`p103`) | A6X | – | – | Identity and boot data. The kernel has the A6X's core (second-core timer, watchdog; OrchardLinux/linux#88); its device trees are 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 diff --git a/kernel/configs/apple-armv7/config b/kernel/configs/apple-armv7/config index 1f308fe74..4b481ad23 100644 --- a/kernel/configs/apple-armv7/config +++ b/kernel/configs/apple-armv7/config @@ -1513,6 +1513,7 @@ CONFIG_MTD_SPEAR_SMI=y # # CONFIG_MTD_DOCG3 is not set CONFIG_MTD_APPLE_H2FMI=y +CONFIG_MTD_APPLE_H2FMI_P105_CAPTURE=m # end of Self-contained MTD device drivers # diff --git a/kernel/upstream-armv7.lock b/kernel/upstream-armv7.lock index 640c8636c..cd503a520 100644 --- a/kernel/upstream-armv7.lock +++ b/kernel/upstream-armv7.lock @@ -1,2 +1,2 @@ url=https://github.com/OrchardLinux/linux.git -commit=30699238bcd5418b03af8b1a55530db7b65f551f +commit=a9b8e034457d498cb46650fbf428c9550344a44d