summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorHsuan Ting Chen <roccochen@chromium.org>2020-03-24 16:51:42 +0800
committerCommit Bot <commit-bot@chromium.org>2020-05-04 07:03:46 +0000
commitb4dd58141ba7d003029bec0ad3391327f32a8a39 (patch)
tree74b9cb4fda72c764b98a516207b19a17c0f1561f /Makefile
parent173ac74263e1979e4b05911ba8b04ddc3bd27029 (diff)
downloadvboot-b4dd58141ba7d003029bec0ad3391327f32a8a39.tar.gz
vboot: Implement common UI loop
Add config DETACHABLE to control the navigation in menu UI. Implement 4 screens: - VB2_SCREEN_RECOVERY_SELECT - VB2_SCREEN_RECOVERY_INVALID - VB2_SCREEN_RECOVERY_PHONE_STEP1 - VB2_SCREEN_RECOVERY_DISK_STEP1 Handling user inputs. - Shutdown request through VbExIsShutdownRequested. - Navigate with up, down, and enter key. - Navigate with volume up, volume down, and power button in DETACHABLE. Implement common UI loop, currently used for manual and non-manual recovery (developer forthcoming). BRANCH=none BUG=b:146399181 TEST=USE="menu_ui" emerge-nami depthcharge TEST=USE="menu_ui detachable" emerge-nami depthcharge TEST=make clean && make runtests TEST=DETACHABLE=1; make clean && make runtests Cq-Depend: chromium:2152212 Signed-off-by: Hsuan Ting Chen <roccochen@chromium.org> Change-Id: I4e0f2cdf053f75935529826df215b06c8a9af4cc Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2117810 Reviewed-by: Yu-Ping Wu <yupingso@chromium.org>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile10
1 files changed, 10 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index cee35bdb..b5b68b20 100644
--- a/Makefile
+++ b/Makefile
@@ -185,6 +185,13 @@ ifneq (${MOCK_TPM},)
CFLAGS += -DMOCK_TPM
endif
+# DETACHABLE indicates whether the device is a detachable or not.
+ifneq ($(filter-out 0,${DETACHABLE}),)
+CFLAGS += -DDETACHABLE=1
+else
+CFLAGS += -DDETACHABLE=0
+endif
+
# Enable the menu-based user interface.
ifneq ($(filter-out 0,${MENU_UI}),)
CFLAGS += -DMENU_UI=1
@@ -372,6 +379,7 @@ FWLIB_SRCS = \
firmware/2lib/2sha_utility.c \
firmware/2lib/2tpm_bootmode.c \
firmware/2lib/2ui.c \
+ firmware/2lib/2ui_screens.c \
firmware/lib/cgptlib/cgptlib.c \
firmware/lib/cgptlib/cgptlib_internal.c \
firmware/lib/cgptlib/crc32.c \
@@ -716,6 +724,7 @@ TEST2X_NAMES = \
tests/vb2_sha_api_tests \
tests/vb2_sha_tests \
tests/vb2_ui_tests \
+ tests/vb2_ui_utility_tests \
tests/hmac_test
TEST20_NAMES = \
@@ -1233,6 +1242,7 @@ run2tests: install_for_test
${RUNTEST} ${BUILD_RUN}/tests/vb2_sha_api_tests
${RUNTEST} ${BUILD_RUN}/tests/vb2_sha_tests
${RUNTEST} ${BUILD_RUN}/tests/vb2_ui_tests
+ ${RUNTEST} ${BUILD_RUN}/tests/vb2_ui_utility_tests
${RUNTEST} ${BUILD_RUN}/tests/vb20_api_kernel_tests
${RUNTEST} ${BUILD_RUN}/tests/vb20_kernel_tests
${RUNTEST} ${BUILD_RUN}/tests/vb20_misc_tests