-
Notifications
You must be signed in to change notification settings - Fork 2
Add config for MIMXRT1060_EVK, add section to README detailing how to configure the project for a new target #3
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
Conversation
@multiplemonomials how do we incorporate the c format public key for signing and private key for encryption into code? I have been using something like the following since porting from Mr. Beckstein's repo:
I am starting to write documentation on encrypted images, and noticed in your repo that neither key files are included. Is the public key in c format automatically derived from the signing key? |
Oh, I added a new CMake variable for that. If you enable encryption in mbed_app.json it will ask you to set it. By the way, I updated the mcuboot PR with your suggestion to add --clear! |
Where can I see the script? As of MCUboot v2.1.0, apparently we can use the same image for both initial download and update if encryption is not enabled, |
Do you think it is a good idea to use the same key for both signing and encryption? My concern is having both private and public key of the same key co-exist in bootloader. I guess if someone already has a copy of bootloader, anything can go from there, and it doesn't matter if the private and public key are an pair or not. |
I did what you said, also -E key for primary image with -c flag, but I see the primary image is encrypted in that way. When not encrypted I should see readable text at the end of the bin. So what's the sense of the -c then? |
@lefebvresam are you sure the |
Yes I updated my script and it stays working:
|
try to run imgtool manually, you shall be able to see the difference. I only tried it manually because most of my code base is still with Mbed-OS. It will take time to migrate them to CE. |
What should be the difference when running manually? |
Because something may go wrong in your automated script. I just tried again, without |
You are right. I tested again and indeed primary image is only encrypted when you ommit the -c flag. I think I was looking to the wrong bin yesterday. So the reason that the primary image won't boot when it is encrypted is because the signature checking will be done on an encrypted image and will not succeed? And why you need to specify the encryption key when the primary image is not encrypted? |
This adds a config that at least gets the bootloader building and working on MIMXRT1060_EVK. It also adds extensive docs on how I arrived at this configuration.
Unfortunately it isn't 100% working yet; I have not gotten it to successfully swap images. However, I think it's a step forward nonetheless.
Please let me know if this documentation is useful! Hopefully it can help explain how to get the project set up on your own devices.