diff mbox

[Branch,~linaro-validation/lava-dispatcher/trunk] Rev 616: Seperate function for entering bootloader. UEFI doesn't like the second CR which is added by send...

Message ID 20130530105024.4399.55098.launchpad@ackee.canonical.com
State Accepted
Headers show

Commit Message

Dave Pigott May 30, 2013, 10:50 a.m. UTC
Merge authors:
  Dave Pigott (dpigott)
Related merge proposals:
  https://code.launchpad.net/~dpigott/lava-dispatcher/fix-uefi-enter-bootloader/+merge/166478
  proposed by: Dave Pigott (dpigott)
  review: Approve - Dave Pigott (dpigott)
------------------------------------------------------------
revno: 616 [merge]
committer: dave.pigott@linaro.org
branch nick: trunk
timestamp: Thu 2013-05-30 11:40:22 +0100
message:
  Seperate function for entering bootloader. UEFI doesn't like the second CR which is added by sendline
modified:
  lava_dispatcher/device/uefi.py


--
lp:lava-dispatcher
https://code.launchpad.net/~linaro-validation/lava-dispatcher/trunk

You are subscribed to branch lp:lava-dispatcher.
To unsubscribe from this branch go to https://code.launchpad.net/~linaro-validation/lava-dispatcher/trunk/+edit-subscription
diff mbox

Patch

=== modified file 'lava_dispatcher/device/uefi.py'
--- lava_dispatcher/device/uefi.py	2013-05-29 13:43:42 +0000
+++ lava_dispatcher/device/uefi.py	2013-05-30 10:38:23 +0000
@@ -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