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
Punchboot-tool merge #30
Merged
Merged
Conversation
This file contains 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
jonasblixt
force-pushed
the
python-cli2
branch
from
November 28, 2023 14:12
d0efe73
to
45789c1
Compare
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #30 +/- ##
==========================================
- Coverage 66.54% 66.16% -0.39%
==========================================
Files 54 54
Lines 2828 2787 -41
==========================================
- Hits 1882 1844 -38
+ Misses 946 943 -3 ☔ View full report in Codecov by Sentry. |
jonasblixt
force-pushed
the
python-cli2
branch
20 times, most recently
from
December 1, 2023 12:01
ed4de15
to
c891eb8
Compare
jonasblixt
force-pushed
the
python-cli2
branch
from
December 4, 2023 19:12
99030f7
to
78f4500
Compare
This is a major re-write of the tooling. Firstly the tools repo (punchboot-tools) has been merged back into the main punchboot repository to reduce the maintanence burden. Historically the tools were devided into a C shared library, the CLI written in C and a thin Python wrapper. With this commit both the shared library and the C CLI is replaced with a more rich python layer and CLI. Most of the low-level stuff is still left in the C code, so it's still possible to create bindings for other languages. But going forward Python will be the main language for the tooling. With this commit the C wrapper mainly deals with byte arrays and most of the string handling, UUID conversion, checksum generation are moved to the python top layer. Minor changes have been introduced to the Python API: --- New functionallity --- Session.authenticate_dsa_token - New, exposes the underlying DSA token authentication mechanism Session.part_erase - Erase a partition --- Breaking changes --- part_get_partitions - New, Replaces 'part_list_partitions' which only exposed UUID's and description fiellds of partitions. This new function returns all information about partitions. --- Updated functions that does not break API compability --- __init__ - Implemented optional UUID selection parameter, with this it's now possible to initialize sessions to different puchboot devices attached to the same host. part_verify - Can now accept either a pathlib Path, a byte array or a BufferedReader, and part argument can be either a string version of an uuid or an UUID object part_write - Can now accept either a pathlib Path or a BufferedReader and part argument can be either a string version of an uuid or an UUID object part_table_install - Can now accept string or UUID object for part parameter board_run_command - Can now accept both command ID's and string version of the command, Support for passing an optinal byte array as argument has also been added The underlying API has changed slightly to support returning byte arrays, and the python does the same thing now. --- Deprecations --- part_resize - This has not been supported for a while in the bootloader, and now it has been removed from punchboot tools as well
With off_t defined this file can't be used to build the python library in a normal linux environment.
To make it clear that thease functions can only be used to load and run bpak files.
And drop the "OTP" part. It _may_ be OTP on some platforms/boards but the wire format / API should not dictate that. This function has never been implemented in the CM parser so it's safe to adjust it. This still needs an implementation / abstraction in CM before it can be useful.
When we detect overlapping memory segments.
This commit includes fixes to enable builds on: - Native windows builds without using msys2/cygwin - Macos x86_64 and arm64 - Linux Historically the only binary release was on windows with an installer to simplify driver installation and such. With this commit we instead build binary python wheels for Python 3.8 -> Python 3.12 on Windows, Linux and MacOS (x86_64 and arm64) and distribute them through PyPi. It's now as easy as: pip install punchboot.
jonasblixt
force-pushed
the
python-cli2
branch
from
December 4, 2023 19:24
78f4500
to
e7508b0
Compare
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.
No description provided.