Skip to content

Commit

Permalink
fixup! fixup! chore(core): refactor boot_args
Browse files Browse the repository at this point in the history
  • Loading branch information
cepetr committed Nov 7, 2023
1 parent e8c4b3e commit d26260b
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion core/embed/boardloader/memory_stm32u5a.ld
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ SECTIONS {
*(.fb2*);
. = ALIGN(4);
} >SRAM5

.boot_args : ALIGN(8) {
*(.boot_command*);
. = ALIGN(8);
Expand Down
2 changes: 1 addition & 1 deletion core/embed/trezorhal/stm32f4/boot_args.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

// 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.
// 1. In the bootloader, its value is set in the startup code.
// 2. In the firmware it holds command for the next boot and it is used
// when svc_reboot_to_bootloader() is called
boot_command_t g_boot_command_shadow;
Expand Down
2 changes: 1 addition & 1 deletion core/embed/trezorhal/unix/boot_args.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#include <common.h>
#include <string.h>

// The 'g_boot_command' variable stores the 'command' for the next
// The 'g_boot_command_shadow' variable stores the 'command' for the next
// reboot/jumping to the bootloadeer. It may be one of the
// 'BOOT_COMMAND_xxx' values defined in the enumeration, or it could
// be any other value that should be treated as a non-special action,
Expand Down
2 changes: 1 addition & 1 deletion core/src/apps/management/reboot_to_bootloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = True # utils.firmware_vendor() != "UNSAFE, DO NOT USE!"
is_official = utils.firmware_vendor() != "UNSAFE, DO NOT USE!"
if (
msg.boot_command == BootCommand.INSTALL_UPGRADE
and msg.firmware_header is not None
Expand Down

0 comments on commit d26260b

Please sign in to comment.