summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorHsuan Ting Chen <roccochen@chromium.org>2020-03-05 14:57:51 +0800
committerCommit Bot <commit-bot@chromium.org>2020-03-21 09:33:12 +0000
commit5feac6eb9d105a1c9526b4dd981dce36ba91d79d (patch)
treedfd4567fe040b8b6188366cfc66bedc9c678d09b /Makefile
parent29ac143e2806182a4d25c6c6d41cda063d786807 (diff)
downloadvboot-5feac6eb9d105a1c9526b4dd981dce36ba91d79d.tar.gz
vboot: Introduce menu UI
According to crbug.com/1033815, add files for MENU_UI: - 2ui.{c,h} for entry point functions called by kernel selection. - vb2_ui_tests.c for tests (normal boot included). There are three entry points: vb2_developer_menu(), vb2_broken_recovery_menu(), and vb2_manual_recovery_menu(). Only infinite loop for this CL, others will be added in separate CLs. BRANCH=none BUG=b:146399181,chromium:1033815 TEST=USE="legacy_clamshell_ui" emerge-nami vboot_reference depthcharge TEST=USE="legacy_menu_ui" emerge-nami vboot_reference depthcharge TEST=USE="menu_ui" emerge-nami vboot_reference depthcharge TEST=make runtests Cq-Depend: chromium:2043102 Change-Id: I5a23eb006754b5ff08eb42bcd5021374995eab40 Signed-off-by: Hsuan Ting Chen <roccochen@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2087557 Reviewed-by: Joel Kitching <kitching@chromium.org> Commit-Queue: 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 6a610c89..5fd2ec6d 100644
--- a/Makefile
+++ b/Makefile
@@ -192,6 +192,13 @@ ifneq (${MOCK_TPM},)
CFLAGS += -DMOCK_TPM
endif
+# Enable the menu-based user interface.
+ifneq ($(filter-out 0,${MENU_UI}),)
+CFLAGS += -DMENU_UI=1
+else
+CFLAGS += -DMENU_UI=0
+endif
+
# LEGACY_MENU_UI controls whether to enable legacy menu UI, which is used with
# devices that don't have a keyboard (detachables).
# Pass LEGACY_MENU_UI= (or =0) to make to disable feature.
@@ -369,6 +376,7 @@ FWLIB_SRCS = \
firmware/2lib/2sha512.c \
firmware/2lib/2sha_utility.c \
firmware/2lib/2tpm_bootmode.c \
+ firmware/2lib/2ui.c \
firmware/lib/cgptlib/cgptlib.c \
firmware/lib/cgptlib/cgptlib_internal.c \
firmware/lib/cgptlib/crc32.c \
@@ -709,6 +717,7 @@ TEST2X_NAMES = \
tests/vb2_secdata_kernel_tests \
tests/vb2_sha_api_tests \
tests/vb2_sha_tests \
+ tests/vb2_ui_tests \
tests/hmac_test
TEST20_NAMES = \
@@ -1219,6 +1228,7 @@ run2tests: install_for_test
${RUNTEST} ${BUILD_RUN}/tests/vb2_secdata_kernel_tests
${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/vb20_api_kernel_tests
${RUNTEST} ${BUILD_RUN}/tests/vb20_kernel_tests
${RUNTEST} ${BUILD_RUN}/tests/vb20_misc_tests