=== modified file 'lava_dispatcher/device/uefi.py'
@@ -37,11 +37,11 @@
"""
try:
self._soft_reboot()
- self._enter_bootloader()
+ self._enter_uefi()
except:
logging.exception("enter uefi failed")
self._hard_reboot()
- self._enter_bootloader()
+ self._enter_uefi()
self.proc.expect(self.config.bootloader_prompt, timeout=300)
for line in range(0, len(boot_cmds)):
parts = re.match('^(?P<action>sendline|expect)\s*(?P<command>.*)', line)
@@ -57,4 +57,11 @@
else:
raise Exception("Unrecognised action in boot_cmds")
+ def _enter_uefi(self):
+ if self.proc.expect(self.config.interrupt_boot_prompt) != 0:
+ raise Exception("Failed to enter bootloader")
+ self.proc.send(self.config.interrupt_boot_command)
+
+
+
target_class = UEFITarget