feat(linux): support firmware preparation on Linux - #1
Merged
Merged
Conversation
Port the firmware-prep pipeline to Linux using linux-apfs-rw for the APFS recovery ramdisk and ldid for ad-hoc signing/CDHash extraction. Keep the existing macOS hdiutil/ditto/codesign path unchanged. Based on the Linux-host implementation and end-to-end testing from jprx#1, rebased onto the current main without importing its unrelated guest SEP/kernelcache noise patches.
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.
Goal
Make Linux a first-class host for the current darwin-vm root-shell workflow, so firmware preparation no longer requires a Mac.
What changed
dmgutil.shwith macOS (hdiutil/ditto) and Linux (linux-apfs-rw/cp) backendsget_files.shrun on Linux and useldidfor ad-hoc signing/CDHash extractionfix_perms.shrun on Linux and write numeric ownership0:0LINUX.mdwith the Linux prerequisites and full prep/build/boot flow.gitignoreProvenance / rebase notes
This is based on the Linux-host implementation from jprx#1, which reports end-to-end
get_files.sh -> fix_perms.sh -> run.shtesting for bothiPhone17,3andMac16,10guests on Ubuntu 24.04 x86_64.It is rebased onto the current
phakoda/darwin-vmmain(9044efc) and intentionally does not import that PR's unrelated SEP/device-tree or kernelcache log-suppression changes. That keeps the newer pre-SPTMInvalidateHmacfix on currentmainuntouched.Validation
bash -n dmgutil.sh get_files.sh fix_perms.shpasses in a Linux environment.mainand zero commits behind.linux-apfs-rwkernel module; the upstream PR provides the end-to-end Linux boot evidence this port is based on.Scope
This establishes the Linux host foundation. Display/GPU, HID/input, networking/Wi-Fi, Bluetooth, GUI services, and SpringBoard remain subsequent emulation milestones.