diff mbox

[Branch,~linaro-validation/lava-dispatcher/trunk] Rev 375: support for boot testing an openembedded image

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

Commit Message

Andy Doan Aug. 28, 2012, 5:06 a.m. UTC
Merge authors:
  Andy Doan (doanac)
Related merge proposals:
  https://code.launchpad.net/~doanac/lava-dispatcher/oe-boot-support/+merge/121460
  proposed by: Andy Doan (doanac)
------------------------------------------------------------
revno: 375 [merge]
committer: Andy Doan <andy.doan@linaro.org>
branch nick: lava-dispatcher
timestamp: Mon 2012-08-27 23:57:27 -0500
message:
  support for boot testing an openembedded image
modified:
  lava_dispatcher/client/master.py
  lava_dispatcher/default-config/lava-dispatcher/device-types/panda.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 'lava_dispatcher/client/master.py'
--- lava_dispatcher/client/master.py	2012-08-01 17:52:55 +0000
+++ lava_dispatcher/client/master.py	2012-08-28 04:56:24 +0000
@@ -119,8 +119,9 @@ 
     #DO NOT REMOVE - diverting flash-kernel and linking it to /bin/true
     #prevents a serious problem where packages getting installed that
     #call flash-kernel can update the kernel on the master image
-    session.run(
-        'chroot /mnt/root dpkg-divert --local /usr/sbin/flash-kernel')
+    if session.run('chroot /mnt/root which dpkg-divert', failok=True) == 0:
+        session.run(
+            'chroot /mnt/root dpkg-divert --local /usr/sbin/flash-kernel')
     session.run(
         'chroot /mnt/root ln -sf /bin/true /usr/sbin/flash-kernel')
     session.run('umount /mnt/root')
@@ -860,7 +861,17 @@ 
         self.proc.sendline(interrupt_boot_command)
 
     def _boot_linaro_image(self):
-        self._boot(string_to_list(self.config.get('boot_cmds')))
+        boot_cmds = 'boot_cmds' #default commands to boot ubuntu image
+        for option in self.boot_options:
+            keyval = option.split('=')
+            if len(keyval) != 2:
+                logging.warn("Invalid boot option format: %s" % option)
+            elif keyval[0] != 'boot_cmds':
+                logging.warn("Invalid boot option: %s" % keyval[0])
+            else:
+                boot_cmds = keyval[1].strip()
+
+        self._boot(string_to_list(self.config.get(boot_cmds)))
 
     def _boot_linaro_android_image(self):
         self._boot(string_to_list(self.config.get('boot_cmds_android')))

=== modified file 'lava_dispatcher/default-config/lava-dispatcher/device-types/panda.conf'
--- lava_dispatcher/default-config/lava-dispatcher/device-types/panda.conf	2012-05-31 10:55:15 +0000
+++ lava_dispatcher/default-config/lava-dispatcher/device-types/panda.conf	2012-08-24 19:35:21 +0000
@@ -17,4 +17,14 @@ 
     init=/init androidboot.console=ttyO2'",
     boot
 
+boot_cmds_oe = mmc init,
+    mmc part 0,
+    setenv initrd_high "0xffffffff",
+    setenv fdt_high "0xffffffff",
+    setenv bootcmd "'fatload mmc 0:3 0x80200000 uImage; bootm 0x80200000'",
+    setenv bootargs "' console=tty0 console=ttyO2,115200n8
+    root=/dev/mmcblk0p5 rootwait ro earlyprintk fixrtc nocompcache
+    vram=48M omapfb.vram=0:24M'",
+    boot
+
 android_binary_drivers = http://192.168.1.21/LAVA_HTTP/android-binaries/panda-drivers.tgz