Switch away from a pre-derived key so that LUKS2 partitions can be
unlocked. Update the ulock message to be more generic.
Signed-off-by: Simon Glass <simon.glass@canonical.com>
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>
Tidy up the code style for checking the result of read_images() and drop
some commented-out debug lines.
Also fix a shadowed variable while we are here.
Signed-off-by: Simon Glass <simon.glass@canonical.com>
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>
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>
Set up a textline object to allow the user to enter a passphrase and a
text object to display messages for the user.
Signed-off-by: Simon Glass <simon.glass@canonical.com>
The bootctl tests are currently disabled due to some image
incompatibilities: the multi UI uses one image and the simple UI uses a
different one.
Update the logic to switch between these logos when the layout changes.
For now, use the U-Boot logo in both cases.
Signed-off-by: Simon Glass <simon.glass@canonical.com>
Since scene_calc_dims() is done by scene_arrange(), we don't need to do
an explicit call to scene_calc_dims() first. Drop it from both UIs.
Signed-off-by: Simon Glass <simon.glass@canonical.com>
Add a new 'multi' UI which can display in a simple format (like GRUB) as
well as a more modern format with a mouse.
Signed-off-by: Simon Glass <sjg@chromium.org>
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>
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>