summaryrefslogtreecommitdiff
path: root/tests/vb2_misc_tests.c
diff options
context:
space:
mode:
authorMary Ruthven <mruthven@google.com>2015-10-06 10:42:31 -0700
committerchrome-bot <chrome-bot@chromium.org>2015-10-13 14:02:26 -0700
commit12a55f255aaea2f12362e4f832a0bd48eb29f5dd (patch)
treef235ebf2cd846c852371a96cf76e3282ff0c26be /tests/vb2_misc_tests.c
parent73a6372d22f74d0396253f6e5080442edec55d7f (diff)
downloadvboot-12a55f255aaea2f12362e4f832a0bd48eb29f5dd.tar.gz
Add NV flag to default boot legacy OS
In developer mode, this option will make the system try to boot into a legacy OS first after the 30 second timeout. This removes the need to press a key during boot to try legacy mode and the need to remove the write protect screw to boot legacy as default. BUG=chromium:310697 BRANCH=none TEST=make runtests Change-Id: I9a9f64c14ad015e21d08eec36e8fc187189cd2f2 Signed-off-by: Mary Ruthven <mruthven@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/304077 Reviewed-by: Randall Spangler <rspangler@chromium.org>
Diffstat (limited to 'tests/vb2_misc_tests.c')
-rw-r--r--tests/vb2_misc_tests.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/vb2_misc_tests.c b/tests/vb2_misc_tests.c
index 8be5ae3a..aa3b061f 100644
--- a/tests/vb2_misc_tests.c
+++ b/tests/vb2_misc_tests.c
@@ -310,6 +310,7 @@ static void dev_switch_tests(void)
vb2_nv_set(&cc, VB2_NV_DEV_BOOT_LEGACY, 1);
vb2_nv_set(&cc, VB2_NV_DEV_BOOT_SIGNED_ONLY, 1);
vb2_nv_set(&cc, VB2_NV_DEV_BOOT_FASTBOOT_FULL_CAP, 1);
+ vb2_nv_set(&cc, VB2_NV_DEV_DEFAULT_BOOT, 1);
vb2_nv_set(&cc, VB2_NV_FASTBOOT_UNLOCK_IN_FW, 1);
TEST_SUCC(vb2_check_dev_switch(&cc), "dev mode off");
TEST_EQ(vb2_nv_get(&cc, VB2_NV_DEV_BOOT_USB),
@@ -320,6 +321,8 @@ static void dev_switch_tests(void)
0, " cleared dev boot signed only");
TEST_EQ(vb2_nv_get(&cc, VB2_NV_DEV_BOOT_FASTBOOT_FULL_CAP),
0, " cleared dev boot fastboot full cap");
+ TEST_EQ(vb2_nv_get(&cc, VB2_NV_DEV_DEFAULT_BOOT),
+ 0, " cleared dev default boot");
TEST_EQ(vb2_nv_get(&cc, VB2_NV_FASTBOOT_UNLOCK_IN_FW),
0, " cleared dev boot fastboot unlock in fw");