summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSjoerd Simons <sjoerd.simons@collabora.co.uk>2014-11-19 16:05:48 (GMT)
committerSjoerd Simons <sjoerd.simons@collabora.co.uk>2014-11-19 16:05:48 (GMT)
commit64deef84df4bda8942ace4958da1a4f9816770ad (patch)
tree2526162cf808199767d0c5aa9309d47710abb686
parentbbcefb76d7135fe1892d199386ec02f5f6578bdf (diff)
downloadlava-dispatcher-64deef84df4bda8942ace4958da1a4f9816770ad.tar.gz
lava-dispatcher-64deef84df4bda8942ace4958da1a4f9816770ad.tar.xz
WIP: Support deploying images on kernel deployments
-rw-r--r--lava_dispatcher/actions/deploy.py5
-rw-r--r--lava_dispatcher/client/base.py5
-rw-r--r--lava_dispatcher/device/bootloader.py10
3 files changed, 15 insertions, 5 deletions
diff --git a/lava_dispatcher/actions/deploy.py b/lava_dispatcher/actions/deploy.py
index 463e2a0..8a31ddd 100644
--- a/lava_dispatcher/actions/deploy.py
+++ b/lava_dispatcher/actions/deploy.py
@@ -210,6 +210,7 @@ class cmd_deploy_linaro_kernel(BaseAction):
'login_commands': {'type': 'array', 'items': {'type': 'string'},
'optional': True},
'role': {'type': 'string', 'optional': True},
+ 'image': {'type': 'string', 'optional': True},
},
'additionalProperties': False,
}
@@ -238,7 +239,7 @@ class cmd_deploy_linaro_kernel(BaseAction):
nfsrootfs=None, bootloader=None, firmware=None, bl1=None, bl2=None,
bl31=None, rootfstype='ext4', bootloadertype='u_boot', target_type='oe',
login_prompt=None, password_prompt=None, username=None,
- password=None, login_commands=None):
+ password=None, login_commands=None, image=None):
if login_prompt is not None:
self.client.config.login_prompt = login_prompt
if password_prompt is not None:
@@ -254,7 +255,7 @@ class cmd_deploy_linaro_kernel(BaseAction):
rootfs=rootfs, nfsrootfs=nfsrootfs, bootloader=bootloader,
firmware=firmware, bl1=bl1, bl2=bl2, bl31=bl31,
rootfstype=rootfstype, bootloadertype=bootloadertype,
- target_type=target_type)
+ target_type=target_type, image=image)
cmd_deploy_kernel = cmd_deploy_linaro_kernel
diff --git a/lava_dispatcher/client/base.py b/lava_dispatcher/client/base.py
index 307de62..6d848f3 100644
--- a/lava_dispatcher/client/base.py
+++ b/lava_dispatcher/client/base.py
@@ -401,11 +401,12 @@ class LavaClient(object):
def deploy_linaro_kernel(self, kernel, ramdisk, dtb, modules, rootfs,
nfsrootfs, bootloader, firmware, bl1, bl2, bl31,
- rootfstype, bootloadertype, target_type):
+ rootfstype, bootloadertype, target_type, image):
self.target_device.deploy_linaro_kernel(kernel, ramdisk, dtb, modules, rootfs,
nfsrootfs, bootloader, firmware,
bl1, bl2, bl31, rootfstype,
- bootloadertype, target_type)
+ bootloadertype, target_type,
+ image)
@contextlib.contextmanager
def runner(self):
diff --git a/lava_dispatcher/device/bootloader.py b/lava_dispatcher/device/bootloader.py
index b1b21a4..c4904a7 100644
--- a/lava_dispatcher/device/bootloader.py
+++ b/lava_dispatcher/device/bootloader.py
@@ -141,7 +141,8 @@ class BootloaderTarget(MasterImageTarget):
def deploy_linaro_kernel(self, kernel, ramdisk, dtb, modules, rootfs,
nfsrootfs, bootloader, firmware, bl1, bl2,
- bl31, rootfstype, bootloadertype, target_type):
+ bl31, rootfstype, bootloadertype, target_type,
+ image):
if self.__deployment_data__ is None:
# Get deployment data
logging.debug("Attempting to set deployment data")
@@ -227,6 +228,13 @@ class BootloaderTarget(MasterImageTarget):
self._tmpdir,
decompress=False)
extract_modules(modules, self._lava_nfsrootfs)
+ if image is not None:
+ super(BootloaderTarget, self).deploy_linaro_prebuilt(image,
+ dtb,
+ rootfstype,
+ bootloadertype)
+ self._default_boot_cmds = 'boot_cmds_image'
+ # FIXME add possibility to deploy modules on the rootfs
if bootloader is not None:
# We have been passed a bootloader
bootloader = download_image(bootloader, self.context,