summaryrefslogtreecommitdiffstats
path: root/meta/classes/qemuboot.bbclass
diff options
context:
space:
mode:
authorMartin Jansa <martin.jansa@gmail.com>2016-09-28 09:28:49 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-09-30 16:51:15 +0100
commitb8f5fdacae545130276a34ff13837af735afb2cc (patch)
tree5b92c7647c7dfed01cee12033f2b1a04b6a5d0fe /meta/classes/qemuboot.bbclass
parente01466f91c58aefe7f280bd3a653ea20230692d0 (diff)
downloadpoky-b8f5fdacae545130276a34ff13837af735afb2cc.tar.gz
qemuboot: don't fail when QB_DEFAULT_KERNEL isn't symlink
* in some cases we might set QB_DEFAULT_KERNEL to the real filename instead of symlink and then this whole readlink work around actually breaks the build, because os.readlink fails on normal files: >>> os.readlink('deploy/images/qemux86/bzImage-linux-yocto-qemux86-master-20160927084848.bin') 'bzImage-linux-yocto-qemux86.bin' >>> os.readlink('deploy/images/qemux86/bzImage-linux-yocto-qemux86.bin') Traceback (most recent call last): File "<stdin>", line 1, in <module> OSError: [Errno 22] Invalid argument: '/jenkins/mjansa/build-starfish-master-mcf/BUILD/deploy/images/qemux86/bzImage-linux-yocto-qemux86.bin' (From OE-Core rev: a11d0d8641b7dfb05c78645cf21f2c04a08c4822) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/qemuboot.bbclass')
-rw-r--r--meta/classes/qemuboot.bbclass2
1 files changed, 1 insertions, 1 deletions
diff --git a/meta/classes/qemuboot.bbclass b/meta/classes/qemuboot.bbclass
index 97a235772d..ef9a128796 100644
--- a/meta/classes/qemuboot.bbclass
+++ b/meta/classes/qemuboot.bbclass
@@ -69,7 +69,7 @@ python write_qemuboot_conf() {
69 # to the kernel file, which hinders relocatability of the qb conf. 69 # to the kernel file, which hinders relocatability of the qb conf.
70 # Read the link and replace it with the full filename of the target. 70 # Read the link and replace it with the full filename of the target.
71 kernel_link = os.path.join(d.getVar('DEPLOY_DIR_IMAGE', True), d.getVar('QB_DEFAULT_KERNEL', True)) 71 kernel_link = os.path.join(d.getVar('DEPLOY_DIR_IMAGE', True), d.getVar('QB_DEFAULT_KERNEL', True))
72 kernel = os.readlink(kernel_link) 72 kernel = os.path.realpath(kernel_link)
73 cf.set('config_bsp', 'QB_DEFAULT_KERNEL', kernel) 73 cf.set('config_bsp', 'QB_DEFAULT_KERNEL', kernel)
74 74
75 bb.utils.mkdirhier(os.path.dirname(qemuboot)) 75 bb.utils.mkdirhier(os.path.dirname(qemuboot))