summaryrefslogtreecommitdiff
path: root/meta/lib
diff options
context:
space:
mode:
authorCorneliu Stoicescu <corneliux.stoicescu@intel.com>2014-06-06 22:14:33 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-06-13 12:51:52 +0100
commit06ed50a2b8c311e56ac9f1c6f2145bc020d5d500 (patch)
tree91146c30d512adbf6014f551b54d5dd937722c15 /meta/lib
parent39d5aa5c9f2916700f81d15adc220a30c6b120d1 (diff)
downloadopenembedded-core-06ed50a2b8c311e56ac9f1c6f2145bc020d5d500.tar.gz
openembedded-core-06ed50a2b8c311e56ac9f1c6f2145bc020d5d500.tar.bz2
openembedded-core-06ed50a2b8c311e56ac9f1c6f2145bc020d5d500.zip
masterimage.py: enable dynamical determination of rootfs type
YB: #6375 Adding support for get_image_fstype() in the MasterImageHardwareTarget and GummibootTarget classes. Signed-off-by: Corneliu Stoicescu <corneliux.stoicescu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib')
-rw-r--r--meta/lib/oeqa/controllers/masterimage.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/meta/lib/oeqa/controllers/masterimage.py b/meta/lib/oeqa/controllers/masterimage.py
index f2585d4860..b03c5bf74b 100644
--- a/meta/lib/oeqa/controllers/masterimage.py
+++ b/meta/lib/oeqa/controllers/masterimage.py
@@ -28,6 +28,8 @@ class MasterImageHardwareTarget(oeqa.targetcontrol.BaseTarget):
__metaclass__ = ABCMeta
+ supported_image_fstypes = ['tar.gz', 'tar.bz2']
+
def __init__(self, d):
super(MasterImageHardwareTarget, self).__init__(d)
@@ -48,7 +50,8 @@ class MasterImageHardwareTarget(oeqa.targetcontrol.BaseTarget):
bb.note("Server IP: %s" % self.server_ip)
# test rootfs + kernel
- self.rootfs = os.path.join(d.getVar("DEPLOY_DIR_IMAGE", True), d.getVar("IMAGE_LINK_NAME", True) + '.tar.gz')
+ self.image_fstype = self.get_image_fstype(d)
+ self.rootfs = os.path.join(d.getVar("DEPLOY_DIR_IMAGE", True), d.getVar("IMAGE_LINK_NAME", True) + '.' + self.image_fstype)
self.kernel = os.path.join(d.getVar("DEPLOY_DIR_IMAGE", True), d.getVar("KERNEL_IMAGETYPE"))
if not os.path.isfile(self.rootfs):
# we could've checked that IMAGE_FSTYPES contains tar.gz but the config for running testimage might not be
@@ -177,7 +180,7 @@ class GummibootTarget(MasterImageHardwareTarget):
'mount -t efivarfs efivarfs /sys/firmware/efi/efivars',
'cp ~/test-kernel /boot',
'rm -rf /mnt/testrootfs/*',
- 'tar xzvf ~/test-rootfs.tar.gz -C /mnt/testrootfs',
+ 'tar xvf ~/test-rootfs.%s -C /mnt/testrootfs' % self.image_fstype,
'printf "%s" > /sys/firmware/efi/efivars/LoaderEntryOneShot-4a67b082-0a4c-41cf-b6c7-440b29bb8c4f' % self.efivarvalue
]
@@ -187,7 +190,7 @@ class GummibootTarget(MasterImageHardwareTarget):
# from now on, every deploy cmd should return 0
# else an exception will be thrown by sshcontrol
self.master.ignore_status = False
- self.master.copy_to(self.rootfs, "~/test-rootfs.tar.gz")
+ self.master.copy_to(self.rootfs, "~/test-rootfs." + self.image_fstype)
self.master.copy_to(self.kernel, "~/test-kernel")
for cmd in self.deploy_cmds:
self.master.run(cmd)