summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorPatrick Ohly <patrick.ohly@intel.com>2016-11-24 10:51:13 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-11-30 15:48:07 +0000
commitfd1b82e0bd13cfc9f35c60505b97d4cb990afff2 (patch)
treed09f9068f9492bf120e45ed6e00800a891deb82f /meta
parentf21d147659ec50d0410e0e4c1516ecf3f13f30d0 (diff)
downloadpoky-fd1b82e0bd13cfc9f35c60505b97d4cb990afff2.tar.gz
qemuboot.bbclass: do not hook into do_rootfs
Writing qemuboot.conf in write_qemuboot_conf() does not modify the rootfs and thus conceptually shouldn't be executed as part of rootfs creation. Running it as separate task is cleaner and fixes the problem of missing qemuboot.conf files for meta-swupd virtual images; those images replace do_rootfs and ROOTFS_POSTPROCESS_COMMANDs don't run at all. The task gets added such that it runs roughly at the same time as before. Probably it doesn't actually need to depend on do_rootfs, but this way we don't write a useless qemuboot.conf in cases where do_rootfs fails. (From OE-Core rev: c8260447ed115bc5be7df9b25e449a7744d9f2df) Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/classes/qemuboot.bbclass6
1 files changed, 3 insertions, 3 deletions
diff --git a/meta/classes/qemuboot.bbclass b/meta/classes/qemuboot.bbclass
index 39df3ad388..8b1d4d087d 100644
--- a/meta/classes/qemuboot.bbclass
+++ b/meta/classes/qemuboot.bbclass
@@ -42,7 +42,7 @@ QB_DEFAULT_FSTYPE ?= "ext4"
42QB_OPT_APPEND ?= "-show-cursor" 42QB_OPT_APPEND ?= "-show-cursor"
43 43
44# Create qemuboot.conf 44# Create qemuboot.conf
45ROOTFS_POSTPROCESS_COMMAND += "write_qemuboot_conf; " 45addtask do_write_qemuboot_conf after do_rootfs before do_image
46 46
47def qemuboot_vars(d): 47def qemuboot_vars(d):
48 build_vars = ['MACHINE', 'TUNE_ARCH', 'DEPLOY_DIR_IMAGE', 48 build_vars = ['MACHINE', 'TUNE_ARCH', 'DEPLOY_DIR_IMAGE',
@@ -51,8 +51,8 @@ def qemuboot_vars(d):
51 'STAGING_DIR_HOST'] 51 'STAGING_DIR_HOST']
52 return build_vars + [k for k in d.keys() if k.startswith('QB_')] 52 return build_vars + [k for k in d.keys() if k.startswith('QB_')]
53 53
54write_qemuboot_conf[vardeps] += "${@' '.join(qemuboot_vars(d))}" 54do_write_qemuboot_conf[vardeps] += "${@' '.join(qemuboot_vars(d))}"
55python write_qemuboot_conf() { 55python do_write_qemuboot_conf() {
56 import configparser 56 import configparser
57 57
58 qemuboot = "%s/%s.qemuboot.conf" % (d.getVar('DEPLOY_DIR_IMAGE', True), d.getVar('IMAGE_NAME', True)) 58 qemuboot = "%s/%s.qemuboot.conf" % (d.getVar('DEPLOY_DIR_IMAGE', True), d.getVar('IMAGE_NAME', True))