=== modified file 'lava_dispatcher/actions/deploy.py'
--- lava_dispatcher/actions/deploy.py	2012-10-24 01:34:07 +0000
+++ lava_dispatcher/actions/deploy.py	2012-11-20 13:34:19 +0000
@@ -54,6 +54,7 @@
             'rootfs': {'type': 'string', 'optional': True},
             'image': {'type': 'string', 'optional': True},
             'rootfstype': {'type': 'string', 'optional': True},
+            'bootloader': {'type': 'string', 'optional': True, 'default': 'u_boot'},
             },
         'additionalProperties': False,
         }
@@ -69,9 +70,9 @@
         elif 'image' not in parameters:
             raise ValueError('must specify image if not specifying a hwpack')
 
-    def run(self, hwpack=None, rootfs=None, image=None, rootfstype='ext3'):
+    def run(self, hwpack=None, rootfs=None, image=None, rootfstype='ext3', bootloader='u_boot'):
         self.client.deploy_linaro(
-            hwpack=hwpack, rootfs=rootfs, image=image, rootfstype=rootfstype)
+            hwpack=hwpack, rootfs=rootfs, image=image, rootfstype=rootfstype, bootloader=bootloader)
 
 
 class cmd_deploy_linaro_android_image(BaseAction):

=== modified file 'lava_dispatcher/client/lmc_utils.py'
--- lava_dispatcher/client/lmc_utils.py	2012-09-27 21:59:57 +0000
+++ lava_dispatcher/client/lmc_utils.py	2012-11-20 13:34:19 +0000
@@ -15,7 +15,7 @@
     )
 
 
-def generate_image(client, hwpack_url, rootfs_url, outdir, rootfstype=None):
+def generate_image(client, hwpack_url, rootfs_url, outdir, bootloader='u_boot', rootfstype=None):
     """Generate image from a hwpack and rootfs url
 
     :param hwpack_url: url of the Linaro hwpack to download
@@ -43,8 +43,8 @@
     logging.info("client.device_type = %s" %client.config.device_type)
 
     cmd = ("sudo flock /var/lock/lava-lmc.lck linaro-media-create --hwpack-force-yes --dev %s "
-           "--image-file %s --binary %s --hwpack %s --image-size 3G" %
-           (client.config.lmc_dev_arg, image_file, rootfs_path, hwpack_path))
+           "--image-file %s --binary %s --hwpack %s --image-size 3G --bootloader %s" %
+           (client.config.lmc_dev_arg, image_file, rootfs_path, hwpack_path, bootloader))
     if rootfstype is not None:
         cmd += ' --rootfs ' + rootfstype
     logging.info("Executing the linaro-media-create command")
@@ -53,11 +53,11 @@
     _run_linaro_media_create(cmd)
     return image_file
 
-def generate_fastmodel_image(hwpack, rootfs, odir, size="2000M"):
+def generate_fastmodel_image(hwpack, rootfs, odir, bootloader='u_boot', size="2000M"):
     cmd = ("flock /var/lock/lava-lmc.lck sudo linaro-media-create "
            "--dev fastmodel --output-directory %s --image-size %s "
-           "--hwpack %s --binary %s --hwpack-force-yes" %
-            (odir, size, hwpack, rootfs) )
+           "--hwpack %s --binary %s --hwpack-force-yes --bootloader %s" %
+            (odir, size, hwpack, rootfs, bootloader) )
     logging.info("Generating fastmodel image with: %s" % cmd)
     _run_linaro_media_create(cmd)
 

=== modified file 'lava_dispatcher/client/targetdevice.py'
--- lava_dispatcher/client/targetdevice.py	2012-10-26 06:22:05 +0000
+++ lava_dispatcher/client/targetdevice.py	2012-11-20 13:34:19 +0000
@@ -50,7 +50,7 @@
         self.target_device.deploy_android(boot, system, data)
 
     def deploy_linaro(self, hwpack=None, rootfs=None, image=None,
-                      rootfstype='ext3'):
+                      rootfstype='ext3', bootloader='u_boot'):
         if image is None:
             if hwpack is None or rootfs is None:
                 raise CriticalError(
@@ -60,7 +60,7 @@
                     "cannot specify hwpack or rootfs when specifying image")
 
         if image is None:
-            self.target_device.deploy_linaro(hwpack, rootfs)
+            self.target_device.deploy_linaro(hwpack, rootfs, bootloader)
         else:
             self.target_device.deploy_linaro_prebuilt(image)
 

=== modified file 'lava_dispatcher/device/fastmodel.py'
--- lava_dispatcher/device/fastmodel.py	2012-11-16 00:47:20 +0000
+++ lava_dispatcher/device/fastmodel.py	2012-11-20 13:34:19 +0000
@@ -113,12 +113,12 @@
 
         self._customize_android()
 
-    def deploy_linaro(self, hwpack=None, rootfs=None):
+    def deploy_linaro(self, hwpack=None, rootfs=None, bootloader='u_boot'):
         hwpack = download_image(hwpack, self.context, decompress=False)
         rootfs = download_image(rootfs, self.context, decompress=False)
         odir = os.path.dirname(rootfs)
 
-        generate_fastmodel_image(hwpack, rootfs, odir)
+        generate_fastmodel_image(hwpack, rootfs, odir, bootloader)
         self._sd_image = '%s/sd.img' % odir
         self._axf = None
         for f in self.config.simulator_axf_files:

=== modified file 'lava_dispatcher/device/master.py'
--- lava_dispatcher/device/master.py	2012-11-16 00:44:40 +0000
+++ lava_dispatcher/device/master.py	2012-11-20 13:34:19 +0000
@@ -94,10 +94,10 @@
         # we always leave master image devices powered on
         pass
 
-    def deploy_linaro(self, hwpack, rfs):
+    def deploy_linaro(self, hwpack, rfs, bootloader):
         self.boot_master_image()
 
-        image_file = generate_image(self, hwpack, rfs, self.scratch_dir)
+        image_file = generate_image(self, hwpack, rfs, self.scratch_dir, bootloader)
         (boot_tgz, root_tgz, data) = self._generate_tarballs(image_file)
 
         self._deploy_tarballs(boot_tgz, root_tgz)

=== modified file 'lava_dispatcher/device/qemu.py'
--- lava_dispatcher/device/qemu.py	2012-11-15 21:23:20 +0000
+++ lava_dispatcher/device/qemu.py	2012-11-20 13:34:19 +0000
@@ -46,9 +46,9 @@
         super(QEMUTarget, self).__init__(context, config)
         self._sd_image = None
 
-    def deploy_linaro(self, hwpack=None, rootfs=None):
+    def deploy_linaro(self, hwpack=None, rootfs=None, bootloader='u_boot'):
         odir = self.scratch_dir
-        self._sd_image = generate_image(self, hwpack, rootfs, odir)
+        self._sd_image = generate_image(self, hwpack, rootfs, odir, bootloader)
         self._customize_linux(self._sd_image)
 
     def deploy_linaro_prebuilt(self, image):

