aboutsummaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2013-09-12 12:04:52 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-09-12 16:48:38 +0100
commit7e90261aec61f79680b5eaeaf5b18c7b795412a4 (patch)
treee971aa90f82a754e6d005533036702903a450b72 /meta
parentebfdddc23ff78231a819c62c8ffcced9633aa08b (diff)
downloadopenembedded-core-7e90261aec61f79680b5eaeaf5b18c7b795412a4.tar.gz
bitbake.conf: include machine name in DEPLOY_DIR_IMAGE
This allows a clean seperation between image outputs from different machines, and makes it possible to have convenience symlinks to make the output ready to deploy. This did require some surgery in runqemu; if explicit paths to the image and kernel are not supplied then DEPLOY_DIR_IMAGE needs to be determined from bitbake or set in the environment. However the script does try to avoid requiring it unless it really is needed. Corresponding changes were made in the automated testing code as well. Based on an RFC patch by Koen Kooi <koen@dominion.thruhere.net> Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/classes/testimage.bbclass1
-rw-r--r--meta/conf/bitbake.conf2
-rw-r--r--meta/lib/oeqa/utils/qemurunner.py8
3 files changed, 9 insertions, 2 deletions
diff --git a/meta/classes/testimage.bbclass b/meta/classes/testimage.bbclass
index 4eef0be1d6..c83906d0f8 100644
--- a/meta/classes/testimage.bbclass
+++ b/meta/classes/testimage.bbclass
@@ -122,6 +122,7 @@ def testimage_main(d):
qemu = QemuRunner(machine, rootfs)
qemu.tmpdir = d.getVar("TMPDIR", True)
+ qemu.deploy_dir_image = d.getVar("DEPLOY_DIR_IMAGE", True)
qemu.display = d.getVar("BB_ORIGENV", False).getVar("DISPLAY", True)
qemu.logfile = os.path.join(testdir, "qemu_boot_log.%s" % d.getVar('DATETIME', True))
try:
diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
index 578c7d00eb..9eed72ad3f 100644
--- a/meta/conf/bitbake.conf
+++ b/meta/conf/bitbake.conf
@@ -379,7 +379,7 @@ DEPLOY_DIR_TAR = "${DEPLOY_DIR}/tar"
DEPLOY_DIR_IPK = "${DEPLOY_DIR}/ipk"
DEPLOY_DIR_RPM = "${DEPLOY_DIR}/rpm"
DEPLOY_DIR_DEB = "${DEPLOY_DIR}/deb"
-DEPLOY_DIR_IMAGE ?= "${DEPLOY_DIR}/images"
+DEPLOY_DIR_IMAGE ?= "${DEPLOY_DIR}/images/${MACHINE}"
DEPLOY_DIR_TOOLS = "${DEPLOY_DIR}/tools"
PKGDATA_DIR = "${TMPDIR}/pkgdata/${MULTIMACH_TARGET_SYS}"
diff --git a/meta/lib/oeqa/utils/qemurunner.py b/meta/lib/oeqa/utils/qemurunner.py
index b5c757a927..d362edeecb 100644
--- a/meta/lib/oeqa/utils/qemurunner.py
+++ b/meta/lib/oeqa/utils/qemurunner.py
@@ -16,7 +16,7 @@ import bb
class QemuRunner:
- def __init__(self, machine, rootfs, display = None, tmpdir = None, logfile = None, boottime = 400, runqemutime = 60):
+ def __init__(self, machine, rootfs, display = None, tmpdir = None, deploy_dir_image = None, logfile = None, boottime = 400, runqemutime = 60):
# Popen object
self.runqemu = None
@@ -28,6 +28,7 @@ class QemuRunner:
self.display = display
self.tmpdir = tmpdir
+ self.deploy_dir_image = deploy_dir_image
self.logfile = logfile
self.boottime = boottime
self.runqemutime = runqemutime
@@ -71,6 +72,11 @@ class QemuRunner:
return False
else:
os.environ["OE_TMPDIR"] = self.tmpdir
+ if not os.path.exists(self.deploy_dir_image):
+ bb.error("Invalid DEPLOY_DIR_IMAGE path %s" % self.deploy_dir_image)
+ return False
+ else:
+ os.environ["DEPLOY_DIR_IMAGE"] = self.deploy_dir_image
self.qemuparams = 'bootparams="console=tty1 console=ttyS0,115200n8" qemuparams="-serial tcp:127.0.0.1:%s"' % self.serverport
if qemuparams: