Hello Nico Huber,
I'd like you to do a code review. Please visit
https://review.coreboot.org/19194
to review the following change.
Change subject: Add option (-A, --noverify-all) to not verify the whole chip after write ......................................................................
Add option (-A, --noverify-all) to not verify the whole chip after write
This also reduces the data read before the write to the included layout regions.
Change-Id: I00d5d8ae1f1610cd638e1f36fbf60f5159119ad6 Signed-off-by: Nico Huber nico.huber@secunet.com --- M cli_classic.c 1 file changed, 9 insertions(+), 4 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/94/19194/1
diff --git a/cli_classic.c b/cli_classic.c index d7e17f7..d23a3a3 100644 --- a/cli_classic.c +++ b/cli_classic.c @@ -42,7 +42,7 @@ "-z|" #endif "-p <programmername>[:<parameters>] [-c <chipname>]\n" - "[-E|(-r|-w|-v) <file>] [-l <layoutfile> [-i <imagename>]...] [-n] [-f]]\n" + "[-E|(-r|-w|-v) <file>] [-l <layoutfile> [-i <imagename>]...] [-n] [-A] [-f]]\n" "[-V[V[V]]] [-o <logfile>]\n\n", name);
printf(" -h | --help print this help text\n" @@ -55,6 +55,7 @@ " -c | --chip <chipname> probe only for specified flash chip\n" " -f | --force force specific operations (see man page)\n" " -n | --noverify don't auto-verify\n" + " -A | --noverify-all don't auto-verify whole chip\n" " -l | --layout <layoutfile> read ROM layout from <layoutfile>\n" " -i | --image <name> only flash image <name> from flash layout\n" " -o | --output <logfile> log output to <logfile>\n" @@ -103,17 +104,18 @@ int list_supported_wiki = 0; #endif int read_it = 0, write_it = 0, erase_it = 0, verify_it = 0; - int dont_verify_it = 0, list_supported = 0, operation_specified = 0; + int dont_verify_it = 0, dont_verify_all = 0, list_supported = 0, operation_specified = 0; enum programmer prog = PROGRAMMER_INVALID; int ret = 0;
- static const char optstring[] = "r:Rw:v:nVEfc:l:i:p:Lzho:"; + static const char optstring[] = "r:Rw:v:nAVEfc:l:i:p:Lzho:"; static const struct option long_options[] = { {"read", 1, NULL, 'r'}, {"write", 1, NULL, 'w'}, {"erase", 0, NULL, 'E'}, {"verify", 1, NULL, 'v'}, {"noverify", 0, NULL, 'n'}, + {"noverify-all", 0, NULL, 'A'}, {"chip", 1, NULL, 'c'}, {"verbose", 0, NULL, 'V'}, {"force", 0, NULL, 'f'}, @@ -189,6 +191,9 @@ cli_classic_abort_usage(); } dont_verify_it = 1; + break; + case 'A': + dont_verify_all = 1; break; case 'c': chip_to_probe = strdup(optarg); @@ -536,7 +541,7 @@ fl_flag_set(fill_flash, FL_FLAG_FORCE, !!force); fl_flag_set(fill_flash, FL_FLAG_FORCE_BOARDMISMATCH, !!force_boardmismatch); fl_flag_set(fill_flash, FL_FLAG_VERIFY_AFTER_WRITE, !dont_verify_it); - fl_flag_set(fill_flash, FL_FLAG_VERIFY_WHOLE_CHIP, true); + fl_flag_set(fill_flash, FL_FLAG_VERIFY_WHOLE_CHIP, !dont_verify_all);
/* FIXME: We should issue an unconditional chip reset here. This can be * done once we have a .reset function in struct flashchip.