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

[opentitantool] Rescue erases other slot by default #25820

Merged
merged 2 commits into from
Jan 15, 2025

Conversation

jesultra
Copy link
Contributor

@jesultra jesultra commented Jan 8, 2025

Add a default true flag opentitantool rescue firmware --erase_other_slot true" This can be used to control whether the content of the slot not being newly programmed should be left in place, or erased. The latter ensures that the newly "rescued" firmware is the one to boot, and is the default, opposite of the previous behavior.

@jesultra jesultra requested a review from a team as a code owner January 8, 2025 22:19
The `--wait` flag to `opentitantool rescue firmware` can be used to
control whether the new firmware should immediately boot, or whether the
chip should remain in the rescue bootloader after the invocation
terminates.  The latter is useful if more rescue commands are expected,
or if the caller wants to set up some monitoring, before releasing the
newly flashed code to run.

This CL does not change the behavior, but changes how the former
"immadiate boot" case is implemented, in that it is done by an explicit
reset pulse after finishing the flashing.  This makes the logic simpler
in preparation for the next CL, which introduces a second call to
`rescue.update_firmware()`, which would not be possible unless
`rescue.wait()` has been previously called.

Change-Id: I37b9947d3c70791226eb47041bd70b7d7b31d9d4
Signed-off-by: Jes B. Klinke <[email protected]>
Add a default true flag `opentitantool rescue firmware
--erase_other_slot true"` This can be used to control whether the
content of the slot not being newly programmed should be left in place,
or erased.  The latter ensures that the newly "rescued" firmware is the
one to boot, and is the default, opposite of the previous behavior.

Signed-off-by: Jes B. Klinke <[email protected]>

Change-Id: I6c2fc46553d63d86a87fa6dc17bd130e40152bb8
@jesultra jesultra added CherryPick:earlgrey_es_sival This PR should be cherry-picked to earlgrey_es_sival CherryPick:earlgrey_1.0.0 This PR should be cherry-picked to earlgrey_1.0.0 labels Jan 15, 2025
@jesultra jesultra merged commit 8c16274 into lowRISC:master Jan 15, 2025
41 checks passed
Copy link

Backport failed for earlgrey_es_sival, because it was unable to cherry-pick the commit(s).

Please cherry-pick the changes locally and resolve any conflicts.

git fetch origin earlgrey_es_sival
git worktree add -d .worktree/backport-25820-to-earlgrey_es_sival origin/earlgrey_es_sival
cd .worktree/backport-25820-to-earlgrey_es_sival
git switch --create backport-25820-to-earlgrey_es_sival
git cherry-pick -x 9aefafbcd14b324ca492fc4d137bd7e5546d6eb8 7baa7540a522999b87e96db29fe061286bb8f47a

Copy link

Successfully created backport PR for earlgrey_1.0.0:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CherryPick:earlgrey_es_sival This PR should be cherry-picked to earlgrey_es_sival CherryPick:earlgrey_1.0.0 This PR should be cherry-picked to earlgrey_1.0.0 Manually CherryPick This PR should be manually cherry picked. SW:opentitantool
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants