summaryrefslogtreecommitdiff
path: root/futility/cmd_update.c
diff options
context:
space:
mode:
authorHung-Te Lin <hungte@chromium.org>2018-10-15 15:33:47 +0800
committerchrome-bot <chrome-bot@chromium.org>2018-10-22 06:16:35 -0700
commit4e066900210883a4f502e626998daf79b9b66665 (patch)
tree8111b86089364581014f83117b5167e3977fbb2a /futility/cmd_update.c
parent92fe37cef28d58f6d64c625b30e72fab99ff42a5 (diff)
downloadvboot-4e066900210883a4f502e626998daf79b9b66665.tar.gz
futility: updater: Support white label from VPD and --signature_id
For white label devices, we have to select and patch key files (root key and vblock) by VPD (`whitelabel_tag` or `customization_id`). The white label tag VPD will be processed and converted to a "signature ID" for key selection. To support that, updater has to fetch current (system) image if the matched model is following white label (so we can read VPD from it). For developers who want to load and use particular files, they can use --signature_id to override VPD values. BUG=chromium:875551 TEST=TEST=make futil; tests/futility/run_test_scripts.sh $(pwd)/build/futility BRANCH=None Change-Id: I3630bae28d1a8493b56d0e5efd29f3c61a470379 Signed-off-by: Hung-Te Lin <hungte@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1278420
Diffstat (limited to 'futility/cmd_update.c')
-rw-r--r--futility/cmd_update.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/futility/cmd_update.c b/futility/cmd_update.c
index ce81660d..2ba8a4e8 100644
--- a/futility/cmd_update.c
+++ b/futility/cmd_update.c
@@ -27,6 +27,7 @@ static struct option const long_opts[] = {
{"list-quirks", 0, NULL, 'L'},
{"mode", 1, NULL, 'm'},
{"model", 1, NULL, 'M'},
+ {"signature_id", 1, NULL, 'G'},
{"manifest", 0, NULL, 'A'},
{"factory", 0, NULL, 'Y'},
{"force", 0, NULL, 'F'},
@@ -66,6 +67,7 @@ static void print_help(int argc, char *argv[])
" --wp=1|0 \tSpecify write protection status\n"
" --emulate=FILE \tEmulate system firmware using file\n"
" --model=MODEL \tOverride system model for images\n"
+ " --signature_id=S\tOverride signature ID for key files\n"
" --sys_props=LIST\tList of system properties to override\n"
"-d, --debug \tPrint debugging messages\n"
"-v, --verbose \tPrint verbose messages\n"
@@ -113,6 +115,9 @@ static int do_update(int argc, char *argv[])
case 'M':
args.model = optarg;
break;
+ case 'G':
+ args.signature_id = optarg;
+ break;
case 'A':
args.do_manifest = 1;
break;