-
Notifications
You must be signed in to change notification settings - Fork 784
loader: Allow to specify slot number in version comparison #2343
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
base: main
Are you sure you want to change the base?
loader: Allow to specify slot number in version comparison #2343
Conversation
Sorry, accidental approval. |
ab92081
to
a79cd55
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some stuff needs moving around and clarification.
Addition to dependency requires update of design documents.
scripts/imgtool/main.py
Outdated
@@ -404,7 +424,7 @@ def convert(self, value, param, ctx): | |||
'(for mcuboot <1.5)') | |||
@click.option('-d', '--dependencies', callback=get_dependencies, | |||
required=False, help='''Add dependence on another image, format: | |||
"(<image_ID>,<image_version>), ... "''') | |||
"(<image_ID>,[<slot_ID>],<image_version>), ... "''') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess that these
are valid ID I can use here?
Bug there is no user input filter here. I know that MCUboot will reject the image, at least by the logic of boot_verify_slot_dependency
(which should actually be in boot_verify_slot_dependencies
), but it is not even clear what values user should pass here and if 0 is special.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is only a slight validation, based on the regular expression.
Since there is close to none justification for using more than those three predefined values, I'll try to use words instead of mysterious integers.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure about the change of placement - this logic must affect the local dep_slot
variable, that's why it is there.
I guess you have some ideas, so we can discuss possible solutions tomorrow.
Allow to depend on a specific slot while specifying the version number. This functionality is useful when the Direct XIP mode is used and the booting process of other images is done by the next stage, not the MCUboot itself. Signed-off-by: Tomasz Chyrowicz <tomasz.chyrowicz@nordicsemi.no>
a79cd55
to
89d1d85
Compare
@robertstypa Please take a look at the snake language code. |
Allow to depend on a specific slot while specifying the version number. This functionality is useful when the Direct XIP mode is used and the booting process of other images is done by the next stage, not the MCUboot itself.