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

Bootloader v25 update proposal #672

Merged
merged 9 commits into from
May 17, 2023
Merged

Bootloader v25 update proposal #672

merged 9 commits into from
May 17, 2023

Conversation

pennam
Copy link
Contributor

@pennam pennam commented May 2, 2023

Since form the next portenta batch the default bootloader version will be v25 and it will include by default MCUboot security features (as for OPTA and GIGA). My proposal is to split the bootloader management from the security feature setup because:

/cc @marqdevx

@pennam pennam requested review from facchinm and sebromero May 2, 2023 12:34
Copy link
Collaborator

@sebromero sebromero left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR, good move! I haven't tested it but I agree with the general approach of splitting the two. Maybe we can find a name for the sketch that explains a bit better what it does? It's about installing the keys to enable encryption, right?
Please also have a look at my other comments.

flash.program(&ecdsa_pub_key, SIGNING_KEY_ADDR, SIGNING_KEY_SIZE);
Serial.println("Flashed 100%");
flash.deinit();
Serial.println("\nBootloader update complete. It's now safe to reboot or disconnect your board.");
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is no longer a bootloader update, so we should probably rephrase this.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yup 💯 i had pushed the change in another branch

@@ -0,0 +1,155 @@
#include "FlashIAP.h"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we take the opportunity to add a comment section here that explains the purpose of the sketch, what it does and how it works?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done !

@pennam
Copy link
Contributor Author

pennam commented May 4, 2023

Maybe we can find a name for the sketch that explains a bit better what it does? It's about installing the keys to enable encryption, right?

The original name of this sketch was writeKeys.ino. This is exactly what is does, it writes two keys in the flash memory:

  • one is used for the image signature checking
  • and the other is used for image encryption

writing the key will enable MCUboot image signature checking and image swap with encryption/decryption so i decided to rename it to enableSecurity, but i agree it is not the best, any suggestion?

@facchinm facchinm merged commit d3fa563 into arduino:main May 17, 2023
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

Successfully merging this pull request may close these issues.

3 participants