diff options
Diffstat (limited to 'meta/classes/image.bbclass')
| -rw-r--r-- | meta/classes/image.bbclass | 25 |
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 () { | |||
| 187 | IMAGE_CLASSES += "image_types" | 187 | IMAGE_CLASSES += "image_types" |
| 188 | inherit ${IMAGE_CLASSES} | 188 | inherit ${IMAGE_CLASSES} |
| 189 | 189 | ||
| 190 | inherit image-wic | ||
| 191 | |||
| 190 | IMAGE_POSTPROCESS_COMMAND ?= "" | 192 | IMAGE_POSTPROCESS_COMMAND ?= "" |
| 191 | 193 | ||
| 192 | # some default locales | 194 | # some default locales |
| @@ -327,29 +329,6 @@ fakeroot python do_image_qa () { | |||
| 327 | } | 329 | } |
| 328 | addtask do_image_qa after do_image_complete before do_build | 330 | addtask 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 | # | ||
| 334 | python 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 | } | ||
| 349 | addtask do_rootfs_wicenv after do_image before do_image_wic | ||
| 350 | do_rootfs_wicenv[vardeps] += "${WICVARS}" | ||
| 351 | do_rootfs_wicenv[prefuncs] = 'set_image_size' | ||
| 352 | |||
| 353 | def setup_debugfs_variables(d): | 332 | def 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') |
