I dove into this a bit yesterday. I believe the issue stems from the UEFI WaitForEvent signal being triggered when selecting a boot entry from the boot menu. The signal may not be getting cleared/reset once entering the updater. The program sees the signal, but the key variable is empty, triggering the NOT_READY condition. Both functions raw_key() and get_key() seem to be affected by this.
If you select the entry from the boot menu, then press enter before the program hits the NOT_READY state, it will flash as expected. Adding a stall directly before raw_key() makes it easier to see.
- Prints "Press enter to commence flashing, the system may reboot..."
- UEFI stall
- During stall, press
enter
- stall finishes
- starts the flash process without an error
I dove into this a bit yesterday. I believe the issue stems from the UEFI
WaitForEventsignal being triggered when selecting a boot entry from the boot menu. The signal may not be getting cleared/reset once entering the updater. The program sees the signal, but thekeyvariable is empty, triggering theNOT_READYcondition. Both functionsraw_key()andget_key()seem to be affected by this.If you select the entry from the boot menu, then press
enterbefore the program hits theNOT_READYstate, it will flash as expected. Adding astalldirectly beforeraw_key()makes it easier to see.enter