=== added file 'lava_dispatcher/default-config/lava-dispatcher/device-types/arndale-uefi.conf'
@@ -0,0 +1,48 @@
+boot_part = 2
+root_part = 3
+
+boot_cmds = sendline a,
+ expect Choice:,
+ sendline 1,
+ expect Select the Boot Device:,
+ sendline 2,
+ expect File path of the EFI Application or the kernel:,
+ sendline uImage,
+ expect Boot Type: [a] ATAGS, [g] Global FDT or [l] Local FDT? [a/g/l],
+ sendline g,
+ expect Add an initrd: [y/n],
+ sendline y,
+ expect File path of the initrd:,
+ sendline uInitrd,
+ expect Arguments to pass to the binary:,
+ sendline "root=/dev/mmcblk1p6 rw rootwait console=ttySAC2,115200n8 init --no-log",
+ expect Description for this new Entry:,
+ sendline Test Image,
+ expect Choice:,
+ sendline 5,
+ expect Start:,
+ sendline 2
+
+
+client_type = uefi
+
+boot_cmds_android = 3
+
+interrupt_boot_prompt = The default boot selection will start in
+
+bootloader_prompt = Start:
+
+lmc_dev_arg = arndale
+
+# Original linaro-android-media-create generated Android system SD card layout
+boot_part_android_org = 2
+sys_part_android_org = 3
+cache_part_android_org = 5
+data_part_android_org = 6
+sdcard_part_android_org = 7
+
+# Android LAVA test image SD card layout
+sys_part_android = 6
+sdcard_part_android = 7
+data_part_android = 7
+
=== added file 'lava_dispatcher/device/uefi.py'
@@ -0,0 +1,60 @@
+# Copyright (C) 2013 Linaro Limited
+#
+# Author: Dave Pigott <dave.pigott@linaro.org>
+#
+# This file is part of LAVA Dispatcher.
+#
+# LAVA Dispatcher is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# LAVA Dispatcher is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along
+# with this program; if not, see <http://www.gnu.org/licenses>.
+
+import logging
+import re
+from lava_dispatcher.device.master import (
+ MasterImageTarget
+)
+
+class UEFITarget(MasterImageTarget):
+
+ def __init__(self, context, config):
+ super(UEFITarget, self).__init__(context, config)
+
+ def _boot(self, boot_cmds):
+ """
+
+ :param boot_cmds:
+ :raise:
+ """
+ try:
+ self._soft_reboot()
+ self._enter_bootloader()
+ except:
+ logging.exception("enter uefi failed")
+ self._hard_reboot()
+ self._enter_bootloader()
+ 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)
+ try:
+ action = parts.group('action')
+ command = re.escape(parts.group('command'))
+ except AttributeError as e:
+ raise Exception("Badly formatted command in boot_cmds %s" % e)
+ if action == "sendline":
+ self.proc.sendline(command)
+ elif action == "expect":
+ self.proc.expect(command, timeout=300)
+ else:
+ raise Exception("Unrecognised action in boot_cmds")
+
+target_class = UEFITarget