mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-12-23 06:48:16 +00:00
bootloader: don't show recovery seed warning if no firmware is present
This commit is contained in:
parent
0200ee5763
commit
09eaaa09ee
@ -322,12 +322,14 @@ static void hid_rx_callback(usbd_device *dev, uint8_t ep)
|
|||||||
|
|
||||||
if (flash_state == STATE_OPEN) {
|
if (flash_state == STATE_OPEN) {
|
||||||
if (msg_id == 0x0006) { // FirmwareErase message (id 6)
|
if (msg_id == 0x0006) { // FirmwareErase message (id 6)
|
||||||
layoutDialog(&bmp_icon_question, "Abort", "Continue", NULL, "Install new", "firmware?", NULL, "Never do this without", "your recovery card!", NULL);
|
if (firmware_present) {
|
||||||
do {
|
layoutDialog(&bmp_icon_question, "Abort", "Continue", NULL, "Install new", "firmware?", NULL, "Never do this without", "your recovery card!", NULL);
|
||||||
delay(100000);
|
do {
|
||||||
buttonUpdate();
|
delay(100000);
|
||||||
} while (!button.YesUp && !button.NoUp);
|
buttonUpdate();
|
||||||
if (button.YesUp) {
|
} while (!button.YesUp && !button.NoUp);
|
||||||
|
}
|
||||||
|
if (!firmware_present || button.YesUp) {
|
||||||
// backup metadata
|
// backup metadata
|
||||||
memcpy(meta_backup, (void *)FLASH_META_START, FLASH_META_LEN);
|
memcpy(meta_backup, (void *)FLASH_META_START, FLASH_META_LEN);
|
||||||
flash_unlock();
|
flash_unlock();
|
||||||
|
Loading…
Reference in New Issue
Block a user