-
Notifications
You must be signed in to change notification settings - Fork 2.1k
riotboot: add riotboot_flashwrite module #11181
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
dc64523 to
35c72cb
Compare
|
bergzand
left a comment
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.
Initial review, more to follow
sys/include/riotboot/flashwrite.h
Outdated
| /** | ||
| * @brief Amount of bytes to skip at initial write of first page | ||
| */ | ||
| #define RIOTBOOT_FLASHWRITE_SKIPLEN 4 |
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.
Maybe use sizeof(RIOTBOOT_MAGIC) here, that would provide a direct reference to why it is this exact value.
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.
ok
bergzand
left a comment
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.
Minor nitpick, feel free to squash immediately
tests/riotboot_flashwrite/README.md
Outdated
|
|
||
| $ BOARD=<board> make riotboot/flash | ||
|
|
||
| Configm it booted from slot 0, then recompile in order to get an image for the |
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.
This sentence doesn't parse for me :-/
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.
cleared that up!
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.
Thanks!
9dcdf78 to
c170d64
Compare
bergzand
left a comment
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.
Ack, test worked for me on a samr21-xpro. Code looks good to me
bergzand
left a comment
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.
Murdock is complaining
sys/include/riotboot/flashwrite.h
Outdated
| */ | ||
|
|
||
| /** | ||
| * @ingroup sys_firmware |
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.
@ingroup sys_riotboot?
sys/riotboot/flashwrite.c
Outdated
| */ | ||
|
|
||
| /** | ||
| * @ingroup sys_riotboot |
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.
@ingroup sys_riotboot?
c170d64 to
641a32b
Compare
| */ | ||
|
|
||
| /** | ||
| * @defgroup sys_riotboot_flashwrite riotboot flash writer |
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.
Riotboot?
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.
IMO all the riotboot module documentation edit organization edit needs work. I suggest we postpone that to a later PR.
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.
👍
|
&go. |
|
This pull request broke this that was working: |
|
I disagree, the fix from #11203 do not fix the issues. This pull request changed the API without mentioning in the title or giving an adequate testing description. The third commit a15f07b is added without justification and changes the definition scope of the makefiles variables and made some non namespaced macros globally defined. If it was required for ae35860 why is it defined after the commit And the fix proposed in #11203 now makes that having This should really have been split to a separate pull request with dedicated testing procedure and justification as this pull request did not gave any and did not mention it either. |
Contribution description
This PR adds a module to riotboot that allows writing a firmware image to an inactive firmware slot, along with a simple test application.
On its own, it doesn't do any validity checks of the to-be-flashed image. The module is supposed to be a building block used by higher level modules, e.g., for updating via validated suit manifests.
Testing procedure
Testing is a bit manual at the moment... Please see the README.md that comes with the test application.
Issues/PRs references
Depends on #11180 for the testing instructions to work.(merged)