summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFurquan Shaikh <furquan@google.com>2015-08-16 03:56:37 -0700
committerChromeOS Commit Bot <chromeos-commit-bot@chromium.org>2015-08-16 17:55:04 +0000
commit133d65d1ef69759e5afabe5eeeca60d8edae7278 (patch)
treee05ec4391c155dcc244ae164256d0b85df135026
parent03cb3da042c6c18f9fcf1fcae3bf162b53045392 (diff)
downloadvboot-133d65d1ef69759e5afabe5eeeca60d8edae7278.tar.gz
vbnv: Do not clear fastboot_unlock if dev-mode is not active
The flag "fastboot_unlock_in_fw" decides whether device unlock is allowed in firmware. This flag is not related to dev_boot_* flags. If this flag is cleared every time dev mode is not active, then it will not be possible to unlock the device in firmware at all. BUG=None BRANCH=None TEST=Compiles successfully and "fastboot oem unlock" works in firmware with fastboot_unlock_in_fw flag set in VbNvStorage. Change-Id: I57ca21f335f9e6ead7997f2b13504402827aba08 Signed-off-by: Furquan Shaikh <furquan@google.com> Reviewed-on: https://chromium-review.googlesource.com/293950 Trybot-Ready: Furquan Shaikh <furquan@chromium.org> Tested-by: Furquan Shaikh <furquan@chromium.org> Reviewed-by: Aaron Durbin <adurbin@chromium.org> Commit-Queue: Furquan Shaikh <furquan@chromium.org>
-rw-r--r--firmware/2lib/2misc.c1
-rw-r--r--firmware/lib/vboot_api_init.c1
2 files changed, 0 insertions, 2 deletions
diff --git a/firmware/2lib/2misc.c b/firmware/2lib/2misc.c
index 5805093b..36a79b7a 100644
--- a/firmware/2lib/2misc.c
+++ b/firmware/2lib/2misc.c
@@ -264,7 +264,6 @@ int vb2_check_dev_switch(struct vb2_context *ctx)
vb2_nv_set(ctx, VB2_NV_DEV_BOOT_LEGACY, 0);
vb2_nv_set(ctx, VB2_NV_DEV_BOOT_SIGNED_ONLY, 0);
vb2_nv_set(ctx, VB2_NV_DEV_BOOT_FASTBOOT_FULL_CAP, 0);
- vb2_nv_set(ctx, VB2_NV_FASTBOOT_UNLOCK_IN_FW, 0);
}
if (ctx->flags & VB2_CONTEXT_FORCE_WIPEOUT_MODE)
diff --git a/firmware/lib/vboot_api_init.c b/firmware/lib/vboot_api_init.c
index 419175cf..10b435c2 100644
--- a/firmware/lib/vboot_api_init.c
+++ b/firmware/lib/vboot_api_init.c
@@ -323,7 +323,6 @@ VbError_t VbInit(VbCommonParams *cparams, VbInitParams *iparams)
VbNvSet(&vnc, VBNV_DEV_BOOT_LEGACY, 0);
VbNvSet(&vnc, VBNV_DEV_BOOT_SIGNED_ONLY, 0);
VbNvSet(&vnc, VBNV_DEV_BOOT_FASTBOOT_FULL_CAP, 0);
- VbNvSet(&vnc, VBNV_FASTBOOT_UNLOCK_IN_FW, 0);
/*
* Back up any changes now, so these values can't be forgotten
* by draining the battery. We really only care about these