mirror of
https://git.yoctoproject.org/poky
synced 2026-05-30 00:20:08 +00:00
image-wic: move wic code to image-wic.bbclass
There is a lot of wic code in image.bbclass and image_types.bbclass Having all code separated in one file should make it more readable and easier to maintain. (From OE-Core rev: 786368568a9525212e69f5cbf6da236f0a6be013) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
de23b7bb2f
commit
02dafba6ed
@@ -187,6 +187,8 @@ python () {
|
||||
IMAGE_CLASSES += "image_types"
|
||||
inherit ${IMAGE_CLASSES}
|
||||
|
||||
inherit image-wic
|
||||
|
||||
IMAGE_POSTPROCESS_COMMAND ?= ""
|
||||
|
||||
# some default locales
|
||||
@@ -327,29 +329,6 @@ fakeroot python do_image_qa () {
|
||||
}
|
||||
addtask do_image_qa after do_image_complete before do_build
|
||||
|
||||
#
|
||||
# Write environment variables used by wic
|
||||
# to tmp/sysroots/<machine>/imgdata/<image>.env
|
||||
#
|
||||
python do_rootfs_wicenv () {
|
||||
wicvars = d.getVar('WICVARS')
|
||||
if not wicvars:
|
||||
return
|
||||
|
||||
stdir = d.getVar('STAGING_DIR')
|
||||
outdir = os.path.join(stdir, d.getVar('MACHINE'), 'imgdata')
|
||||
bb.utils.mkdirhier(outdir)
|
||||
basename = d.getVar('IMAGE_BASENAME')
|
||||
with open(os.path.join(outdir, basename) + '.env', 'w') as envf:
|
||||
for var in wicvars.split():
|
||||
value = d.getVar(var)
|
||||
if value:
|
||||
envf.write('%s="%s"\n' % (var, value.strip()))
|
||||
}
|
||||
addtask do_rootfs_wicenv after do_image before do_image_wic
|
||||
do_rootfs_wicenv[vardeps] += "${WICVARS}"
|
||||
do_rootfs_wicenv[prefuncs] = 'set_image_size'
|
||||
|
||||
def setup_debugfs_variables(d):
|
||||
d.appendVar('IMAGE_ROOTFS', '-dbg')
|
||||
d.appendVar('IMAGE_LINK_NAME', '-dbg')
|
||||
|
||||
Reference in New Issue
Block a user