From 8ac919aefac73c6debcee4f70b019ff42177670d Mon Sep 17 00:00:00 2001 From: Hung-Te Lin Date: Mon, 15 Apr 2019 14:37:17 +0800 Subject: futility: updater: Add '--ccd' for programming with closed case debugging CCD via Servo v4 or SuzyQ-like cables is becoming more popular so more developers want to flash firmware with that, and it seems better to have one short cut '--ccd' instead of always typing '--wp=0 --force --fast -p raiden_debug_spi'. BUG=None TEST=make futil; build/futility/futility update --ccd -i image.bin -v BRANCH=None Change-Id: I0ca8c49a46cc5f8f87fb4dc1936ac9eb0a889baa Signed-off-by: Hung-Te Lin Reviewed-on: https://chromium-review.googlesource.com/1564235 Reviewed-by: Julius Werner --- futility/cmd_update.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/futility/cmd_update.c b/futility/cmd_update.c index b3308c8e..1a56c4f4 100644 --- a/futility/cmd_update.c +++ b/futility/cmd_update.c @@ -16,6 +16,7 @@ enum { OPT_DUMMY = 0x100, + OPT_CCD, OPT_FAST, }; @@ -42,6 +43,7 @@ static struct option const long_opts[] = { {"wp", 1, NULL, 'W'}, {"host_only", 0, NULL, 'H'}, {"emulate", 1, NULL, 'E'}, + {"ccd", 0, NULL, OPT_CCD}, {"output_dir", 1, NULL, 'U'}, {"sys_props", 1, NULL, 'S'}, {"debug", 0, NULL, 'd'}, @@ -86,6 +88,7 @@ static void print_help(int argc, char *argv[]) " --host_only \tUpdate only AP (host) firmware\n" " --emulate=FILE \tEmulate system firmware using file\n" " --model=MODEL \tOverride system model for images\n" + " --ccd \tDo fast,force,wp=0,p=raiden_debug_spi\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" @@ -177,6 +180,12 @@ static int do_update(int argc, char *argv[]) args.verbosity++; break; + case OPT_CCD: + args.fast_update = 1; + args.force_update = 1; + args.write_protection = 0; + args.programmer = "raiden_debug_spi"; + break; case OPT_FAST: args.fast_update = 1; break; -- cgit v1.2.1