-
Notifications
You must be signed in to change notification settings - Fork 29
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
Spsdk vendor #519
Spsdk vendor #519
Conversation
Maintaining the fork in a separate repository that is forked from spsdk would make it easier to pull in upstream changes. It could still be included as a submodule here so that we don’t need to release it separately. What do you think? |
Would making it a separate project not bring packaging issues? |
let's pull it in first, like |
I've been able to minimize it even more. This allowed removing the More pruning could be done by removing Class methods (currently no class or file can be removed without breaking stuff). The imported modules are not type checked because the type definitions are broken (223 errors). |
Regading mypy, are there still errors when disabling strict checks? Lines 83 to 98 in a76b1b1
|
There are still a couple of errors, but much less (36). Maybe I can try to fix them. |
0edf6cd
to
66792ab
Compare
I've fixed the mypy errors in spsdk, bumped mypy to 1.9 and cryptography to 42. |
|
libusbsio wraps a custom binary library by NXP. Ripping it off would be a bit more involved. This does mean it would be great to get rid of it though. |
We could indeed get it to work with just hidapi, the wrapper appears very thin. |
The tricky part with replacing libusbsio is testing on Windows and Mac. I remember that we initially had some problems with the bootloader communication on other platforms than Linux so we should pay close attention not to accidentally break it with refactoring. |
I'm not sure I can test on mac. Maybe we should merge the version still using libusbsio at first. |
Yes, I would prefer that. |
82b1fcb
to
7450c7e
Compare
7450c7e
to
b73dd4c
Compare
This commit is extracted from: Nitrokey/pynitrokey#519 I’ve further reduced the included code so that we can get rid of even more dependencies. We now also pass strict mypy checks on all imported modules (except for the libusbsio imports). Co-authored-by: Sosthène Guédon <sosthene@nitrokey.com>
This commit is extracted from: Nitrokey/pynitrokey#519 I’ve further reduced the included code so that we can get rid of even more dependencies: We only need crcmod, cryptography and libusbsio. We now also pass strict mypy checks on all imported modules (except for the libusbsio imports). Co-authored-by: Sosthène Guédon <sosthene@nitrokey.com>
This commit is extracted from: Nitrokey/pynitrokey#519 I’ve further reduced the included code so that we can get rid of even more dependencies: We only need crcmod, cryptography and libusbsio. We now also pass strict mypy checks on all imported modules (except for the libusbsio imports). Co-authored-by: Sosthène Guédon <sosthene@nitrokey.com>
This commit is extracted from: Nitrokey/pynitrokey#519 I’ve further reduced the included code so that we can get rid of even more dependencies: We only need crcmod, cryptography and libusbsio. We now also pass strict mypy checks on all imported modules (except for the libusbsio imports). Co-authored-by: Sosthène Guédon <sosthene@nitrokey.com>
This commit is extracted from: Nitrokey/pynitrokey#519 I’ve further reduced the included code so that we can get rid of even more dependencies: We only need crcmod, cryptography and libusbsio. We now also pass strict mypy checks on all imported modules (except for the libusbsio imports). Co-authored-by: Sosthène Guédon <sosthene@nitrokey.com>
This commit is extracted from: Nitrokey/pynitrokey#519 I’ve further reduced the included code so that we can get rid of even more dependencies: We only need crcmod, cryptography and libusbsio. We now also pass strict mypy checks on all imported modules (except for the libusbsio imports). Co-authored-by: Sosthène Guédon <sosthene@nitrokey.com>
This commit is extracted from: Nitrokey/pynitrokey#519 I’ve further reduced the included code so that we can get rid of even more dependencies: We only need crcmod, cryptography and libusbsio. We now also pass strict mypy checks on all imported modules (except for the libusbsio imports). Co-authored-by: Sosthène Guédon <sosthene@nitrokey.com>
This commit is extracted from: Nitrokey/pynitrokey#519 I’ve further reduced the included code so that we can get rid of even more dependencies: We only need crcmod, cryptography and libusbsio. We now also pass strict mypy checks on all imported modules (except for the libusbsio imports). Co-authored-by: Sosthène Guédon <sosthene@nitrokey.com>
This commit is extracted from: Nitrokey/pynitrokey#519 I’ve further reduced the included code so that we can get rid of even more dependencies: We only need crcmod, cryptography and libusbsio. We now also pass strict mypy checks on all imported modules (except for the libusbsio imports). Co-authored-by: Sosthène Guédon <sosthene@nitrokey.com>
This commit is extracted from: Nitrokey/pynitrokey#519 I’ve further reduced the included code so that we can get rid of even more dependencies: We only need crcmod, cryptography and libusbsio. We now also pass strict mypy checks on all imported modules (except for the libusbsio imports). Co-authored-by: Sosthène Guédon <sosthene@nitrokey.com>
This commit is extracted from: Nitrokey/pynitrokey#519 I’ve further reduced the included code so that we can get rid of even more dependencies: We only need crcmod, cryptography and libusbsio. We now also pass strict mypy checks on all imported modules (except for the libusbsio imports). Co-authored-by: Sosthène Guédon <sosthene@nitrokey.com>
Vendor parts of SPSDK needed for LPC55 updates.
Similar to #346
This is currently in a state that works (validating and uploading updates tested), but I can likely remove a lot of code and still keep it working. Ideally we don't need such a large blob.
spsdk is licensed BSD-3 clause, so it's compatible.
The goal is to fix #512