faft: Update options for calling firmware updater
FAFT was calling firmware updater with options deprecated by updater5:
- nocheck_keys is now done by --force.
- noupdate_ec (also PD) is now --host_only.
- noupdate_main is no longer supported due to software sync.
BUG=None
TEST=Ran firmware_UpdateFirmwareDataKeyVersion
CQ-DPEND=CL:1295069,CL:1295070
Change-Id: Ib6a7a3d8d43532ba01187bfb7f70e26f64a80a22
Reviewed-on: https://chromium-review.googlesource.com/1295530
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Tested-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Wai-Hong Tam <waihong@google.com>
diff --git a/client/cros/faft/rpc_functions.py b/client/cros/faft/rpc_functions.py
index 5c47031..fe87be0 100755
--- a/client/cros/faft/rpc_functions.py
+++ b/client/cros/faft/rpc_functions.py
@@ -763,14 +763,14 @@
def _updater_run_autoupdate(self, append):
"""Run chromeos-firmwareupdate with autoupdate mode."""
- options = ['--noupdate_ec', '--wp=1']
+ options = ['--host_only', '--wp=1']
self._updater.run_firmwareupdate(mode='autoupdate',
updater_append=append,
options=options)
def _updater_run_factory_install(self):
"""Run chromeos-firmwareupdate with factory_install mode."""
- options = ['--noupdate_ec', '--wp=0']
+ options = ['--host_only', '--wp=0']
self._updater.run_firmwareupdate(mode='factory_install',
options=options)
@@ -781,7 +781,7 @@
def _updater_run_recovery(self):
"""Run chromeos-firmwareupdate with recovery mode."""
- options = ['--noupdate_ec', '--nocheck_keys', '--force', '--wp=1']
+ options = ['--host_only', '--force', '--wp=1']
self._updater.run_firmwareupdate(mode='recovery',
options=options)
diff --git a/client/cros/faft/utils/firmware_updater.py b/client/cros/faft/utils/firmware_updater.py
index 450cd97..b558d16 100644
--- a/client/cros/faft/utils/firmware_updater.py
+++ b/client/cros/faft/utils/firmware_updater.py
@@ -342,7 +342,7 @@
chromeos-firmwareupdate-[append]. Use'chromeos-firmwareupdate'
if updater_append is None.
mode: ex.'autoupdate', 'recovery', 'bootok', 'factory_install'...
- options: ex. ['--noupdate_ec', '--force'] or [] for
+ options: ex. ['--host_only', '--force'] or [] for
no option.
"""
if updater_append:
diff --git a/server/site_tests/platform_InstallFW/platform_InstallFW.py b/server/site_tests/platform_InstallFW/platform_InstallFW.py
index 2d59ee0..d823abd 100644
--- a/server/site_tests/platform_InstallFW/platform_InstallFW.py
+++ b/server/site_tests/platform_InstallFW/platform_InstallFW.py
@@ -33,18 +33,12 @@
# Install bios/ec on a client.
if fw_type == "bios":
if is_shellball:
- host.run("sudo /bin/sh %s --mode recovery --update_main "
- "--noupdate_ec" % fw_dst)
+ host.run("sudo /bin/sh %s --mode recovery --host_only" % fw_dst)
else:
- host.run("sudo /usr/sbin/flashrom -p host -w %s"
- % fw_dst)
+ host.run("sudo /usr/sbin/flashrom -p host -w %s" % fw_dst)
if fw_type == "ec":
- if is_shellball:
- host.run("sudo /bin/sh %s --mode recovery --update_ec "
- "--noupdate_main" % fw_dst)
- else:
- host.run("sudo /usr/sbin/flashrom -p ec -w %s"
- % fw_dst)
+ assert not is_shellball, 'Shellball does not support EC update.'
+ host.run("sudo /usr/sbin/flashrom -p ec -w %s" % fw_dst)
# Reboot client after installing the binary.
host.reboot()
# Get the versions of BIOS and EC binaries.