-
Notifications
You must be signed in to change notification settings - Fork 2k
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
bootloaders/riotboot_vfs: add VFS based bootloader #17379
Open
benpicco
wants to merge
7
commits into
RIOT-OS:master
Choose a base branch
from
benpicco:bootloaders/riotboot_vfs
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
github-actions
bot
added
Area: boards
Area: Board ports
Area: build system
Area: Build system
Area: core
Area: RIOT kernel. Handle PRs marked with this with care!
Area: cpu
Area: CPU/MCU ports
Area: drivers
Area: Device drivers
Area: examples
Area: Example Applications
Area: pkg
Area: External package ports
Area: sys
Area: System
Area: tests
Area: tests and testing framework
Platform: ARM
Platform: This PR/issue effects ARM-based platforms
Platform: native
Platform: This PR/issue effects the native platform
labels
Dec 10, 2021
benpicco
force-pushed
the
bootloaders/riotboot_vfs
branch
from
February 9, 2022 21:04
c6c3b34
to
39ad6a4
Compare
github-actions
bot
removed
Area: examples
Area: Example Applications
Platform: native
Platform: This PR/issue effects the native platform
labels
Feb 9, 2022
benpicco
force-pushed
the
bootloaders/riotboot_vfs
branch
from
March 22, 2022 14:12
39ad6a4
to
699e993
Compare
benpicco
added
the
State: WIP
State: The PR is still work-in-progress and its code is not in its final presentable form yet
label
Mar 22, 2022
benpicco
requested review from
smlng,
leandrolanzieri,
aabadie,
MichelRottleuthner,
fjmolinas,
kaspar030,
MrKevinWeiss,
dylad,
haukepetersen and
bergzand
as code owners
March 22, 2022 14:13
@benpicco Could you split out all the unrelated commits as well as document the added vfs/riotboot functions? |
benpicco
force-pushed
the
bootloaders/riotboot_vfs
branch
from
May 17, 2022 18:40
699e993
to
8131421
Compare
github-actions
bot
removed
Area: pkg
Area: External package ports
Area: drivers
Area: Device drivers
Area: core
Area: RIOT kernel. Handle PRs marked with this with care!
labels
May 17, 2022
benpicco
added
Area: core
Area: RIOT kernel. Handle PRs marked with this with care!
Area: pkg
Area: External package ports
Area: drivers
Area: Device drivers
and removed
State: WIP
State: The PR is still work-in-progress and its code is not in its final presentable form yet
labels
May 17, 2022
benpicco
force-pushed
the
bootloaders/riotboot_vfs
branch
from
May 17, 2022 18:50
8131421
to
efd638f
Compare
github-actions
bot
removed
Area: pkg
Area: External package ports
Area: core
Area: RIOT kernel. Handle PRs marked with this with care!
Area: drivers
Area: Device drivers
labels
May 17, 2022
benpicco
added
the
CI: ready for build
If set, CI server will compile all applications for all available boards for the labeled PR
label
May 26, 2022
benpicco
force-pushed
the
bootloaders/riotboot_vfs
branch
2 times, most recently
from
May 26, 2022 14:18
4577836
to
470045d
Compare
benpicco
force-pushed
the
bootloaders/riotboot_vfs
branch
from
May 26, 2022 19:30
470045d
to
bff8a78
Compare
benpicco
added
the
State: waiting for maintainer
State: Action by a maintainer is required
label
Oct 11, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Area: boards
Area: Board ports
Area: build system
Area: Build system
Area: cpu
Area: CPU/MCU ports
Area: sys
Area: System
Area: tests
Area: tests and testing framework
CI: ready for build
If set, CI server will compile all applications for all available boards for the labeled PR
Platform: ARM
Platform: This PR/issue effects ARM-based platforms
State: waiting for maintainer
State: Action by a maintainer is required
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Contribution description
Often it's not feasible to partition the internal flash into two halves simple because the required firmware is too large for just half of the flash. With the current chip shortage larger chips are not always available (if such parts even exist).
If the board has an external flash with a filesystem, we can store the new firmware there and use riotboot to transfer it to the internal flash.
Before flashing the new firmware, we make a backup of the current one so that the board can recover on it's own in case of a bad firmware. (In a follow-up we can add a watchdog timer to do an automated reboot if the new firmware does not clear it in time).
The path to firmware file to flash is stored in a
do_update
file as text. Once the firmware is flashed, the file contains the path of the backup firmware. It is the job of the new firmware to remove this file, otherwise the backup is applied on reboot.Testing procedure
I have not figured out how to create a combined image yet and whenever I flash the application firmware the bootloader also gets erased. So whenever you flash the application, you also have to flash the bootloader:
tests/riotboot_vfs
on a board with external storagebootloaders/riotboot_vfs
Now on the shell, save the current firmware with
dump_rom /nvm0/test.bin
You can re-flash the current firmware with
flash_rom /nvm0/test.bin
same54-xpro
nrf52840dk
Issues/PRs references
depends on and includes #17341