diff options
Diffstat (limited to 'meta')
-rw-r--r-- | meta/classes/image.bbclass | 8 | ||||
-rw-r--r-- | meta/classes/image_types.bbclass | 1 | ||||
-rw-r--r-- | meta/lib/oeqa/selftest/wic.py | 2 |
3 files changed, 6 insertions, 5 deletions
diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass index cc8a23c526..13b77c9638 100644 --- a/meta/classes/image.bbclass +++ b/meta/classes/image.bbclass @@ -242,8 +242,6 @@ fakeroot python do_image () { pre_process_cmds = d.getVar("IMAGE_PREPROCESS_COMMAND", True) execute_pre_post_process(d, pre_process_cmds) - - write_wic_env(d) } do_image[dirs] = "${TOPDIR}" do_image[umask] = "022" @@ -264,7 +262,7 @@ addtask do_image_complete after do_image before do_build # Write environment variables used by wic # to tmp/sysroots/<machine>/imgdata/<image>.env # -def write_wic_env(d): +python do_rootfs_wicenv () { wicvars = d.getVar('WICVARS', True) if not wicvars: return @@ -278,6 +276,10 @@ def write_wic_env(d): value = d.getVar(var, True) if value: envf.write('%s="%s"\n' % (var, value.strip())) +} +addtask do_rootfs_wicenv after do_rootfs 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') diff --git a/meta/classes/image_types.bbclass b/meta/classes/image_types.bbclass index 0bf48c0202..b9599d8bed 100644 --- a/meta/classes/image_types.bbclass +++ b/meta/classes/image_types.bbclass @@ -201,7 +201,6 @@ IMAGE_CMD_wic[vardepsexclude] = "WKS_FULL_PATH WKS_FILES" # Rebuild when the wks file or vars in WICVARS change USING_WIC = "${@bb.utils.contains_any('IMAGE_FSTYPES', 'wic ' + ' '.join('wic.%s' % c for c in '${COMPRESSIONTYPES}'.split()), '1', '', d)}" do_image_wic[file-checksums] += "${@'${WKS_FULL_PATH}:%s' % os.path.exists('${WKS_FULL_PATH}') if '${USING_WIC}' else ''}" -do_image_wic[vardeps] += "${@bb.utils.contains("USING_WIC", "1", "${WICVARS}", "", d)}" EXTRA_IMAGECMD = "" diff --git a/meta/lib/oeqa/selftest/wic.py b/meta/lib/oeqa/selftest/wic.py index 55f6f82ab9..df826ed84b 100644 --- a/meta/lib/oeqa/selftest/wic.py +++ b/meta/lib/oeqa/selftest/wic.py @@ -50,7 +50,7 @@ class Wic(oeSelfTest): if not Wic.image_is_ready: bitbake('syslinux syslinux-native parted-native gptfdisk-native ' 'dosfstools-native mtools-native') - bitbake('core-image-minimal') + bitbake('core-image-minimal:do_image_complete core-image-minimal:do_rootfs_wicenv') Wic.image_is_ready = True rmtree(self.resultdir, ignore_errors=True) |