For linux msm/create sahara archive - #303
Open
quic-bjorande wants to merge 2 commits into
Open
Conversation
Multi-payload Sahara targets can already consume a programmer archive, but creating one required users to assemble the archive by hand. Reuse the existing programmer, Sahara XML, and contents.xml parsing paths to build the image map and write the archive from QDL itself. Signed-off-by: Bjorn Andersson <bjorn.andersson@oss.qualcomm.com>
Exercise the sahara-archive command through the built qdl binary. Cover the supported programmer map, Sahara XML, contents.xml, and archive input forms, and verify that invalid inputs do not create output archives. Parse the generated archive in the test itself so the coverage does not depend on an external cpio implementation. Signed-off-by: Bjorn Andersson <bjorn.andersson@oss.qualcomm.com>
quic-bjorande
force-pushed
the
for-linux-msm/create-sahara-archive
branch
from
August 10, 2026 21:16
9495c57 to
c565784
Compare
igoropaniuk
reviewed
Aug 13, 2026
|
|
||
| ret = sahara_archive_write_entry(out, ino++, "TRAILER!!!", NULL, 0); | ||
|
|
||
| out_close: |
Contributor
There was a problem hiding this comment.
A failed write leaves a truncated archive behind, should we also remove(filename) in case of error?
igoropaniuk
reviewed
Aug 13, 2026
| } | ||
|
|
||
| if (qdl_is_contents_xml(filename)) { | ||
| ret = contents_load_programmers(filename, specifier, images); |
Contributor
There was a problem hiding this comment.
contents_load_programmers() decodes the selector (so contents.xml::ufs parses fine and errors are reported), but seems contents_find_programmers() never sees it - it walks the entry list unfiltered and returns the first programmer XML it finds. So ::ufs and ::emmc produce byte-identical archives with no hint that the selector was ignored.
Contributor
|
two comments, none blocking, apart of this LGTM |
igoropaniuk
reviewed
Aug 13, 2026
| fprintf(out, " %s ks [-p <sahara-dev-node> | --serial=T] -s <id:file-path>...\n", __progname); | ||
| fprintf(out, " %s flash (<flashmap>[::specifier] | <contents>[::<specifier>])\n", __progname); | ||
| fprintf(out, " %s create-zip <zipfile> <contents>[::<specifier>]\n", __progname); | ||
| fprintf(out, " %s sahara-archive <archive.bin> " |
Contributor
There was a problem hiding this comment.
create-sahara-archive maybe? so it aligns with create-zip naming
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.
QDL was taught to consume Sahara payload from a custom cpio-package, but no convenient tooling was provided to generate such files.
Introduce a mechanism that allow such archive to be created directly from a contents.xml file or a list of images.