Recovery kernel by modifying kernel directly
Two test are involved: firmware_CorruptBothKernelAB and
firmware_RollbackKernel. Improve recovery step from using command
chromeos-install to directly modifying kernel. This may save many
times.
BUG=chrome-os-partner:13323
CQ-DEPEND=31692
TEST=.run_remote_tests.sh --remote="172.30.210.85" --board=link --servo
firmware_RollbackKernel/control$ (or firmware_CorruptBothKernelAB)
Change-Id: I66819a0ed77d20f313f1407ddf14229f29085a6e
Reviewed-on: https://gerrit.chromium.org/gerrit/31693
Reviewed-by: Tom Wai-Hong Tam <waihong@chromium.org>
Commit-Ready: Tom Wai-Hong Tam <waihong@chromium.org>
Tested-by: Tom Wai-Hong Tam <waihong@chromium.org>
diff --git a/client/cros/faft_client.py b/client/cros/faft_client.py
index f02fc3a..8419a58 100644
--- a/client/cros/faft_client.py
+++ b/client/cros/faft_client.py
@@ -102,11 +102,13 @@
# order not to break the old image and still be able to run.
try:
self._kernel_handler.init(self._chromeos_interface,
- dev_key_path='/usr/share/vboot/devkeys')
+ dev_key_path='/usr/share/vboot/devkeys',
+ internal_disk=True)
except:
# Copy the key to the current working directory.
shutil.copy('/usr/share/vboot/devkeys/kernel_data_key.vbprivk', '.')
- self._kernel_handler.init(self._chromeos_interface)
+ self._kernel_handler.init(self._chromeos_interface,
+ internal_disk=True)
self._tpm_handler = tpm_handler.TpmHandler()
self._tpm_handler.init(self._chromeos_interface)