diff options
author | Furquan Shaikh <furquan@google.com> | 2015-05-14 12:53:19 -0700 |
---|---|---|
committer | ChromeOS Commit Bot <chromeos-commit-bot@chromium.org> | 2015-05-16 04:17:16 +0000 |
commit | 9101df2fe3ed4f0e8b65121ffc1c7e8b2d65b35d (patch) | |
tree | e90832599181e8222d660055bf962ecf84c3b5b5 /host | |
parent | 07e56f22b852f4d96af2b2df57da11f6938778dd (diff) | |
download | vboot-9101df2fe3ed4f0e8b65121ffc1c7e8b2d65b35d.tar.gz |
nvstorage: Add new flag VBNV_DEV_BOOT_FASTBOOT_FULL_CAP
Add a new flag to nvstorage for controlling fastboot capabilities
offered in firmware in dev-mode. By default, value of this flag would
be ignored in normal mode. Thus, when fastboot-based recovery is
entered from normal mode, only limited capability would be available
in firmware.
After switching to dev-mode, this flag can be set automatically by
user script after performing the wipe or it can be set manually using
crossystem. When fastboot-based recovery is entered from dev mode and
this flag is set, it will provide full fastboot capability in the
firmware.
BUG=chrome-os-partner:40196
BRANCH=None
TEST=Compiles successfully for smaug. make runalltests successful.
Change-Id: I761a9ab304dd90f0b73081acc9ce1f8d9052325f
Signed-off-by: Furquan Shaikh <furquan@google.com>
Reviewed-on: https://chromium-review.googlesource.com/271369
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Commit-Queue: Furquan Shaikh <furquan@chromium.org>
Trybot-Ready: Furquan Shaikh <furquan@chromium.org>
Tested-by: Furquan Shaikh <furquan@chromium.org>
Diffstat (limited to 'host')
-rw-r--r-- | host/lib/crossystem.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/host/lib/crossystem.c b/host/lib/crossystem.c index af0acc40..cb6b9602 100644 --- a/host/lib/crossystem.c +++ b/host/lib/crossystem.c @@ -499,6 +499,8 @@ int VbGetSystemPropertyInt(const char* name) { value = VbGetNvStorage(VBNV_DEV_BOOT_LEGACY); } else if (!strcasecmp(name,"dev_boot_signed_only")) { value = VbGetNvStorage(VBNV_DEV_BOOT_SIGNED_ONLY); + } else if (!strcasecmp(name,"dev_boot_fastboot_full_cap")) { + value = VbGetNvStorage(VBNV_DEV_BOOT_FASTBOOT_FULL_CAP); } else if (!strcasecmp(name,"oprom_needed")) { value = VbGetNvStorage(VBNV_OPROM_NEEDED); } else if (!strcasecmp(name,"recovery_subcode")) { @@ -653,6 +655,8 @@ int VbSetSystemPropertyInt(const char* name, int value) { return VbSetNvStorage_WithBackup(VBNV_DEV_BOOT_LEGACY, value); } else if (!strcasecmp(name,"dev_boot_signed_only")) { return VbSetNvStorage_WithBackup(VBNV_DEV_BOOT_SIGNED_ONLY, value); + } else if (!strcasecmp(name,"dev_boot_fastboot_full_cap")) { + return VbSetNvStorage_WithBackup(VBNV_DEV_BOOT_FASTBOOT_FULL_CAP, value); } return -1; |