Open sosthene-nitrokey opened 3 months ago
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 nrf_upload
- once we pull out the cli we should think how and if this should also be separate...
I've been able to minimize it even more. This allowed removing the gmssl
dependency. We are also rid of pypemicro
.
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?
There are still a couple of errors, but much less (36).
Maybe I can try to fix them.
I've fixed the mypy errors in spsdk, bumped mypy to 1.9 and cryptography to 42.
libusbsio
is another weird nxp package, which essentially just wraps hid, right ?
would it make sense to take a look on removing that?
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.
Vendor parts of SPSDK needed for LPC55 updates.
Similar to https://github.com/Nitrokey/pynitrokey/pull/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