hellesvik-nordic / samples_for_nrf_connect_sdk

Other
36 stars 16 forks source link

mcuboot_smp_encryption upgrade failure when CONFIG_NRF53_UPGRADE_NETWORK_CORE=Y #10

Closed Freezerohmatic closed 1 month ago

Freezerohmatic commented 1 month ago

I am currently unable to get this example working when CONFIG_NRF53_UPGRADE_NETWORK_CORE=Y. All encrypted bin files that I upload get "sent" to the network core. Only signed files load correctly. Setting CONFIG_NRF53_UPGRADE_NETWORK_CORE=N creates the expected behaviour.

Freezerohmatic commented 1 month ago

I should add that I have tried with version v2.4.2, v2.5.0, v2.5.3, v2.6.1 and v2.7.0 with some config changes for v2.4.2

hellesvik-nordic commented 1 month ago

The encryption example does not support network core updates as is. I do not have time to add this support this summer. You will have to try and fix the sample yourself to add this support. You could always ask on https://devzone.nordicsemi.com/ if you get stuck doing that. The nRF Connect SDK does not have out of the box support for encrypted DFU yet, which is why you have to do some work yourself to get this

Freezerohmatic commented 1 month ago

Okay, I thought that was the case for the standard nRF SDK but your example makes it seem like these changes would resolve this for both the App Core and Net Core.

Thankyou for the response

hellesvik-nordic commented 1 month ago

Right, I see how you thought that. I removed to board files to fix that misunderstanding: https://github.com/hellesvik-nordic/samples_for_nrf_connect_sdk/commit/e605deb690d13831ca422a66bb959858bc0d0e44

Freezerohmatic commented 1 month ago

Thank you for updating that.

Freezerohmatic commented 4 weeks ago

So I've got it working in 2.7.0 and 2.6.1 but I'm not sure of the best way to share it as a patch file doesn't seem to work across different versions (first time I've created one myself). On a side note, it also might be possible using what I've done to get secure boot working but I have no need (or desire) for this feature so this will be up to someone else.

hellesvik-nordic commented 4 weeks ago

So I've got it working in 2.7.0 and 2.6.1

This is good news!

but I'm not sure of the best way to share

The cleanest way: Forking my repo and creating a PR. The easiest way (for you): Just upload a patch file to this issue, and I will test it, then apply it if it works and I agree with it.

doesn't seem to work across different versions

The NCS changes a lot, so we cannot expect everything to be backwards compatible. As you see on this repo, I have tags for v2.2.0 and v2.3.0 (And I have it on my todo to create tags for other versions as well, but you know how things take time). If you have something that works for the newest versions, I would say that is plenty good.