[gnome-continuous-yocto/gnomeostree-3.28-rocko: 3210/8267] qemuboot.bbclass: Setup the vardeps for write_qemuboot_conf
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-continuous-yocto/gnomeostree-3.28-rocko: 3210/8267] qemuboot.bbclass: Setup the vardeps for write_qemuboot_conf
- Date: Sun, 17 Dec 2017 00:18:49 +0000 (UTC)
commit 25f9530f784d5d1b3644b38295762e0395a51437
Author: Nathan Rossi <nathan nathanrossi com>
Date: Sat Oct 29 23:50:19 2016 +1000
qemuboot.bbclass: Setup the vardeps for write_qemuboot_conf
Setting up the vardeps on write_qemuboot_conf forces the updating of
variables in qemuboot.conf when machine/deploy configuration changes.
This is particularly useful when developing or setting up the qemuboot
(e.g. changing QB_* variables) for new targets or when changing
deployment variables (e.g. KERNEL_IMAGETYPE).
(From OE-Core rev: c568f6ce06512a108cada5c7100eb1f6de73f2ff)
Signed-off-by: Nathan Rossi <nathan nathanrossi com>
Signed-off-by: Ross Burton <ross burton intel com>
Signed-off-by: Richard Purdie <richard purdie linuxfoundation org>
meta/classes/qemuboot.bbclass | 21 +++++++++------------
1 files changed, 9 insertions(+), 12 deletions(-)
---
diff --git a/meta/classes/qemuboot.bbclass b/meta/classes/qemuboot.bbclass
index b5cc93d..39df3ad 100644
--- a/meta/classes/qemuboot.bbclass
+++ b/meta/classes/qemuboot.bbclass
@@ -44,25 +44,22 @@ QB_OPT_APPEND ?= "-show-cursor"
# Create qemuboot.conf
ROOTFS_POSTPROCESS_COMMAND += "write_qemuboot_conf; "
-python write_qemuboot_conf() {
- import configparser
-
- build_vars = ['MACHINE', 'TUNE_ARCH', 'DEPLOY_DIR_IMAGE', \
- 'KERNEL_IMAGETYPE', 'IMAGE_NAME', 'IMAGE_LINK_NAME', \
- 'STAGING_DIR_NATIVE', 'STAGING_BINDIR_NATIVE', \
+def qemuboot_vars(d):
+ build_vars = ['MACHINE', 'TUNE_ARCH', 'DEPLOY_DIR_IMAGE',
+ 'KERNEL_IMAGETYPE', 'IMAGE_NAME', 'IMAGE_LINK_NAME',
+ 'STAGING_DIR_NATIVE', 'STAGING_BINDIR_NATIVE',
'STAGING_DIR_HOST']
+ return build_vars + [k for k in d.keys() if k.startswith('QB_')]
- # Vars from bsp
- qb_vars = []
- for k in d.keys():
- if k.startswith('QB_'):
- qb_vars.append(k)
+write_qemuboot_conf[vardeps] += "${@' '.join(qemuboot_vars(d))}"
+python write_qemuboot_conf() {
+ import configparser
qemuboot = "%s/%s.qemuboot.conf" % (d.getVar('DEPLOY_DIR_IMAGE', True), d.getVar('IMAGE_NAME', True))
qemuboot_link = "%s/%s.qemuboot.conf" % (d.getVar('DEPLOY_DIR_IMAGE', True), d.getVar('IMAGE_LINK_NAME',
True))
cf = configparser.ConfigParser()
cf.add_section('config_bsp')
- for k in build_vars + qb_vars:
+ for k in qemuboot_vars(d):
cf.set('config_bsp', k, '%s' % d.getVar(k, True))
# QB_DEFAULT_KERNEL's value of KERNEL_IMAGETYPE is the name of a symlink
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]