7 Commits

Author SHA1 Message Date
Simon Glass
29e684deda bootctl: Add the logic for disk unlock using a TKey
The unlock process is quite different with a TKey, since we need to load
the signing app with the user's passphrase as the USS. If the TKey is
not already in firmware mode we must prompt the user to remove and
re-insert it.

The easiest way to implement this is via a state machine. Add the
required logic:

- detect key presence and absence
- prompt for removal and insertion
- send the app, while keeping the UI responsive
- unlock the disk once the TKey provides a key
- report success or failure to the user

Ensure that the logic is only used if CONFIG_TKEY and CONFIG_LUKS are
both enabled.

Co-developed-by: Claude <claude@anthropic.com>
Signed-off-by: Simon Glass <simon.glass@canonical.com>
2025-12-07 17:18:57 -07:00
Simon Glass
9bdd221a14 bootctl: Provide an extra poll between select and booting
Selecting an OS may cause the UI to change, so give it a chance to show
those changes before booting.

Signed-off-by: Simon Glass <simon.glass@canonical.com>
2025-12-07 17:18:57 -07:00
Simon Glass
4eaef8aa12 bootctl: Enhance the UI to support a TKey
When unlocking an encrypted disk with a TKey we need a few more UI
operations:

- allow the password-entry textline to be shown/hidden
- allow showing instructions to the user, as well as unlock result
- obtain the password entered by the user

Add these to the API and implement them in the multi UI.

Signed-off-by: Simon Glass <simon.glass@canonical.com>
2025-12-07 17:18:57 -07:00
Simon Glass
781e013812 bootctl: Add an option to switch the layout
Provide an operation to switch to a different layout, for use with the
upcoming 'multi' UI.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-10-18 09:38:25 +01:00
Simon Glass
46a205b1ca bootctl: Provide an option to slow the display refresh
When a mouse pointer is not used, there is typically no need to refresh
the display unless something changes. Add an option to allow slow
refresh.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-10-18 09:38:25 +01:00
Simon Glass
001eeb2c8d bootctl: Create a common struct for the BOOTCTL_UI uclass
All UI implementations will likely share a number of common elements, so
move these into a per-device uclass struct.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-10-18 09:38:25 +01:00
Simon Glass
d9152ea75e bootctl: Initial experimentation
This provides a basic prototype for boot control.

Some documentation is in boot/bootctl/README.rst
2025-09-28 14:32:36 -06:00