summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
Diffstat (limited to 'meta')
-rw-r--r--meta/classes/image.bbclass2
-rw-r--r--meta/classes/image_types.bbclass2
-rw-r--r--meta/lib/oeqa/selftest/wic.py3
-rw-r--r--meta/recipes-core/meta/wic-tools.bb2
4 files changed, 5 insertions, 4 deletions
diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
index 4d50601bb2..e20e447680 100644
--- a/meta/classes/image.bbclass
+++ b/meta/classes/image.bbclass
@@ -337,7 +337,7 @@ python do_rootfs_wicenv () {
337 return 337 return
338 338
339 stdir = d.getVar('STAGING_DIR') 339 stdir = d.getVar('STAGING_DIR')
340 outdir = os.path.join(stdir, 'imgdata') 340 outdir = os.path.join(stdir, d.getVar('MACHINE'), 'imgdata')
341 bb.utils.mkdirhier(outdir) 341 bb.utils.mkdirhier(outdir)
342 basename = d.getVar('IMAGE_BASENAME') 342 basename = d.getVar('IMAGE_BASENAME')
343 with open(os.path.join(outdir, basename) + '.env', 'w') as envf: 343 with open(os.path.join(outdir, basename) + '.env', 'w') as envf:
diff --git a/meta/classes/image_types.bbclass b/meta/classes/image_types.bbclass
index 005d1e2d4e..0e5f38a8b9 100644
--- a/meta/classes/image_types.bbclass
+++ b/meta/classes/image_types.bbclass
@@ -216,7 +216,7 @@ IMAGE_CMD_wic () {
216 bbfatal "No kickstart files from WKS_FILES were found: ${WKS_FILES}. Please set WKS_FILE or WKS_FILES appropriately." 216 bbfatal "No kickstart files from WKS_FILES were found: ${WKS_FILES}. Please set WKS_FILE or WKS_FILES appropriately."
217 fi 217 fi
218 218
219 BUILDDIR="${TOPDIR}" wic create "$wks" --vars "${STAGING_DIR}/imgdata/" -e "${IMAGE_BASENAME}" -o "$out/" ${WIC_CREATE_EXTRA_ARGS} 219 BUILDDIR="${TOPDIR}" wic create "$wks" --vars "${STAGING_DIR}/${MACHINE}/imgdata/" -e "${IMAGE_BASENAME}" -o "$out/" ${WIC_CREATE_EXTRA_ARGS}
220 mv "$out/$(basename "${wks%.wks}")"*.direct "$out${IMAGE_NAME_SUFFIX}.wic" 220 mv "$out/$(basename "${wks%.wks}")"*.direct "$out${IMAGE_NAME_SUFFIX}.wic"
221 rm -rf "$out/" 221 rm -rf "$out/"
222} 222}
diff --git a/meta/lib/oeqa/selftest/wic.py b/meta/lib/oeqa/selftest/wic.py
index 0a78659bb1..9784a6818e 100644
--- a/meta/lib/oeqa/selftest/wic.py
+++ b/meta/lib/oeqa/selftest/wic.py
@@ -347,7 +347,8 @@ class Wic(oeSelfTest):
347 if image not in self.wicenv_cache: 347 if image not in self.wicenv_cache:
348 self.assertEqual(0, bitbake('%s -c do_rootfs_wicenv' % image).status) 348 self.assertEqual(0, bitbake('%s -c do_rootfs_wicenv' % image).status)
349 stdir = get_bb_var('STAGING_DIR', image) 349 stdir = get_bb_var('STAGING_DIR', image)
350 self.wicenv_cache[image] = os.path.join(stdir, 'imgdata') 350 machine = get_bb_var('MACHINE', image)
351 self.wicenv_cache[image] = os.path.join(stdir, machine, 'imgdata')
351 return self.wicenv_cache[image] 352 return self.wicenv_cache[image]
352 353
353 @testcase(1347) 354 @testcase(1347)
diff --git a/meta/recipes-core/meta/wic-tools.bb b/meta/recipes-core/meta/wic-tools.bb
index 0a53b7319e..aa09c82e76 100644
--- a/meta/recipes-core/meta/wic-tools.bb
+++ b/meta/recipes-core/meta/wic-tools.bb
@@ -14,7 +14,7 @@ python do_build_sysroot () {
14 14
15 # Write environment variables used by wic 15 # Write environment variables used by wic
16 # to tmp/sysroots/<machine>/imgdata/wictools.env 16 # to tmp/sysroots/<machine>/imgdata/wictools.env
17 outdir = os.path.join(d.getVar('STAGING_DIR'), 'imgdata') 17 outdir = os.path.join(d.getVar('STAGING_DIR'), d.getVar('MACHINE'), 'imgdata')
18 bb.utils.mkdirhier(outdir) 18 bb.utils.mkdirhier(outdir)
19 with open(os.path.join(outdir, "wic-tools.env"), 'w') as envf: 19 with open(os.path.join(outdir, "wic-tools.env"), 'w') as envf:
20 for var in ('RECIPE_SYSROOT_NATIVE', 'STAGING_DATADIR', 'STAGING_LIBDIR'): 20 for var in ('RECIPE_SYSROOT_NATIVE', 'STAGING_DATADIR', 'STAGING_LIBDIR'):