summaryrefslogtreecommitdiffstats
path: root/meta/classes/image.bbclass
diff options
context:
space:
mode:
Diffstat (limited to 'meta/classes/image.bbclass')
-rw-r--r--meta/classes/image.bbclass25
1 files changed, 2 insertions, 23 deletions
diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
index e20e447680..613cd92600 100644
--- a/meta/classes/image.bbclass
+++ b/meta/classes/image.bbclass
@@ -187,6 +187,8 @@ python () {
187IMAGE_CLASSES += "image_types" 187IMAGE_CLASSES += "image_types"
188inherit ${IMAGE_CLASSES} 188inherit ${IMAGE_CLASSES}
189 189
190inherit image-wic
191
190IMAGE_POSTPROCESS_COMMAND ?= "" 192IMAGE_POSTPROCESS_COMMAND ?= ""
191 193
192# some default locales 194# some default locales
@@ -327,29 +329,6 @@ fakeroot python do_image_qa () {
327} 329}
328addtask do_image_qa after do_image_complete before do_build 330addtask do_image_qa after do_image_complete before do_build
329 331
330#
331# Write environment variables used by wic
332# to tmp/sysroots/<machine>/imgdata/<image>.env
333#
334python do_rootfs_wicenv () {
335 wicvars = d.getVar('WICVARS')
336 if not wicvars:
337 return
338
339 stdir = d.getVar('STAGING_DIR')
340 outdir = os.path.join(stdir, d.getVar('MACHINE'), 'imgdata')
341 bb.utils.mkdirhier(outdir)
342 basename = d.getVar('IMAGE_BASENAME')
343 with open(os.path.join(outdir, basename) + '.env', 'w') as envf:
344 for var in wicvars.split():
345 value = d.getVar(var)
346 if value:
347 envf.write('%s="%s"\n' % (var, value.strip()))
348}
349addtask do_rootfs_wicenv after do_image before do_image_wic
350do_rootfs_wicenv[vardeps] += "${WICVARS}"
351do_rootfs_wicenv[prefuncs] = 'set_image_size'
352
353def setup_debugfs_variables(d): 332def setup_debugfs_variables(d):
354 d.appendVar('IMAGE_ROOTFS', '-dbg') 333 d.appendVar('IMAGE_ROOTFS', '-dbg')
355 d.appendVar('IMAGE_LINK_NAME', '-dbg') 334 d.appendVar('IMAGE_LINK_NAME', '-dbg')