riotboot: add riotboot_flashwrite module#11181
Conversation
dc64523 to
35c72cb
Compare
|
bergzand
left a comment
There was a problem hiding this comment.
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.
Maybe use sizeof(RIOTBOOT_MAGIC) here, that would provide a direct reference to why it is this exact value.
bergzand
left a comment
There was a problem hiding this comment.
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.
This sentence doesn't parse for me :-/
9dcdf78 to
c170d64
Compare
bergzand
left a comment
There was a problem hiding this comment.
Ack, test worked for me on a samr21-xpro. Code looks good to me
sys/include/riotboot/flashwrite.h
Outdated
| */ | ||
|
|
||
| /** | ||
| * @ingroup sys_firmware |
sys/riotboot/flashwrite.c
Outdated
| */ | ||
|
|
||
| /** | ||
| * @ingroup sys_riotboot |
c170d64 to
641a32b
Compare
| */ | ||
|
|
||
| /** | ||
| * @defgroup sys_riotboot_flashwrite riotboot flash writer |
There was a problem hiding this comment.
IMO all the riotboot module documentation edit organization edit needs work. I suggest we postpone that to a later PR.
|
&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)