Repository navigation
make-boot-image: --payload packs an existing SWEETXNU payload as it is - #380
Merged
Merged
Conversation
The scion loader's first phone test wants the loader around exactly the payload that boots today. make-boot-image.sh could not do that: it always makes a new payload from the kernel and the donor ADT, and adds sweetepoch=<now> to the line, so the payload's bytes and its line changed with every run. --payload P skips those steps (and the firmware, camera, canvas and inject steps that only shape a new payload) and packs P unchanged; the template is still required. Its line is not printed: the script prints only its length and SHA-256. starlte-pack-boot.py payload BOOTIMG OUT takes the payload out of an sboot image (the one SWEETXNU at a 4 KiB offset of the kernel slot, to the slot's end, as packed). docs/ios27/SCION-LOADER.md says how, and why the loader should be built with LDR_OS_TOKENS=0 for a boot identical to sboot's (the 54 bytes of scion_ldr= and scion_guard= push the kernel's last built-in arguments out of its 1024-byte line). Used on 18 November to make the first scion-loader test image from iOS 27.2.1's BOOT image: the payload, kernel segments, ADT, line, Android header and DTBH of the result are byte-identical to the source image's. Without --payload the script is unchanged. Not run on a phone yet.
claudiusthebot
marked this pull request as ready for review
November 18, 2026 15:44
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.
Follow-up to #370 (
--loader-kind scion, merged). The scion loader's first phone test wants the loader around exactly the payload that boots today.make-boot-image.shcould not do that: it always makes a new payload from the kernel and the donor ADT and addssweetepoch=<now>to the line, so the payload's bytes and its line change with every run.make-boot-image.sh --payload Pskips the payload-making steps (and the firmware, camera, canvas and inject steps that only shape a new payload) and packsPunchanged;--templateis still required. The payload's line is not printed, only its length and SHA-256. Without--payloadthe script is unchanged.starlte-pack-boot.py payload BOOTIMG OUTtakes the payload out of an sboot image (the one SWEETXNU at a 4 KiB offset of the kernel slot, to the slot's end, as packed).LDR_OS_TOKENS=0(Scion-Project/scion-boot-exynos9810, draft PR) for a boot identical to sboot's.Used on 18 November to make the first scion-loader test image from iOS 27.2.1's BOOT image: the payload, kernel segments, ADT, line, Android header and DTBH of the result are byte-identical to the source's (checked by hashes). Checked locally:
bash -n,py_compile,tools/provenance-check.py,tools/provenance-test.py. Not run on a phone yet.Separate finding, not fixed here: the kernel's built-in arguments share the 1024-byte line with the loader's (
starlte_bootargs_defaults), and today's line is at 1018 of 1024: any 6 more bytes on a loader line start dropping the last built-ins (cam_switch,sgu_irq,decmpfs_lz4,sweetatpathfirst).🤖 Generated with Claude Code