vboot/ui: implement to_dev transition flow
Introduce three new action hooks:
Init function runs once when changing to the screen.
Action function runs repeatedly while on the screen.
Action function takes precedence over target screen if non-NULL.
Create the VB2_SCREEN_RECOVERY_TO_DEV screen, and add a
keyboard shortcut to get to that screen directly when in
manual recovery mode: Ctrl+D.
The TO_DEV screen repeatedly checks for the correct physical
verification state. When that state is triggered, it switches
to dev mode and reboots. The trigger depends on physical
- PHYSICAL_PRESENCE_KEYBOARD: wait for ENTER key on the
confirm button, pressed by internal keyboard
- !PHYSICAL_PRESENCE_KEYBOARD: wait for the physical presence
button (recovery or power) to be pressed and released
- SPACE character also cancels in order to preserve prior
Note that currently there is no way to exit developer mode
once it has been enabled.
TEST=make clean && make runtests
Signed-off-by: Joel Kitching <email@example.com>
Reviewed-by: Joel Kitching <firstname.lastname@example.org>
Commit-Queue: Joel Kitching <email@example.com>
Tested-by: Joel Kitching <firstname.lastname@example.org>
6 files changed