vboot_reference: migrate out of flashrom deprecated options
This change replaces --diff and --fast-verify for the supported
equivalent flashrom options
BRANCH=none
BUG=b:186479007
TEST=tryjobs
Change-Id: I614ba71c606dbe4e3a1b4988df845bcbbd61dd01
Signed-off-by: Daniel Campello <campello@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2853623
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
diff --git a/cgpt/cgpt_nor.c b/cgpt/cgpt_nor.c
index f7e65e8..2e43918 100644
--- a/cgpt/cgpt_nor.c
+++ b/cgpt/cgpt_nor.c
@@ -267,7 +267,7 @@
goto out_free;
}
const char *const argv1[] = {FLASHROM_PATH, "-i", "RW_GPT_PRIMARY:rw_gpt_1",
- "-w", "--fast-verify"};
+ "-w", "--noverify-all"};
// Redirect stdout to /dev/null so that flashrom does not muck up cgpt's
// output.
if (subprocess_run(argv1, &subprocess_null, &subprocess_null, NULL) != 0) {
@@ -275,7 +275,7 @@
nr_fails++;
}
const char *const argv2[] = {FLASHROM_PATH, "-i", "RW_GPT_SECONDARY:rw_gpt_2",
- "-w", "--fast-verify"};
+ "-w", "--noverify-all"};
// Redirect stdout to /dev/null so that flashrom does not muck up cgpt's
// output.
if (subprocess_run(argv2, &subprocess_null, &subprocess_null, NULL) != 0) {
diff --git a/futility/updater_utils.c b/futility/updater_utils.c
index a441e03..1c626bc 100644
--- a/futility/updater_utils.c
+++ b/futility/updater_utils.c
@@ -681,7 +681,7 @@
diff_image, tempfiles);
if (!tmp_diff)
return -1;
- ASPRINTF(&extra, "--noverify --diff=%s", tmp_diff);
+ ASPRINTF(&extra, "--noverify --flash-contents=%s", tmp_diff);
}
r = host_flashrom(FLASHROM_WRITE, tmp_path, programmer, verbosity,
diff --git a/host/lib/flashrom.c b/host/lib/flashrom.c
index 62ab1bc..e83dfb2 100644
--- a/host/lib/flashrom.c
+++ b/host/lib/flashrom.c
@@ -155,7 +155,7 @@
FLASHROM_EXEC_NAME,
"-p",
programmer,
- "--fast-verify",
+ "--noverify-all",
"-w",
region ? "-i" : tmpfile,
region ? region_param : NULL,
diff --git a/scripts/image_signing/gbb_flags_common.sh b/scripts/image_signing/gbb_flags_common.sh
index 9577f7a..63c3f12 100755
--- a/scripts/image_signing/gbb_flags_common.sh
+++ b/scripts/image_signing/gbb_flags_common.sh
@@ -55,5 +55,5 @@
}
flashrom_write() {
- flashrom -p host -i GBB --fast-verify -w "$@"
+ flashrom -p host -i GBB --noverify-all -w "$@"
}
diff --git a/tests/vb2_host_flashrom_tests.c b/tests/vb2_host_flashrom_tests.c
index 9187e75..8552d0a 100644
--- a/tests/vb2_host_flashrom_tests.c
+++ b/tests/vb2_host_flashrom_tests.c
@@ -58,7 +58,7 @@
int captured_verify_int = FLASHROM_VERIFY_UNSPECIFIED;
struct option long_opts[] = {
{
- .name = "fast-verify",
+ .name = "noverify-all",
.has_arg = no_argument,
.flag = &captured_verify_int,
.val = FLASHROM_VERIFY_FAST,