Skip to content
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

Ignore broken update partition content when in UpdateInUpdatingState (closes #80) #82

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

lionelains
Copy link
Contributor

@lionelains lionelains commented Nov 23, 2024

panic() occurs when the update partition contains invalid (or damaged) content.
This prevents the whole boot process to complete, even when the previous (boot) partition, containing a previous firmware, would be able to start properly.
I changed the panic() to errors that can be parsed by calling functions, thus taking appropriate actions.
More specifically, when the update partition is in UpdateInUpdatingState(), if the rustboot update cannot be performed successfully, we continue booting the firmware in the boot partition instead of panicking.

Note

We should also mark the update partition so that subsequent boot attempts do not go again through the whole partition verification. Indeed, the first attempt failed, thus subsequent attempts should fail as well.
This would required to change the state of the upgrade partition but the state machine currently does not allow to do so.

@lionelains lionelains marked this pull request as draft November 23, 2024 15:11
@lionelains lionelains marked this pull request as ready for review November 25, 2024 10:48
@lionelains
Copy link
Contributor Author

Hello @imrank03, did you try these changes ?

@imrank03
Copy link
Contributor

Hello @imrank03, did you try these changes ?

Hi @lionelains, I currently don't have the board, so I haven't checked the PR yet. I'll get the board and check it by this week.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants