Accept NAND-style erase tags without physical_partition_number - #305
Open
igoropaniuk wants to merge 2 commits into
Open
Accept NAND-style erase tags without physical_partition_number#305igoropaniuk wants to merge 2 commits into
igoropaniuk wants to merge 2 commits into
Conversation
NAND-generated rawprogram files, such as the ones shipped with Telit SDX35 modules, omit physical_partition_number from erase tags since NAND exposes a single physical partition. load_erase_tag() treated the attribute as required and rejected such files with "errors while parsing erase tag", making qdl unable to consume otherwise valid autogenerated NAND bundles. The reference fh_loader treats the attribute as optional and defaults it to 0; do the same. Signed-off-by: Igor Opaniuk <igor.opaniuk@oss.qualcomm.com>
The file type detector classified a <data> document by looking for program, read and ufs children, so a rawprogram file containing only erase tags - as generated for NAND wipe flows - failed with a confusing "failed to detect file type" error even though the program parser fully supports erase tags. Accept erase children as program files, matching the flashmap loader which already does so. Signed-off-by: Igor Opaniuk <igor.opaniuk@oss.qualcomm.com>
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.
A user flashing a Telit FE910C04 (SDX35, NAND) reported that qdl rejects
the vendor-shipped rawprogram files with "errors while parsing erase
tag". The autogenerated NAND bundles omit
physical_partition_numberfrom tags - NAND exposes a single physical partition - but
load_erase_tag()treated the attribute as required. The referencefh_loadertreats it as optional and defaults it to 0, so qdl wasstricter than the format it implements.
program: treat
physical_partition_numberas optional in erase tags,defaulting to 0 to match the reference implementation. Covered by two
new cmocka cases in
test_program_load_xml(attribute omitted ->partition 0; attribute present -> honored).
qdl: recognize erase-only XML files as program files. Found while
verifying the above: the file type detector classified
documents by their program/read/ufs children only, so a rawprogram
containing nothing but erase tags - as generated for NAND wipe
flows - failed with "failed to detect file type" even though the
parser fully supports erase tags. The flashmap loader already
accepts erase children; do the same here.
Verified against the reported Telit rawprogram: parsing now succeeds
and qdl proceeds to device discovery.