Repository navigation
usb: Keep each iPad's USB serial number the same across boots - #110
Merged
Merged
Conversation
henrikklee
pushed a commit
to brkosebay/hardware
that referenced
this pull request
Nov 12, 2026
Installed systems and RAM payloads told the host a new USB serial number on every boot (BOOT:<boot id>), so the Mac saw a new device each time: macOS asked again whether to allow the accessory, and the serial console got a new name. Both now use BOARD:<board> ID:<12 hex>, the ID being SHA-256 over "orchard-" and the device-tree serial-number that m1n1 copies from Apple's tree, so the hardware serial is not published. A RAM payload's boot and SSH host key are read over the serial console on every connection instead of from the USB name. Trees without a serial number, or a helper that fails, keep the per-boot BOOT: serial, so USB serial and SSH always come up. Recovery, install and the install-to-system handoff keep their serials. From orchard PR OrchardLinux#110 (commit bbe62ba), the stable serial part. The same PR also embedded every board's device tree in each initrd and a feature table in the platform layer, for warm restart and the feature registry; those are not part of this topic. The empty or malformed hash fallback and the init fallback are additions.
henrikklee
force-pushed
the
j71t/usb-stable-serial
branch
from
November 12, 2026 21:17
bbe62ba to
39d86cb
Compare
henrikklee
marked this pull request as ready for review
November 12, 2026 21:17
Installed systems and RAM payloads told the host a new USB serial number on every boot (BOOT:<boot id>), so the Mac saw a new device each time: macOS asked again whether to allow the accessory, and the serial console got a new name. Both now use BOARD:<board> ID:<12 hex>, the ID being SHA-256 over "orchard-" and the device-tree serial-number that m1n1 copies from Apple's tree, so the hardware serial is not published. A RAM payload's boot and SSH host key are read over the serial console on every connection instead of from the USB name. Trees without a serial number, or a helper that fails, keep the per-boot BOOT: serial, so USB serial and SSH always come up. Recovery, install and the install-to-system handoff keep their serials. From orchard PR OrchardLinux#110 (commit bbe62ba), the stable serial part. The same PR also embedded every board's device tree in each initrd and a feature table in the platform layer, for warm restart and the feature registry; those are not part of this topic. The empty or malformed hash fallback and the init fallback are additions.
henrikklee
force-pushed
the
j71t/usb-stable-serial
branch
from
November 12, 2026 21:23
39d86cb to
498ef45
Compare
Contributor
|
Landing the stable serial part as your commit: one USB serial per unit (BOARD: ID:) for installed systems and RAM payloads, and the RAM boot and host key read over ACM on every connection. Added on top: a fallback to the per-boot BOOT: serial when the hash cannot be made, in both the initrd and usb-session, so USB serial and SSH always come up. Not in this topic: the per-board pristine DTBs in the initrd and device-features.json (warm restart and the feature registry). Your previous head is kept as tag |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part 7 of 23 of the iPad 5 (J71t) series in this repository; merge after #108.
Problem
The USB serial number changed between installed boots and RAM sessions, so the host saw a new device every boot and could not keep its SSH known_hosts entry or serial console name.
Change
Share one BOARD/hashed-ID serial format between installed boots and RAM sessions (
usb-identity), and get the per-boot SSH identity through the existing ACM console. Documented in docs/device-protocol.md, with tests.Testing
Dependencies
Depends on #108.
This branch is stacked on the PRs it depends on and carries their commits; the change of this PR is its last commit, "usb: Keep per-device system and RAM serials stable across boots".
This update keeps the branch's earlier history: it merges the current base into the branch and adds the reworked change as a new commit on top.
🤖 Generated with Claude Code