diff options
Diffstat (limited to 'meta/classes/qemuboot.bbclass')
-rw-r--r-- | meta/classes/qemuboot.bbclass | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/meta/classes/qemuboot.bbclass b/meta/classes/qemuboot.bbclass index 7243cc5257..15a9e63f2b 100644 --- a/meta/classes/qemuboot.bbclass +++ b/meta/classes/qemuboot.bbclass @@ -85,7 +85,8 @@ python do_write_qemuboot_conf() { qemuboot = "%s/%s.qemuboot.conf" % (d.getVar('IMGDEPLOYDIR'), d.getVar('IMAGE_NAME')) qemuboot_link = "%s/%s.qemuboot.conf" % (d.getVar('IMGDEPLOYDIR'), d.getVar('IMAGE_LINK_NAME')) - topdir="%s/"%(d.getVar('TOPDIR')).replace("//","/") + finalpath = d.getVar("DEPLOY_DIR_IMAGE") + topdir = d.getVar('TOPDIR') cf = configparser.ConfigParser() cf.add_section('config_bsp') for k in sorted(qemuboot_vars(d)): @@ -98,7 +99,8 @@ python do_write_qemuboot_conf() { val = d.getVar(k) # we only want to write out relative paths so that we can relocate images # and still run them - val=val.replace(topdir,"") + if val.startswith(topdir): + val = os.path.relpath(val, finalpath) cf.set('config_bsp', k, '%s' % val) # QB_DEFAULT_KERNEL's value of KERNEL_IMAGETYPE is the name of a symlink @@ -108,7 +110,7 @@ python do_write_qemuboot_conf() { kernel = os.path.realpath(kernel_link) # we only want to write out relative paths so that we can relocate images # and still run them - kernel=kernel.replace(topdir,"") + kernel = os.path.relpath(kernel, finalpath) cf.set('config_bsp', 'QB_DEFAULT_KERNEL', kernel) bb.utils.mkdirhier(os.path.dirname(qemuboot)) |