summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFurquan Shaikh <furquan@google.com>2016-01-08 17:33:16 (GMT)
committerChromeOS bot <3su6n15k.default@developer.gserviceaccount.com>2016-01-20 17:13:46 (GMT)
commitf5c3dc4f6559fa6a54aea91a9a4058c7ad851116 (patch)
tree02b338bee304230cab0b1e9964c3951f87bbe6f4
parentb7687f7adbb46766d1808e740d3036368559e17e (diff)
downloaddepthcharge-firmware-smaug-7900.B.tar.gz
depthcharge-firmware-smaug-7900.B.tar.xz
smaug: Add variables to define locked state (0/1)firmware-smaug-7900.B
If device is in developer mode, then locked = 0. Else locked = 1. BUG=b:26409599 BRANCH=None TEST=Compiles successfully. Change-Id: I67ad8da96ed222f735a6bfee30a2c92ef6538502 Signed-off-by: Furquan Shaikh <furquan@google.com> Reviewed-on: https://chromium-review.googlesource.com/321110 Trybot-Ready: Furquan Shaikh <furquan@chromium.org> Tested-by: Furquan Shaikh <furquan@chromium.org> Reviewed-by: Rom Lemarchand <romlem@google.com> Commit-Queue: Furquan Shaikh <furquan@chromium.org>
-rw-r--r--src/boot/android_dt.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/boot/android_dt.c b/src/boot/android_dt.c
index b531417..ff77887 100644
--- a/src/boot/android_dt.c
+++ b/src/boot/android_dt.c
@@ -36,6 +36,13 @@ static const char *get_verifiedbootstate(void)
return "green";
}
+static const char *get_is_device_locked(void)
+{
+ if (vboot_in_developer())
+ return "0";
+ return "1";
+}
+
const char *__attribute__((weak)) get_bootreason(void)
{
return NULL;
@@ -58,6 +65,8 @@ static int fix_device_tree(DeviceTreeFixup *fixup, DeviceTree *tree)
{ "verifiedbootstate", get_verifiedbootstate() },
{ "bootreason", get_bootreason() },
{ "bootloader", get_active_fw_id() },
+ { "oem_unlock_supported", "1" },
+ { "locked", get_is_device_locked() },
};
firmware_node = dt_find_node(tree->root, firmware_dt_name,