summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
Diffstat (limited to 'meta')
-rw-r--r--meta/classes/qemuboot.bbclass7
1 files changed, 7 insertions, 0 deletions
diff --git a/meta/classes/qemuboot.bbclass b/meta/classes/qemuboot.bbclass
index cc5314e4ae..86b306037f 100644
--- a/meta/classes/qemuboot.bbclass
+++ b/meta/classes/qemuboot.bbclass
@@ -84,6 +84,7 @@ python do_write_qemuboot_conf() {
84 84
85 qemuboot = "%s/%s.qemuboot.conf" % (d.getVar('IMGDEPLOYDIR'), d.getVar('IMAGE_NAME')) 85 qemuboot = "%s/%s.qemuboot.conf" % (d.getVar('IMGDEPLOYDIR'), d.getVar('IMAGE_NAME'))
86 qemuboot_link = "%s/%s.qemuboot.conf" % (d.getVar('IMGDEPLOYDIR'), d.getVar('IMAGE_LINK_NAME')) 86 qemuboot_link = "%s/%s.qemuboot.conf" % (d.getVar('IMGDEPLOYDIR'), d.getVar('IMAGE_LINK_NAME'))
87 topdir="%s/"%(d.getVar('TOPDIR')).replace("//","/")
87 cf = configparser.ConfigParser() 88 cf = configparser.ConfigParser()
88 cf.add_section('config_bsp') 89 cf.add_section('config_bsp')
89 for k in qemuboot_vars(d): 90 for k in qemuboot_vars(d):
@@ -94,6 +95,9 @@ python do_write_qemuboot_conf() {
94 'qemu-helper-native/1.0-r1/recipe-sysroot-native/usr/bin/') 95 'qemu-helper-native/1.0-r1/recipe-sysroot-native/usr/bin/')
95 else: 96 else:
96 val = d.getVar(k) 97 val = d.getVar(k)
98 # we only want to write out relative paths so that we can relocate images
99 # and still run them
100 val=val.replace(topdir,"")
97 cf.set('config_bsp', k, '%s' % val) 101 cf.set('config_bsp', k, '%s' % val)
98 102
99 # QB_DEFAULT_KERNEL's value of KERNEL_IMAGETYPE is the name of a symlink 103 # QB_DEFAULT_KERNEL's value of KERNEL_IMAGETYPE is the name of a symlink
@@ -101,6 +105,9 @@ python do_write_qemuboot_conf() {
101 # Read the link and replace it with the full filename of the target. 105 # Read the link and replace it with the full filename of the target.
102 kernel_link = os.path.join(d.getVar('DEPLOY_DIR_IMAGE'), d.getVar('QB_DEFAULT_KERNEL')) 106 kernel_link = os.path.join(d.getVar('DEPLOY_DIR_IMAGE'), d.getVar('QB_DEFAULT_KERNEL'))
103 kernel = os.path.realpath(kernel_link) 107 kernel = os.path.realpath(kernel_link)
108 # we only want to write out relative paths so that we can relocate images
109 # and still run them
110 kernel=kernel.replace(topdir,"")
104 cf.set('config_bsp', 'QB_DEFAULT_KERNEL', kernel) 111 cf.set('config_bsp', 'QB_DEFAULT_KERNEL', kernel)
105 112
106 bb.utils.mkdirhier(os.path.dirname(qemuboot)) 113 bb.utils.mkdirhier(os.path.dirname(qemuboot))