diff options
-rw-r--r-- | futility/cmd_update.c | 4 | ||||
-rw-r--r-- | futility/updater.c | 7 | ||||
-rw-r--r-- | futility/updater.h | 4 |
3 files changed, 10 insertions, 5 deletions
diff --git a/futility/cmd_update.c b/futility/cmd_update.c index 89df6cbb..fef24c69 100644 --- a/futility/cmd_update.c +++ b/futility/cmd_update.c @@ -213,8 +213,8 @@ static int do_update(int argc, char *argv[]) case OPT_CCD: args.fast_update = 1; args.force_update = 1; - args.write_protection = 0; - args.programmer = "raiden_debug_spi"; + args.write_protection = "0"; + args.programmer = "raiden_debug_spi:target=AP"; break; case OPT_DUMMY: diff --git a/futility/updater.c b/futility/updater.c index 9f8ef52e..c5a20c51 100644 --- a/futility/updater.c +++ b/futility/updater.c @@ -1464,7 +1464,12 @@ static int do_check_compatible_tpm_keys(struct updater_config *cfg, /* The stored tpm_fwver can be 0 (b/116298359#comment3). */ tpm_fwver = get_system_property(SYS_PROP_TPM_FWVER, cfg); if (tpm_fwver < 0) { - ERROR("Invalid tpm_fwver: %d.\n", tpm_fwver); + /* + * tpm_fwver is commonly misreported in --ccd mode, so allow + * force_update to ignore the reported value. + */ + if (!cfg->force_update) + ERROR("Invalid tpm_fwver: %d.\n", tpm_fwver); return -1; } diff --git a/futility/updater.h b/futility/updater.h index 2f5603e2..ff2fc4f9 100644 --- a/futility/updater.h +++ b/futility/updater.h @@ -107,9 +107,9 @@ struct updater_config { struct updater_config_arguments { char *image, *ec_image, *pd_image; char *archive, *quirks, *mode; - const char *programmer; + const char *programmer, *write_protection; char *model, *signature_id; - char *emulation, *sys_props, *write_protection; + char *emulation, *sys_props; char *output_dir; char *repack, *unpack; int is_factory, try_update, force_update, do_manifest, host_only; |