Skip to content

Install into free LwVM space on 32-bit boards - #99

Merged
henrikklee merged 1 commit into
mainfrom
lwvm-free
Nov 7, 2026
Merged

henrikklee merged 1 commit into
mainfrom
lwvm-free

Conversation

@henrikklee

Copy link
Copy Markdown
Contributor

What this changes, by effect:

  • When the iOS disk's LwVM table has an unused, contiguous stretch of at least 8 GiB, orchard install offers "create a Linux partition in free space". The person has to type create partition; the prompt says iOS's acceptance of such an entry is untested.
  • The host computes the new table (one Linux entry added, nothing else changed); the device writes the backup copy, then the main copy, each read back; both are checked again and the kernel must show the new partition where planned before the system is written. A copy that reads back wrong stops before the main copy is touched.

Hidden until LwVM free space exists: no iPad has any today (the resize tool does not shrink Data's entry yet), so the option does not appear. Untested on hardware; the first device test waits until LwVM writes are shown safe for iOS (docs/bring-up/p105-lwvm-write.md). Tests use synthetic headers only.

The allocation and write order follow Shayne Legault's code in #94 (b5c804a), credited as co-author.

When the iOS disk's LwVM map has unallocated chunks stored back to back
(at least the minimum root size, with room in LwVM's virtual space and a
free descriptor), `orchard install` offers "create a Linux partition in
free space", behind a typed confirmation that says iOS's acceptance of
such an entry is untested. The host computes the new header (one Linux
entry appended, its virtual range after the others, the free chunks
mapped in order, CRC recomputed, parsed again); the add-on writes the
copy at the end of the first chunk, then the primary, each read back;
both are parsed again, and the kernel must re-read the table and add the
partition where the plan has it before the root is written.

No LwVM space is free on any iPad today (the resize tool does not shrink
Data's entry yet), so the option does not appear yet. No device has run
this write; its first device test waits until LwVM writes are shown safe
for iOS (docs/bring-up/p105-lwvm-write.md).

The allocation follows Shayne Legault's allocate() and the write order
his commit_headers() in shaynelegault/orchard#94 (src/orchard/lwvm.py,
src/orchard/install_lwvm.py at b5c804a).

Co-authored-by: Shayne Legault <8741557+shaynelegault@users.noreply.github.com>
Assisted-by: LLM
@henrikklee
henrikklee merged commit 93a3674 into main Nov 7, 2026
11 checks passed
@henrikklee
henrikklee deleted the lwvm-free branch November 7, 2026 15:19
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.

1 participant