=== modified file 'lava_dispatcher/actions/android_deploy.py'
@@ -23,5 +23,5 @@
class cmd_deploy_linaro_android_image(BaseAction):
- def run(self, boot, system, data, pkg=None, use_cache=True):
- self.client.deploy_linaro_android(boot, system, data, pkg, use_cache)
+ def run(self, boot, system, data, pkg=None, use_cache=True, rootfstype='ext4'):
+ self.client.deploy_linaro_android(boot, system, data, pkg, use_cache, rootfstype)
=== modified file 'lava_dispatcher/actions/deploy.py'
@@ -21,6 +21,6 @@
class cmd_deploy_linaro_image(BaseAction):
- def run(self, hwpack, rootfs, kernel_matrix=None, use_cache=True):
+ def run(self, hwpack, rootfs, kernel_matrix=None, use_cache=True, rootfstype='ext3'):
self.client.deploy_linaro(
- hwpack, rootfs, kernel_matrix=None, use_cache=True)
+ hwpack, rootfs, kernel_matrix=None, use_cache=True, rootfstype=rootfstype)
=== modified file 'lava_dispatcher/client/base.py'
@@ -366,7 +366,7 @@
raise OperationFailed
logging.info("System is in test image now")
- def deploy_linaro(self, hwpack, rootfs, kernel_matrix=None, use_cache=True):
+ def deploy_linaro(self, hwpack, rootfs, kernel_matrix=None, use_cache=True, rootfstype='ext3'):
raise NotImplementedError(self.deploy_linaro)
def boot_master_image(self):
@@ -390,6 +390,9 @@
# Android stuff
+ def deploy_linaro_android(self, boot, system, data, pkg=None, use_cache=True, rootfstype='ext4'):
+ raise NotImplementedError(self.deploy_linaro_android)
+
def boot_linaro_android_image(self):
"""Reboot the system to the test android image."""
self.proc._boot(string_to_list(self.config.get('boot_cmds_android')))
=== modified file 'lava_dispatcher/client/lmc_utils.py'
@@ -54,7 +54,7 @@
return new_hwpack_path
-def generate_image(client, hwpack_url, rootfs_url, kernel_matrix, use_cache=True):
+def generate_image(client, hwpack_url, rootfs_url, kernel_matrix, use_cache=True, rootfstype=None):
"""Generate image from a hwpack and rootfs url
:param hwpack_url: url of the Linaro hwpack to download
@@ -113,6 +113,8 @@
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.lmc_dev_arg, image_file, rootfs_path, hwpack_path))
+ if rootfstype is not None:
+ cmd += ' --rootfs ' + rootfstype
logging.info("Executing the linaro-media-create command")
logging.info(cmd)
rc, output = getstatusoutput(cmd)
=== modified file 'lava_dispatcher/client/master.py'
@@ -160,13 +160,13 @@
session.run('mv ~/tmp/uInitrd /mnt/lava/boot/uInitrd')
session.run('rm -rf ~/tmp')
-def _deploy_linaro_android_testrootfs(session, systemtbz2):
+def _deploy_linaro_android_testrootfs(session, systemtbz2, rootfstype):
logging.info("Deploying the test root filesystem")
sdcard_part_lava = session._client.device_option("sdcard_part_android")
session.run('umount /dev/disk/by-label/testrootfs')
session.run(
- 'mkfs.ext4 -q /dev/disk/by-label/testrootfs -L testrootfs')
+ 'mkfs -t %s -q /dev/disk/by-label/testrootfs -L testrootfs' % rootfstype)
session.run('udevadm trigger')
session.run('mkdir -p /mnt/lava/system')
session.run(
@@ -244,7 +244,7 @@
def master_str(self):
return self.device_option("MASTER_STR")
- def deploy_linaro(self, hwpack, rootfs, kernel_matrix=None, use_cache=True):
+ def deploy_linaro(self, hwpack, rootfs, kernel_matrix=None, use_cache=True, rootfstype='ext3'):
LAVA_IMAGE_TMPDIR = self.context.lava_image_tmpdir
LAVA_IMAGE_URL = self.context.lava_image_url
try:
@@ -264,7 +264,7 @@
root_url = '/'.join(u.strip('/') for u in [
LAVA_IMAGE_URL, root_tarball])
with self._master_session() as session:
- self._format_testpartition(session)
+ self._format_testpartition(session, rootfstype)
logging.info("Waiting for network to come up")
try:
@@ -284,7 +284,7 @@
finally:
shutil.rmtree(os.path.dirname(boot_tgz))
- def deploy_linaro_android(self, boot, system, data, pkg=None, use_cache=True):
+ def deploy_linaro_android(self, boot, system, data, pkg=None, use_cache=True, rootfstype='ext4'):
LAVA_IMAGE_TMPDIR = self.context.lava_image_tmpdir
LAVA_IMAGE_URL = self.context.lava_image_url
logging.info("Deploying Android on %s" % self.hostname)
@@ -330,7 +330,7 @@
try:
_deploy_linaro_android_testboot(session, boot_url, pkg_url)
- _deploy_linaro_android_testrootfs(session, system_url)
+ _deploy_linaro_android_testrootfs(session, system_url, rootfstype)
_purge_linaro_android_sdcard(session)
except:
tb = traceback.format_exc()
@@ -391,11 +391,12 @@
self.proc.sendline('export PS1="$PS1 [rc=$(echo \$?)]: "')
self.proc.expect(self.master_str, timeout=10, lava_no_logging=1)
- def _format_testpartition(self, session):
+ def _format_testpartition(self, session, fstype):
logging.info("Format testboot and testrootfs partitions")
session.run('umount /dev/disk/by-label/testrootfs')
session.run(
- 'mkfs.ext3 -q /dev/disk/by-label/testrootfs -L testrootfs')
+ 'mkfs -t %s -q /dev/disk/by-label/testrootfs -L testrootfs'
+ % fstype)
session.run('umount /dev/disk/by-label/testboot')
session.run('mkfs.vfat /dev/disk/by-label/testboot -n testboot')
=== modified file 'lava_dispatcher/client/qemu.py'
@@ -44,8 +44,8 @@
super(LavaQEMUClient, self).__init__(context, config)
self._lava_image = None
- def deploy_linaro(self, hwpack, rootfs, kernel_matrix=None, use_cache=True):
- image_file = generate_image(self, hwpack, rootfs, kernel_matrix, use_cache)
+ def deploy_linaro(self, hwpack, rootfs, kernel_matrix=None, use_cache=True, rootfstype='ext3'):
+ image_file = generate_image(self, hwpack, rootfs, kernel_matrix, use_cache, rootfstype)
self._lava_image = image_file
with image_partition_mounted(self._lava_image, self.root_part) as mntdir:
logging_system('echo linaro > %s/etc/hostname' % mntdir)