-
Notifications
You must be signed in to change notification settings - Fork 666
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
Overwrite only with downgrade prevention problem(?) #1740
Comments
@kasjer , i think this is by design to allow a newer build hut with the same version to overwrite the older. This also means that the same image will overwrite the existing. |
@Laczen I would enable downgrade prevention only for production builds, during development it's more likely that image is transfer to slot 0 directly or downgrade prevention is not enabled. I could propose PR that would make optionally downgrade prevention based on strict version comparison. |
@kasjer, imho it is never a good idea to have a difference between a production build bootloader and a development bootloader. This will create an opportunity to miss an error by development that will be present in the field. |
This issue has been marked as stale because it has been open (more than) 60 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this issue will automatically be closed in 14 days. Note, that you can always re-open a closed issue at any time. |
@Laczen Her is my scenario: So I'm not asking to alter existing behavior but to add option for strict compare if user wants it. |
@kasjer, I agree that in your use case it would be better to do a strict comparison. The proposal you make to check the image version when "opening/mounting" the card slot seems to be the correct solution for this: when a upload over serial/usb is done it is allowed to reuse the version, when a upload comes from the sd-card it will only be presented when it has a higher version. I don't know if mcuboot allows any hooks to be called when opening slots but this would be ideal to support your scenario. |
This issue has been marked as stale because it has been open (more than) 60 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this issue will automatically be closed in 14 days. Note, that you can always re-open a closed issue at any time. |
I'm not sure if this is by design but when downgrade prevention with version number is used and overwrite only method is chosen,
having exact same version in slot1 will result in erasing slot0 and writing it anew.
It would seem that changing condition:
to
would not be a bad idea.
The text was updated successfully, but these errors were encountered: