diff options
Diffstat (limited to 'meta')
| -rw-r--r-- | 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 b5cc93dc93..39df3ad388 100644 --- a/meta/classes/qemuboot.bbclass +++ b/meta/classes/qemuboot.bbclass | |||
| @@ -44,25 +44,22 @@ QB_OPT_APPEND ?= "-show-cursor" | |||
| 44 | # Create qemuboot.conf | 44 | # Create qemuboot.conf |
| 45 | ROOTFS_POSTPROCESS_COMMAND += "write_qemuboot_conf; " | 45 | ROOTFS_POSTPROCESS_COMMAND += "write_qemuboot_conf; " |
| 46 | 46 | ||
| 47 | python write_qemuboot_conf() { | 47 | def qemuboot_vars(d): |
| 48 | import configparser | 48 | build_vars = ['MACHINE', 'TUNE_ARCH', 'DEPLOY_DIR_IMAGE', |
| 49 | 49 | 'KERNEL_IMAGETYPE', 'IMAGE_NAME', 'IMAGE_LINK_NAME', | |
| 50 | build_vars = ['MACHINE', 'TUNE_ARCH', 'DEPLOY_DIR_IMAGE', \ | 50 | 'STAGING_DIR_NATIVE', 'STAGING_BINDIR_NATIVE', |
| 51 | 'KERNEL_IMAGETYPE', 'IMAGE_NAME', 'IMAGE_LINK_NAME', \ | ||
| 52 | 'STAGING_DIR_NATIVE', 'STAGING_BINDIR_NATIVE', \ | ||
| 53 | 'STAGING_DIR_HOST'] | 51 | 'STAGING_DIR_HOST'] |
| 52 | return build_vars + [k for k in d.keys() if k.startswith('QB_')] | ||
| 54 | 53 | ||
| 55 | # Vars from bsp | 54 | write_qemuboot_conf[vardeps] += "${@' '.join(qemuboot_vars(d))}" |
| 56 | qb_vars = [] | 55 | python write_qemuboot_conf() { |
| 57 | for k in d.keys(): | 56 | import configparser |
| 58 | if k.startswith('QB_'): | ||
| 59 | qb_vars.append(k) | ||
| 60 | 57 | ||
| 61 | 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)) |
| 62 | qemuboot_link = "%s/%s.qemuboot.conf" % (d.getVar('DEPLOY_DIR_IMAGE', True), d.getVar('IMAGE_LINK_NAME', True)) | 59 | qemuboot_link = "%s/%s.qemuboot.conf" % (d.getVar('DEPLOY_DIR_IMAGE', True), d.getVar('IMAGE_LINK_NAME', True)) |
| 63 | cf = configparser.ConfigParser() | 60 | cf = configparser.ConfigParser() |
| 64 | cf.add_section('config_bsp') | 61 | cf.add_section('config_bsp') |
| 65 | for k in build_vars + qb_vars: | 62 | for k in qemuboot_vars(d): |
| 66 | cf.set('config_bsp', k, '%s' % d.getVar(k, True)) | 63 | cf.set('config_bsp', k, '%s' % d.getVar(k, True)) |
| 67 | 64 | ||
| 68 | # QB_DEFAULT_KERNEL's value of KERNEL_IMAGETYPE is the name of a symlink | 65 | # QB_DEFAULT_KERNEL's value of KERNEL_IMAGETYPE is the name of a symlink |
