summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoel Kitching <kitching@google.com>2020-05-29 16:21:06 +0800
committerCommit Bot <commit-bot@chromium.org>2020-06-01 07:52:33 +0000
commit948c09b66690d4c04e3910d1a0afcef617119c75 (patch)
tree4afd80d199029457b5986995d0c31941af7d4a33
parentebb28ba36e7bed99c46062ddf620e20614bdbfd4 (diff)
downloadvboot-948c09b66690d4c04e3910d1a0afcef617119c75.tar.gz
vboot/ui: implement phone recovery screens
Finish implementing phone recovery screen step 1, and implement step 2. (Step 3 is in initramfs.) BUG=b:146399181 TEST=make clean && make runtests BRANCH=none Change-Id: I3b18aa0d6c5ec93cb9b69fec7976db434270db79 Signed-off-by: Joel Kitching <kitching@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2220820 Commit-Queue: Joel Kitching <kitching@chromium.org> Tested-by: Joel Kitching <kitching@chromium.org> Reviewed-by: Yu-Ping Wu <yupingso@chromium.org>
-rw-r--r--firmware/2lib/2ui_screens.c17
-rw-r--r--firmware/2lib/include/2api.h11
2 files changed, 23 insertions, 5 deletions
diff --git a/firmware/2lib/2ui_screens.c b/firmware/2lib/2ui_screens.c
index 50281e04..61cbb0f3 100644
--- a/firmware/2lib/2ui_screens.c
+++ b/firmware/2lib/2ui_screens.c
@@ -335,6 +335,8 @@ static const struct vb2_screen_info recovery_to_dev_screen = {
static const struct vb2_menu_item recovery_phone_step1_items[] = {
LANGUAGE_SELECT_ITEM,
+ NEXT_ITEM(VB2_SCREEN_RECOVERY_PHONE_STEP2),
+ BACK_ITEM,
};
static const struct vb2_screen_info recovery_phone_step1_screen = {
@@ -344,6 +346,20 @@ static const struct vb2_screen_info recovery_phone_step1_screen = {
};
/******************************************************************************/
+/* VB2_SCREEN_RECOVERY_PHONE_STEP2 */
+
+static const struct vb2_menu_item recovery_phone_step2_items[] = {
+ LANGUAGE_SELECT_ITEM,
+ BACK_ITEM,
+};
+
+static const struct vb2_screen_info recovery_phone_step2_screen = {
+ .id = VB2_SCREEN_RECOVERY_PHONE_STEP2,
+ .name = "Phone recovery step 2",
+ .menu = MENU_ITEMS(recovery_phone_step2_items),
+};
+
+/******************************************************************************/
/* VB2_SCREEN_RECOVERY_DISK_STEP1 */
static const struct vb2_menu_item recovery_disk_step1_items[] = {
@@ -573,6 +589,7 @@ static const struct vb2_screen_info *screens[] = {
&recovery_invalid_screen,
&recovery_to_dev_screen,
&recovery_phone_step1_screen,
+ &recovery_phone_step2_screen,
&recovery_disk_step1_screen,
&recovery_disk_step2_screen,
&recovery_disk_step3_screen,
diff --git a/firmware/2lib/include/2api.h b/firmware/2lib/include/2api.h
index 5b340821..3b5c731d 100644
--- a/firmware/2lib/include/2api.h
+++ b/firmware/2lib/include/2api.h
@@ -1180,12 +1180,13 @@ enum vb2_screen {
VB2_SCREEN_RECOVERY_INVALID = 0x201,
/* Confirm transition to developer mode */
VB2_SCREEN_RECOVERY_TO_DEV = 0x202,
- /* Recovery using disk */
- VB2_SCREEN_RECOVERY_DISK_STEP1 = 0x210,
- VB2_SCREEN_RECOVERY_DISK_STEP2 = 0x211,
- VB2_SCREEN_RECOVERY_DISK_STEP3 = 0x212,
/* Recovery using phone */
- VB2_SCREEN_RECOVERY_PHONE_STEP1 = 0x220,
+ VB2_SCREEN_RECOVERY_PHONE_STEP1 = 0x210,
+ VB2_SCREEN_RECOVERY_PHONE_STEP2 = 0x211,
+ /* Recovery using disk */
+ VB2_SCREEN_RECOVERY_DISK_STEP1 = 0x220,
+ VB2_SCREEN_RECOVERY_DISK_STEP2 = 0x221,
+ VB2_SCREEN_RECOVERY_DISK_STEP3 = 0x222,
/* Developer screen */
VB2_SCREEN_DEVELOPER_MODE = 0x300,
/* Confirm transition to normal mode */