Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

imgtool: Bugfixes and improvements for various imgtool commands #1973

Merged
merged 6 commits into from
Jun 14, 2024

Conversation

rustammendel
Copy link
Contributor

Fix and improve verify command
Improve readability and reliability of boot_record.py
Fix bugs and add missing features for dumpinfo command
Enable decode_version() to work with command line
Linting and other readability fixes

Signed-off-by: Rustam Ismayilov <rustam.ismayilov@arm.com>
Change-Id: I9c84e544b466c0e041bb947fb4dd3e01b0d38ae5
@rustammendel rustammendel marked this pull request as ready for review May 30, 2024 11:01
Copy link
Collaborator

@davidvincze davidvincze left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, a few minor comments.

Could you add the reasons to the commit message behind this commit?
imgtool: Update version.py to take command line arguments
Thanks!

scripts/imgtool/image.py Outdated Show resolved Hide resolved
Fixed hash algorithm defaults to SHA256 in case no key provided.
Verification improved by adding check for key - tlv mismatch,
VerifyResult.KEY_MISMATCH added to indicate this case.
Multiple styling fixes and import optimisation, exception handling.

Signed-off-by: Rustam Ismayilov <rustam.ismayilov@arm.com>
Change-Id: I61a588de5b39678707c0179f4edaa411ceb67c8e
'Measurement Value' added the 'properties' list initially,
rather than adding it separately later.
Added an assertion to ensure 'Measurement Value' remains as
the last item in the 'properties' list

Signed-off-by: Rustam Ismayilov <rustam.ismayilov@arm.com>
Change-Id: I106059c6c903c3d560477d5114d866f48590ad7e
Add support for dumping images with custom tlv
Fix uninitialized access to some variables
Fix trailer magic detection
Fix some linting issues (parenthesis, indentation, spacing)

Signed-off-by: Rustam Ismayilov <rustam.ismayilov@arm.com>
Change-Id: I5b6e1dfa74606e2645a258065dd045cc8c7052c5
Fix trailer info dumping reads pad characters as values for status
Refactor printing styled texts and frames
Use isinstance() for type checking
Fold notice text depending on line length
Refactoring some parts for readability
Fix additional linting issues

Signed-off-by: Rustam Ismayilov <rustam.ismayilov@arm.com>
Change-Id: I741562bb70b18407bdd32e9c7391048faf6394c6
@rustammendel rustammendel force-pushed the test_imgtool branch 2 times, most recently from 3fdb094 to b806423 Compare June 10, 2024 13:18
Main method printed hardcoded versions, update to take argument
to enable the possibility of testing version strings by invoking
the command through command line.

Signed-off-by: Rustam Ismayilov <rustam.ismayilov@arm.com>
Change-Id: If75769ef223944865313ed95336e859ebef85fd6
@davidvincze davidvincze merged commit 533fef2 into mcu-tools:main Jun 14, 2024
58 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants