YB #6375 #6254
cover YB #6375 #6254
This patch requires the merge of the "[PATCH 0/6] YB #6375 #6254" set of patches on the [email protected] mailing list and enables YB #6375 and #6254 for edgerouter and beaglebone BSPs.
This will:
- enable the target controllers to dynamically determine what image fstype to use for the rootfs files
- enable external scripts to get information like rootfs image fstype and extra files needed from the taregt controllers.
Corneliu Stoicescu (3):
beaglebonetarget.py: Add support for get_extra_files() classmethod controllers/beaglebonetarget.py: enable dynamical determination of
rootfs type
controllers/edgeroutertarget.py: enable dynamical determination of
rootfs type
.../lib/oeqa/controllers/beaglebonetarget.py | 18 +++++++++++------- .../lib/oeqa/controllers/edgeroutertarget.py | 5 +++-- 2 files changed, 14 insertions(+), 9 deletions(-)
Signature · 1 line
1.8.3.2
PATCH 1/3 beaglebonetarget.py: Add support for get_extra_files() classmethod
YB: #6254
Adding support for the get_extra_files() method to the BeagleBoneTarget class.
--- meta-yocto-bsp/lib/oeqa/controllers/beaglebonetarget.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-)
meta-yocto-bsp/lib/oeqa/controllers/beaglebonetarget.py +8 -5
@@ -30,12 +30,15 @@ from oeqa.controllers.masterimage import MasterImageHardwareTarget class BeagleBoneTarget(MasterImageHardwareTarget): + dtbs = {'uImage-am335x-bone.dtb': 'am335x-bone.dtb', 'uImage-am335x-boneblack.dtb': 'am335x-boneblack.dtb'} + + @classmethod + def get_extra_files(self): + return list(self.dtbs.keys()) + def __init__(self, d): super(BeagleBoneTarget, self).__init__(d) - self.dtbs = [('uImage-am335x-bone.dtb', 'am335x-bone.dtb'), - ('uImage-am335x-boneblack.dtb', 'am335x-boneblack.dtb')] - self.deploy_cmds = [ 'mkdir -p /mnt/testrootfs', 'mount -L testrootfs /mnt/testrootfs',
@@ -44,7 +47,7 @@ class BeagleBoneTarget(MasterImageHardwareTarget): '[ -e /mnt/testrootfs/boot/uImage ] || cp ~/test-kernel /mnt/testrootfs/boot/uImage', ] - for _, dtbfn in self.dtbs: + for _, dtbfn in self.dtbs.iteritems(): # Kernel and dtb files may not be in the image, so copy them if not self.deploy_cmds.append('[ -e /mnt/testrootfs/boot/{0} ] || cp ~/{0} /mnt/testrootfs/boot/'.format(dtbfn))
@@ -58,7 +61,7 @@ class BeagleBoneTarget(MasterImageHardwareTarget): # Kernel and dtb files may not be in the image, so copy them just in case self.master.copy_to(self.kernel, "~/test-kernel") kernelpath = os.path.dirname(self.kernel) - for dtborig, dtbfn in self.dtbs: + for dtborig, dtbfn in self.dtbs.iteritems(): dtbfile = os.path.join(kernelpath, dtborig) if os.path.exists(dtbfile): self.master.copy_to(dtbfile, "~/%s" % dtbfn)
Signature · 1 line
1.8.3.2
PATCH 2/3 controllers/beaglebonetarget.py: enable dynamical determination of rootfs type
In reply to Corneliu StoicescuYB: #6375
--- meta-yocto-bsp/lib/oeqa/controllers/beaglebonetarget.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
meta-yocto-bsp/lib/oeqa/controllers/beaglebonetarget.py +3 -2
@@ -39,11 +39,12 @@ class BeagleBoneTarget(MasterImageHardwareTarget): def __init__(self, d): super(BeagleBoneTarget, self).__init__(d) + self.image_fstype = self.get_image_fstype(d) self.deploy_cmds = [ 'mkdir -p /mnt/testrootfs', 'mount -L testrootfs /mnt/testrootfs', 'rm -rf /mnt/testrootfs/*', - 'tar xzvf ~/test-rootfs.tar.gz -C /mnt/testrootfs', + 'tar xvf ~/test-rootfs.%s -C /mnt/testrootfs' % self.image_fstype, '[ -e /mnt/testrootfs/boot/uImage ] || cp ~/test-kernel /mnt/testrootfs/boot/uImage', ]
@@ -65,7 +66,7 @@ class BeagleBoneTarget(MasterImageHardwareTarget): dtbfile = os.path.join(kernelpath, dtborig) if os.path.exists(dtbfile): self.master.copy_to(dtbfile, "~/%s" % dtbfn) - self.master.copy_to(self.rootfs, "~/test-rootfs.tar.gz") + self.master.copy_to(self.rootfs, "~/test-rootfs.%s" % self.image_fstype) for cmd in self.deploy_cmds: self.master.run(cmd)
Signature · 1 line
1.8.3.2
PATCH 3/3 controllers/edgeroutertarget.py: enable dynamical determination of rootfs type
In reply to Corneliu StoicescuYB: #6375
--- meta-yocto-bsp/lib/oeqa/controllers/edgeroutertarget.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
meta-yocto-bsp/lib/oeqa/controllers/edgeroutertarget.py +3 -2
@@ -44,13 +44,14 @@ class EdgeRouterTarget(MasterImageHardwareTarget): def __init__(self, d): super(EdgeRouterTarget, self).__init__(d) + self.image_fstype = self.get_image_fstype(d) self.deploy_cmds = [ 'mount -L boot /boot', 'mkdir -p /mnt/testrootfs', 'mount -L testrootfs /mnt/testrootfs', '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 ] if not self.serialcontrol_cmd: bb.fatal("This TEST_TARGET needs a TEST_SERIALCONTROL_CMD defined in local.conf.")
@@ -60,7 +61,7 @@ class EdgeRouterTarget(MasterImageHardwareTarget): self.master.run("umount /mnt/testrootfs;") self.master.ignore_status = False self.master.copy_to(self.kernel, "~/test-kernel") - self.master.copy_to(self.rootfs, "~/test-rootfs.tar.gz") + self.master.copy_to(self.rootfs, "~/test-rootfs.%s" % self.image_fstype) for cmd in self.deploy_cmds: self.master.run(cmd)
Signature · 1 line
1.8.3.2
Quoted 17 lines · On Friday 06 June 2014 21:24:40 Corneliu Stoicescu wrote:
This patch requires the merge of the "[PATCH 0/6] YB #6375 #6254" set of patches on the [email protected] mailing list and enables YB #6375 and #6254 for edgerouter and beaglebone BSPs.
This will:
- enable the target controllers to dynamically determine what image fstype to use for the rootfs files - enable external scripts to get information like rootfs image fstype and extra files needed from the taregt controllers.Corneliu Stoicescu (3):
beaglebonetarget.py: Add support forget_extra_files()classmethodcontrollers/beaglebonetarget.py: enable dynamical determination of
rootfs type
controllers/edgeroutertarget.py: enable dynamical determination of
rootfs type
Quoted 3 lines
.../lib/oeqa/controllers/beaglebonetarget.py | 18+++++++++++-------
.../lib/oeqa/controllers/edgeroutertarget.py|
5 +++-- 2 files changed, 14 insertions(+), 9 deletions(-)
Signature · 2 lines
Paul Eggleton Intel Open Source Technology Centre