Revert "faft: Update options for calling firmware updater"
This reverts commit f74f2bbb41a13cc92e5d1404659e96d9fd539071.
Reason for revert: Firmware qualification is using ToT autotest
to validate existing images, for example R71; so we want to keep
old syntax a little longer.
Original change's description:
> 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
> Tested-by: Hung-Te Lin <hungte@chromium.org>
> Reviewed-by: Wai-Hong Tam <waihong@google.com>
BUG=b:118509893
TEST=None
Change-Id: Icc8f180fca38505ffda7daf921b80a1f27d49311
Reviewed-on: https://chromium-review.googlesource.com/1307173
Commit-Ready: Hung-Te Lin <hungte@chromium.org>
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 fe87be0..5c47031 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 = ['--host_only', '--wp=1']
+ options = ['--noupdate_ec', '--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 = ['--host_only', '--wp=0']
+ options = ['--noupdate_ec', '--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 = ['--host_only', '--force', '--wp=1']
+ options = ['--noupdate_ec', '--nocheck_keys', '--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 b558d16..450cd97 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. ['--host_only', '--force'] or [] for
+ options: ex. ['--noupdate_ec', '--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 d823abd..2d59ee0 100644
--- a/server/site_tests/platform_InstallFW/platform_InstallFW.py
+++ b/server/site_tests/platform_InstallFW/platform_InstallFW.py
@@ -33,12 +33,18 @@
# Install bios/ec on a client.
if fw_type == "bios":
if is_shellball:
- host.run("sudo /bin/sh %s --mode recovery --host_only" % fw_dst)
+ host.run("sudo /bin/sh %s --mode recovery --update_main "
+ "--noupdate_ec" % 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":
- assert not is_shellball, 'Shellball does not support EC update.'
- host.run("sudo /usr/sbin/flashrom -p ec -w %s" % fw_dst)
+ 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)
# Reboot client after installing the binary.
host.reboot()
# Get the versions of BIOS and EC binaries.