Skip to content

Ship the ARMv7 release that runs on the iPhone 5 - #264

Closed
brkosebay wants to merge 88 commits into
OrchardLinux:mainfrom
brkosebay:submit/n42-armv7-release
Closed

brkosebay wants to merge 88 commits into
OrchardLinux:mainfrom
brkosebay:submit/n42-armv7-release

Conversation

@brkosebay

Copy link
Copy Markdown
Contributor

The ARMv7 Omarchy A release that ran on the iPhone 5 (N42) on 2026-12-03: installed with orchard install, started from the phone's NAND with orchard launch, and returned cleanly to iOS (OrchardLinux/tools#148, OrchardLinux/orchard#507, OrchardLinux/m1n1#22).

This is the integration branch the release was built from. It merges the open iPhone 5 pull requests (#193–#201, #237). As those merge, this branch rebases down to the commits that are new here:

  • ARMv7: Mesa from the Orchard repository, Labwc on the SGX.
  • powerd: read input events in the native layout, not arm64's. struct input_event is 16 bytes on armv7, not 24.
  • Render Quickshell with OpenGL ES on SGX543 boards.
  • shell: start Settings incubation once and verify native Home dispatch.
  • session: supervise the shell and handle missing suspend interfaces.
  • armv7: ship the SGX session and small NAND root settings.
  • release: publish the ARMv7 manifest receipt in its architecture table.
  • armv7: restore NAND root and emergency watchdog defaults.
  • release: verify the N42 shutdown ABI against the shipped kernel and callers.
  • armv7: resize wallpapers in the package before makepkg records their hashes.

These don't apply to main on their own: they touch files that the open pull requests change first.

How to test

python3 -m pytest tests, then orchard build omarchy-a --platform apple-armv7 ... with the matching orchard data, packages and kernel.

On an iPhone 5 (iPhone5,2) running a jailbroken iOS 8.4.1:

  1. Install and launch with tools#148.
  2. The desktop should come up from /dev/applesftl0pN.
  3. A 128 MiB fsync write should leave btoc_audit at flagged=0.
  4. sudo systemctl reboot should return the phone to iOS.

All of this held on 2026-12-03.

On the A10 and the 64-bit platforms, only the release receipt's architecture table and the shared session changes reach the arm64 image; everything else here is ARMv7 only.

The image still names its host omarchy-ipad on every device (system/assemble-rootfs). That is left as it is.

🤖 Generated with Claude Code

ARMv7 images take mesa from [orchard] as 64-bit ones do: the fork's
build with the SGX543's OpenGL ES 2 driver (A5, A6) and software OpenGL.
assemble-rootfs checks on both architectures that OpenGL, GBM and the
GPU probe are that package's.

A board whose GPU is the SGX (kernel driver apple-sgx) has one card that
is both display and GPU: the login session runs gpu-probe on it and, if
it passes, Labwc draws with wlroots' GLES2 renderer and applications get
the GPU's OpenGL ES. The shell keeps Qt's software renderer.

Assisted-by: LLM
struct input_event holds the time as two native longs: 24 bytes on
arm64, 16 on armv7.  'qqHHi' fixed it at 24, so on the iPhone 5 every
Power or Home press crashed powerd (struct.error: buffer not a multiple
of 24 bytes), and a screen darkened by idle could not be woken.
'@LLHHI' is right on both, as mute-switch already reads them.

Assisted-by: LLM
Co-Authored-By: GPT-6.2 Astra <noreply@openai.com>

Assisted-by: LLM
Keep IPC, gesture listeners and bar buttons alive while their panels are cold. Let the dedicated picker process own its UI, and keep the lock surface ready at login.

Co-Authored-By: GPT-6.2 Astra <noreply@openai.com>

Assisted-by: LLM
Use the same physical size for the synchronous lock image and its cache warmer. Keep the desktop still visible while its rotated size decodes, and decode the launcher backdrop off the UI thread.

Co-Authored-By: GPT-6.2 Astra <noreply@openai.com>

Assisted-by: LLM
Give initial painting two seconds before background work. Hold that timer
while the startup lock is acquiring or drawing its first secure frames.
Keep the first manifest scan, bar state, notification storage (including
Focus), idle policy, PIN authentication and lock indicators available.

Defer these initial tasks:

- AppLibrary desktop-entry subscriptions, desktop-file and icon scans,
  and icon-revision watch. Opening the launcher requests them early.
- Plugin directory setup, orphan watcher cleanup, watch and follow-up scan.
- Backlight device discovery, the locked session's desktop wallpaper
  lookup and decode, and the lock cache warmer until the lock draws.
  Skip the unused intro readlink when there is no cover.
- Load emoji data and list stock, installed and extra themes on first use.
- Menu guard shell commands and the notification stacking-mode probe.
- Monitor and auto-brightness probes, verbose network details, audio
  node enumeration and output resolution, and power-profile discovery.
- Accelerometer presence (rotation-lock state still reads immediately).
- Workspace and dock layout lookup, dock desktop entries, keyboard
  layout lookup, and the initial indicator refresh including reminders,
  recording and passwordless sudo. Defer update and custom-command polls.
- Weather, Elsewhen time-zone probes, Dropbox and Tailscale status and
  startup retries, agent usage files, provider updates and sync.
- Optional low-battery check and profile read, night light, remote
  session detection, and MPRIS/PipeWire media enumeration. Media actions
  request the players early. Queue clipboard capture on the next turn.

Change polling:

- Battery status: 1 s to 5 s with an immediate read on AC changes.
- Open power panel: poll profiles every 5 s instead of every second.
  The status reader supplies the battery sample independently.
- Elsewhen: tick at the next minute boundary instead of every second.
- Dock launch feedback: wake for the next launch deadline; window
  arrivals still settle immediately.

Co-Authored-By: GPT-6.2 Astra <noreply@openai.com>

Assisted-by: LLM
Inside sourceComponent: Launcher { shell: shell }, `shell` names the
panel's own shell property (null), not the root object, so the lazily
loaded launcher got no app library and showed no apps (TypeError:
Cannot read property 'appLibrary' of null), and the control and
notification centres got no shell.  Each loader now carries the root
as rootShell and the panels read it from there.

Assisted-by: LLM
Co-Authored-By: GPT-6.2 Astra <noreply@openai.com>

Assisted-by: LLM
Co-Authored-By: GPT-6.2 Astra <noreply@openai.com>

Assisted-by: LLM
Co-Authored-By: GPT-6.2 Astra <noreply@openai.com>

Assisted-by: LLM
Co-Authored-By: GPT-6.2 Astra <noreply@openai.com>

Assisted-by: LLM
Co-Authored-By: GPT-6.2 Astra <noreply@openai.com>

Assisted-by: LLM
The script-driven duckduckgo.com app stayed a dark placeholder for long
on the iPhone 5; html.duckduckgo.com shows results within seconds.

Assisted-by: LLM
Co-Authored-By: GPT-6.2 Astra <noreply@openai.com>

Assisted-by: LLM
Co-Authored-By: GPT-6.2 Astra <noreply@openai.com>

Assisted-by: LLM
Co-Authored-By: GPT-6.2 Astra <noreply@openai.com>

Assisted-by: LLM
Co-Authored-By: GPT-6.2 Astra <noreply@openai.com>

Assisted-by: LLM
Co-Authored-By: GPT-6.2 Astra <noreply@openai.com>

Assisted-by: LLM
…keyboard

Co-Authored-By: GPT-6.2 Astra <noreply@openai.com>

Assisted-by: LLM
While the screen was dark, the playback worker ran busctl and a full
pw-dump every second: 7.3 % CPU on the iPhone 5 with nothing to do.
It now keeps one pw-dump --monitor per dark period and re-reads
BlockInhibited only on logind PropertiesChanged (and right before
suspend). Falls back to a 10 s pw-dump poll if the monitor fails.

iPhone 5, screen dark: 7.27 % -> 0.23 % CPU, 1 wakeup/s. A test tone
posts playing/not-playing at its start and end.

Assisted-by: LLM
Convert the pinned CC BY 3.0 AdAway hosts list into exact-host rules and add eight third-party social widget rules. Compile on the first launch asynchronously and load by content hash thereafter. Apply exact-host browsing exceptions before parsing the main response.

Assisted-by: LLM
Set the WebView preference on main-frame responses so redirects select the destination host and child frames cannot toggle it. Reload after a user change. While exceptions are active, require a fresh main response on history navigation so restored documents cannot bypass the preference.

Assisted-by: LLM
Deny autoplay (including silent autoplay) in the default website policies and require a gesture for media loading/playback. Keep inline playback after a tap. At 1 GiB RAM or below, discard historical documents and JS heaps while keeping the DOCUMENT_BROWSER resource cache. History navigation on these devices can require reloading a page.

Keep GPU acceleration, mobile UA, WebGL and WebAudio: there is no device evidence to justify disabling compositing or breaking interactive sites. Use WebKit memory-pressure defaults until measured; the 2.54 DNS prefetch setter is a no-op.

Assisted-by: LLM
Add --bench URL [--no-filter] with identical fresh site storage and a primed blank view for each run. Wait for requested filter setup before starting the timer. Print one JSON row at FINISHED with wall time, browser-scoped web-process CPU delta, final RSS and HTTP status. Document the alternating four-page comparison.

Assisted-by: LLM
Assisted-by: LLM
Signed-off-by: Berkay Kösebay <brkosebay@users.noreply.github.com>
# Conflicts:
#	Makefile
#	desktop/install-tree
#	release/audit.py
#	tests/package_tree.py
#	tests/test_package.py
Assisted-by: LLM
Signed-off-by: Berkay Kösebay <brkosebay@users.noreply.github.com>
…led tree

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>
…ofile

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>
…allers

Assisted-by: LLM
Signed-off-by: Berkay Kösebay <brkosebay@users.noreply.github.com>
…hashes

Assisted-by: LLM
Signed-off-by: Berkay Kösebay <brkosebay@users.noreply.github.com>
The autostart started udiskie and udisksd on any board with a USB host
controller. The iPhone 5 has one, but its only host port is hard-wired to
the Wi-Fi chip (connect_type hardwired; the others are not used), so
removable storage can never appear there. Only a port whose connect type
is hotplug or unknown starts them now; on the iPhone 5 that frees 18 MB
of used memory at idle.

Assisted-by: LLM
Signed-off-by: Berkay Kösebay <brkosebay@users.noreply.github.com>
@henrikklee

Copy link
Copy Markdown
Contributor

Thank you, Berkay, for this branch. Getting a full ARMv7 release running on the iPhone 5 took a huge amount of careful work, and the measurements you recorded along the way have shaped several decisions already.

We're closing it now that its pieces have homes. Here is where each went:

Nothing is lost: the whole branch is tagged contrib/brkosebay-n42-armv7-release, so you can pick up anything from there. Thanks again!

@henrikklee henrikklee closed this Dec 6, 2026
henrikklee pushed a commit to tcballard/omarchy-a that referenced this pull request Dec 6, 2026
The 32-bit boards' internal storage is raw NAND behind the SFTL
translation layer (applesftl). Its own queue orders the I/O, so it runs
without a scheduler, with a 512 KiB read-ahead, and with small dirty-page
limits (16 MiB background, 64 MiB hard) so writeback comes in bursts the
NAND absorbs instead of stalls of the desktop.

[Orchard: from OrchardLinux#264 (257c376, configure-nand-root); keyed on the applesftl
device in the package's udev rules instead of written into the ARMv7 image,
so every board with that storage gets it, installed ones too; the dirty
limits set by the same rule]

Assisted-by: LLM
henrikklee pushed a commit to tcballard/omarchy-a that referenced this pull request Dec 6, 2026
With the root on Apple's raw NAND, a wedged NAND controller leaves PID 1
running in RAM while every program that needs the root hangs: the device
looks alive and does nothing. omarchy-nand-rootcheck reads one random
4 KiB block of the root past the page cache every 10 s and feeds the
service's watchdog only when the read succeeds; a hung read misses the
60 s watchdog, an I/O error fails the service at once, and either way
FailureAction=reboot-force restarts the device. It only reads, so the
NAND sees no extra page programs.

[Orchard: from OrchardLinux#264 (2ada1dd, n42-rootcheck); renamed for every board
with that storage and started by udev when an applesftl disk appears
instead of enabled in the ARMv7 image; it ends successfully when the root
is not on the NAND (a RAM boot), so it can never restart such a boot. Not
taken: the emergency-mode reboot (it would cut a USB serial rescue
session), the global hardware watchdog and the sleep target masks (for
every board, not keyed on the NAND)]

Assisted-by: LLM
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