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

nrf patch needs fails #14

Open
Rob-Grady opened this issue Dec 22, 2024 · 4 comments
Open

nrf patch needs fails #14

Rob-Grady opened this issue Dec 22, 2024 · 4 comments

Comments

@Rob-Grady
Copy link

First, thanks for all the work here, it's been really helpful.

I've been working with samples_for_nrf_connect_sdk/bootloader_samples/keys_and_signatures/mcuboot_smp_encryption. I got the code running, thanks for that. But the patch file (nrf.patch) does not work. I applied it, but the output it produced would not boot. It wasn't clear to me which sdk that patch should be applied to. Could you possibly update the patch for sdk 2.6 or 2.7?

Thanks,

Rob Grady

@Rob-Grady
Copy link
Author

Or provide a copy of the results (the entire file) you get after the patch was applied.

@hellesvik-nordic
Copy link
Owner

Yea this sample was added before sysbuild. For v2.8.0, I think maybe the nRF Connect SDK supports encrypted directly. I see that Migrating from multi-image builds to sysbuild mentions SB_CONFIG_BOOT_ENCRYPTION. Try to enable this with sysbuild and see if you are able to encrypt your images that way instead of using this sample.

I plan to update this sample to the above method eventually, when I got time.

@Rob-Grady
Copy link
Author

So I am using sysbuild, and you are right Nordic does support some level of encryption. Even though they officially do not support it, sysbuild will generate zephyr.encrypted.signed.bin files. The problem seems to be with the 'merge' step, where the bootloader (mcuboot) and the app image are merged into one file. sysbuild is selecting the wrong files to merge. It should be mcuboot.hex and app.signed.hex. I think it might be selecting app.encrypted.signed.hex, which fails to boot. I work around the issue by programming the correct files separately using the Nordic programmer tool.

@hellesvik-nordic
Copy link
Owner

Thanks for the report! I have forwarded it to our devs, so they will investigate this further.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants