mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-12-22 06:18:07 +00:00
feat(core/bootloader_emu): allow explicit bootloader locking from command line
This commit is contained in:
parent
c48b606867
commit
21959996bd
@ -7,6 +7,9 @@
|
|||||||
#include "flash.h"
|
#include "flash.h"
|
||||||
#include "model.h"
|
#include "model.h"
|
||||||
#include "rust_ui.h"
|
#include "rust_ui.h"
|
||||||
|
#ifdef USE_OPTIGA
|
||||||
|
#include "secret.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "emulator.h"
|
#include "emulator.h"
|
||||||
|
|
||||||
@ -40,9 +43,17 @@ __attribute__((noreturn)) int main(int argc, char **argv) {
|
|||||||
(void)ret;
|
(void)ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (argc == 2 && argv[1][0] == 's') {
|
if (argc == 2) {
|
||||||
// Run the firmware
|
if (argv[1][0] == 's') {
|
||||||
stay_in_bootloader_flag = STAY_IN_BOOTLOADER_FLAG;
|
// Run the firmware
|
||||||
|
stay_in_bootloader_flag = STAY_IN_BOOTLOADER_FLAG;
|
||||||
|
}
|
||||||
|
#ifdef USE_OPTIGA
|
||||||
|
else if (argv[1][0] == 'l') {
|
||||||
|
// write bootloader-lock secret
|
||||||
|
secret_write_header();
|
||||||
|
}
|
||||||
|
#endif
|
||||||
} else if (argc == 4) {
|
} else if (argc == 4) {
|
||||||
display_init();
|
display_init();
|
||||||
display_backlight(180);
|
display_backlight(180);
|
||||||
|
Loading…
Reference in New Issue
Block a user