Re-pack support for UKIs - #724
Draft
arnaldo2792 wants to merge 1 commit into
Draft
Conversation
arnaldo2792
force-pushed
the
repack-uki
branch
2 times, most recently
from
August 13, 2026 08:56
1d1a57e to
cb51387
Compare
jmt-lab
approved these changes
Aug 13, 2026
arnaldo2792
force-pushed
the
repack-uki
branch
from
August 14, 2026 22:07
cb51387 to
412c514
Compare
Contributor
Author
|
(forced push includes a change to generate the correct HMAC, based on top off: #701) |
Add re-pack support for UKIs. ukify provides support to extract sections from an existing UKI. However, the stub is modified and signed, and can't be re-used verbatim. Add ukisys, which should be our eventual replacement of ukify. For the time being, it only supports extracting the stub and re-setting it to its original state (flip a byte). Signed-off-by: Arnaldo Garcia Rincon <agarrcia@amazon.com>
arnaldo2792
force-pushed
the
repack-uki
branch
from
August 14, 2026 23:20
412c514 to
c9ea301
Compare
Contributor
Author
|
(forced push to include the change in #701, which was needed due to the dependency on the new |
sam-berning
reviewed
Aug 15, 2026
|
|
||
| /// Writes a little-endian u16 into `buf` at `offset` in place. | ||
| fn write_u16(buf: &mut [u8], offset: usize, value: u16) { | ||
| buf[offset..offset + 2].copy_from_slice(&value.to_le_bytes()); |
Contributor
There was a problem hiding this comment.
do we need bounds checks on the writes?
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.
Description of changes:
This PR complements: #701 and closes the gap to support re-pack workflows with UKIs.
A new binary (ukisys) is provided, to extract the
stubfrom the compiled UKI. This is needed to offer the same experience like in other re-pack workflows: all the artifacts used to build the final image come from the cracked-open rootfs and UKIs.Testing done:
re-packworkflow against a local build, using a custom certificate and new signing keysTerms of contribution:
By submitting this pull request, I agree that this contribution is dual-licensed under the terms of both the Apache License, version 2.0, and the MIT license.