diff mbox

[Branch,~linaro-validation/lava-dispatcher/trunk] Rev 250: Support for booting Versatile Express via UEFI

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

Commit Message

Michael-Doyle Hudson March 13, 2012, 1:50 a.m. UTC
Merge authors:
  Dave Pigott (dpigott)
Related merge proposals:
  https://code.launchpad.net/~dpigott/lava-dispatcher/add-vexpress/+merge/97030
  proposed by: Dave Pigott (dpigott)
  review: Approve - Michael Hudson-Doyle (mwhudson)
------------------------------------------------------------
revno: 250 [merge]
committer: Michael Hudson-Doyle <michael.hudson@linaro.org>
branch nick: trunk
timestamp: Tue 2012-03-13 14:48:14 +1300
message:
  Support for booting Versatile Express via UEFI
added:
  doc/scripts/
  doc/scripts/lava-partition-disk
  lava_dispatcher/default-config/lava-dispatcher/device-types/vexpress.conf
modified:
  doc/changes.rst
  lava_dispatcher/client/master.py
  lava_dispatcher/default-config/lava-dispatcher/device-defaults.conf


--
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 'doc/changes.rst'
--- doc/changes.rst	2012-03-13 01:41:23 +0000
+++ doc/changes.rst	2012-03-13 01:48:14 +0000
@@ -5,7 +5,12 @@ 
 
 Version 0.5.8 (UNRELEASED)
 ==========================
-
+* Changes for virtual express support:
+  * Add in a standard vexpress config for UEFI
+  * Make changes to allow for different boot interception message
+    configuration
+  * Increase timeouts for some stages of deployment (mkfs ext3) to
+    account for vexpress (lack of) speed.
 
 .. _version_0_5_7:
 

=== added directory 'doc/scripts'
=== added file 'doc/scripts/lava-partition-disk'
--- doc/scripts/lava-partition-disk	1970-01-01 00:00:00 +0000
+++ doc/scripts/lava-partition-disk	2012-03-07 10:39:25 +0000
@@ -0,0 +1,64 @@ 
+#!/bin/bash
+
+if [ "$1" = "" ]
+then
+        DEVICE="/dev/sdb"
+else
+        DEVICE=$1
+fi
+
+if [ "$2" = "" ]
+then
+# SIZE is the size of the testrootfs partition. On an 8G sd you can fit
+# 4G - put it up to 8G on a 16GB. The rest is allocated to sdcard for
+# android
+        SIZE="4G"
+else
+        SIZE=$2
+fi
+
+if [ "$3" = "" ]
+then
+        SCHEME="2part"
+else
+        SCHEME=$3
+fi
+
+# origen has a different original layout with 3 partitions - all others are the same (so far)
+
+if [ $SCHEME = "2part" ]
+then
+	TESTBOOT_PART=3
+	TESTROOTFS_PART=5
+	SDCARD_PART=6
+	LAST_BLOCK=2
+else
+	TESTBOOT_PART=5
+	TESTROOTFS_PART=6
+	SDCARD_PART=7
+	LAST_BLOCK=3
+fi
+
+FIRST_BLOCK_START=`sudo fdisk -S 63 -H 255 -lc $DEVICE | grep "$DEVICE$LAST_BLOCK" | awk '{print $3 + 1}'`
+
+if [ "$FIRST_BLOCK_START" = "" ]
+then
+	echo "Device specification error: $DEVICE"
+	exit 1
+fi
+
+if [ $SCHEME = "2part" ]
+then
+	EXTENDED_BLOCK_START=`echo $FIRST_BLOCK_START | awk '{print $1 + 131072}'`
+	FDISK_SCRIPT="n\np\n3\n$FIRST_BLOCK_START\n+64M\nt\n3\nc\nn\ne\n$EXTENDED_BLOCK_START\n\nn\n\n+$SIZE\nn\n\n\nt\n6\nc\np\nw\n"
+else
+	FDISK_SCRIPT="n\ne\n$FIRST_BLOCK_START\n\nn\n\n+64M\nt\n5\nc\nn\n\n+$SIZE\nn\n\n\nt\n7\nc\np\nw\n"
+fi
+
+echo -e $FDISK_SCRIPT | sudo fdisk -S 63 -H 255 -c $DEVICE
+
+sudo partprobe $DEVICE
+sudo mkfs.vfat -n testboot "$DEVICE$TESTBOOT_PART"
+sudo mkfs.vfat -n sdcard "$DEVICE$SDCARD_PART"
+sudo mkfs.ext3 -L testrootfs "$DEVICE$TESTROOTFS_PART"
+sync

=== modified file 'lava_dispatcher/client/master.py'
--- lava_dispatcher/client/master.py	2012-03-08 21:31:03 +0000
+++ lava_dispatcher/client/master.py	2012-03-13 01:48:14 +0000
@@ -175,7 +175,7 @@ 
 
     session.run('umount /dev/disk/by-label/testrootfs', failok=True)
     session.run(
-        'mkfs -t %s -q /dev/disk/by-label/testrootfs -L testrootfs' % rootfstype)
+        'mkfs -t %s -q /dev/disk/by-label/testrootfs -L testrootfs' % rootfstype, timeout=1800)
     session.run('udevadm trigger')
     session.run('mkdir -p /mnt/lava/system')
     session.run(
@@ -448,7 +448,7 @@ 
         logging.info("Boot the system master image")
         self.soft_reboot()
         try:
-            self.proc.expect("Starting kernel")
+            self.proc.expect("Uncompressing Linux")
             self._in_master_shell(300)
         except:
             logging.exception("in_master_shell failed")
@@ -463,7 +463,7 @@ 
         session.run('umount /dev/disk/by-label/testrootfs', failok=True)
         session.run(
             'mkfs -t %s -q /dev/disk/by-label/testrootfs -L testrootfs'
-            % fstype)
+            % fstype, timeout=1800)
         session.run('umount /dev/disk/by-label/testboot', failok=True)
         session.run('mkfs.vfat /dev/disk/by-label/testboot -n testboot')
 
@@ -639,7 +639,8 @@ 
             self.proc.sendline("hardreset")
 
     def _enter_uboot(self):
-        self.proc.expect("Hit any key to stop autoboot")
+        interrupt_boot_prompt = self.device_option('interrupt_boot_prompt')
+        self.proc.expect(interrupt_boot_prompt)
         self.proc.sendline("")
 
     def _boot_linaro_image(self):

=== modified file 'lava_dispatcher/default-config/lava-dispatcher/device-defaults.conf'
--- lava_dispatcher/default-config/lava-dispatcher/device-defaults.conf	2012-01-18 16:46:35 +0000
+++ lava_dispatcher/default-config/lava-dispatcher/device-defaults.conf	2012-03-06 09:02:09 +0000
@@ -82,6 +82,9 @@ 
 # Test image recognization string
 TESTER_STR = root@linaro
 
+# The string to look for to interrupt the boot process
+interrupt_boot_prompt = Hit any key to stop autoboot
+
 # The character the boot loader uses as a prompt on this board.
 bootloader_prompt = #
 

=== added file 'lava_dispatcher/default-config/lava-dispatcher/device-types/vexpress.conf'
--- lava_dispatcher/default-config/lava-dispatcher/device-types/vexpress.conf	1970-01-01 00:00:00 +0000
+++ lava_dispatcher/default-config/lava-dispatcher/device-types/vexpress.conf	2012-03-06 09:02:09 +0000
@@ -0,0 +1,7 @@ 
+boot_cmds = 2
+
+boot_cmds_android = 3
+
+interrupt_boot_prompt = The default boot selection will start in
+
+bootloader_prompt = Start: