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

boot command/args refactoring #3380

Merged
merged 1 commit into from
Nov 14, 2023

Conversation

cepetr
Copy link
Contributor

@cepetr cepetr commented Oct 31, 2023

I've refactored the boot command and arguments interface after merging the interaction-less update with the stm32u5 branch.

Passing and retrieving the reboot command and arguments should now be much clearer.

@matejcik
Copy link
Contributor

note: do not merge this before we tag BL 2.1.4

Copy link
Contributor

@matejcik matejcik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

concept ACK, now someone needs to actually review the actual code


// The 'g_boot_command_shadow' shadows a real boot command passed
// to the bootloader.
// 1. In the bootloader, it's value is set in the startup code.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo

Suggested change
// 1. In the bootloader, it's value is set in the startup code.
// 1. In the bootloader, its value is set in the startup code.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed, see d26260b

@@ -21,7 +21,7 @@ async def reboot_to_bootloader(msg: RebootToBootloader) -> NoReturn:
# For convenience, we block unofficial firmwares from jumping to bootloader
# this way, so that the user doesn't get mysterious "install failed" errors.
# (It would be somewhat nicer if this was a compile-time flag, but oh well.)
is_official = utils.firmware_vendor() != "UNSAFE, DO NOT USE!"
is_official = True # utils.firmware_vendor() != "UNSAFE, DO NOT USE!"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this shoud not stay here of course

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed, see d26260b

Copy link
Contributor

@TychoVrahe TychoVrahe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, added some questions below.

core/embed/trezorhal/unix/boot_args.c Outdated Show resolved Hide resolved
core/embed/trezorhal/stm32f4/boot_args.c Show resolved Hide resolved
core/embed/trezorhal/stm32f4/supervise.c Show resolved Hide resolved
Copy link
Contributor

@TychoVrahe TychoVrahe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, please squash and add [no changelog] to the commit message

@TychoVrahe TychoVrahe merged commit d693e1b into tychovrahe/u5/basic_support Nov 14, 2023
6 of 9 checks passed
@TychoVrahe TychoVrahe deleted the cepetr/bootargs branch November 14, 2023 12:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants