summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2014-12-04 19:49:19 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-12-05 18:01:08 +0000
commitb813bdebb36501500e86fea5f7e15b4b15ea0902 (patch)
tree6effca63bb30254ee4ee76a8dc263d5e6c17c7e2 /meta
parentda53141db3bb446db7b036b95df2f860c6cbe276 (diff)
downloadpoky-b813bdebb36501500e86fea5f7e15b4b15ea0902.tar.gz
qemu/libc-package: Fix qemu option handling1.8_M1
The 'overrides' here are PACKAGE_ARCH based and hence not overrides as such and the _append wasn't working in many cases. This adjusts the code to use PACKAGE_ARCH as the accessor and ensures the variables work as expected. This fixes various segfaults and ensures postinsts run at build time rather than on the target system. The bug was introduced in http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=7efad8a1b56df6ee07c12ad360c0493d7b1d6d23. (From OE-Core rev: 219e793907406eabf632e784e3a11ab9acb77cfb) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> 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/libc-package.bbclass4
-rw-r--r--meta/classes/qemu.bbclass29
-rw-r--r--meta/recipes-devtools/qemu/qemuwrapper-cross_1.0.bb2
3 files changed, 18 insertions, 17 deletions
diff --git a/meta/classes/libc-package.bbclass b/meta/classes/libc-package.bbclass
index c1bc399c18..eb76ff953a 100644
--- a/meta/classes/libc-package.bbclass
+++ b/meta/classes/libc-package.bbclass
@@ -298,9 +298,7 @@ python package_do_split_gconvs () {
298 --inputfile=%s/i18n/locales/%s --charmap=%s %s" \ 298 --inputfile=%s/i18n/locales/%s --charmap=%s %s" \
299 % (treedir, datadir, locale, encoding, name) 299 % (treedir, datadir, locale, encoding, name)
300 300
301 qemu_options = d.getVar("QEMU_OPTIONS_%s" % d.getVar('PACKAGE_ARCH', True), True) 301 qemu_options = d.getVar('QEMU_OPTIONS', True)
302 if not qemu_options:
303 qemu_options = d.getVar('QEMU_OPTIONS', True)
304 302
305 cmd = "PSEUDO_RELOADED=YES PATH=\"%s\" I18NPATH=\"%s\" %s -L %s \ 303 cmd = "PSEUDO_RELOADED=YES PATH=\"%s\" I18NPATH=\"%s\" %s -L %s \
306 -E LD_LIBRARY_PATH=%s %s %s/bin/localedef %s" % \ 304 -E LD_LIBRARY_PATH=%s %s %s/bin/localedef %s" % \
diff --git a/meta/classes/qemu.bbclass b/meta/classes/qemu.bbclass
index b2cf85d628..601f587534 100644
--- a/meta/classes/qemu.bbclass
+++ b/meta/classes/qemu.bbclass
@@ -29,20 +29,23 @@ def qemu_run_binary(data, rootfs_path, binary):
29 29
30 libdir = rootfs_path + data.getVar("libdir", False) 30 libdir = rootfs_path + data.getVar("libdir", False)
31 base_libdir = rootfs_path + data.getVar("base_libdir", False) 31 base_libdir = rootfs_path + data.getVar("base_libdir", False)
32 oldest_kernel = data.getVar("OLDEST_KERNEL", True) 32 qemu_options = data.getVar("QEMU_OPTIONS", True)
33 33
34 return "PSEUDO_UNLOAD=1 " + qemu_binary + " -r " + oldest_kernel + " -L " + rootfs_path\ 34 return "PSEUDO_UNLOAD=1 " + qemu_binary + " " + qemu_options + " -L " + rootfs_path\
35 + " -E LD_LIBRARY_PATH=" + libdir + ":" + base_libdir + " "\ 35 + " -E LD_LIBRARY_PATH=" + libdir + ":" + base_libdir + " "\
36 + rootfs_path + binary 36 + rootfs_path + binary
37 37
38QEMU_OPTIONS = "-r ${OLDEST_KERNEL}" 38# QEMU_EXTRAOPTIONS is not meant to be directly used, the extensions are
39QEMU_OPTIONS_append_iwmmxt = " -cpu pxa270-c5" 39# PACKAGE_ARCH, not overrides and hence have to do this dance. Simply being arch
40QEMU_OPTIONS_append_armv6 = " -cpu arm1136" 40# specific isn't good enough.
41QEMU_OPTIONS_append_armv7a = " -cpu cortex-a8" 41QEMU_OPTIONS = "-r ${OLDEST_KERNEL} ${@d.getVar("QEMU_EXTRAOPTIONS_%s" % d.getVar('PACKAGE_ARCH', True), True) or ""}"
42QEMU_OPTIONS_append_e500v2 = " -cpu e500v2" 42QEMU_EXTRAOPTIONS_iwmmxt = " -cpu pxa270-c5"
43QEMU_OPTIONS_append_e500mc = " -cpu e500mc" 43QEMU_EXTRAOPTIONS_armv6 = " -cpu arm1136"
44QEMU_OPTIONS_append_e5500 = " -cpu e5500" 44QEMU_EXTRAOPTIONS_armv7a = " -cpu cortex-a8"
45QEMU_OPTIONS_append_e5500-64b = " -cpu e5500" 45QEMU_EXTRAOPTIONS_e500v2 = " -cpu e500v2"
46QEMU_OPTIONS_append_e6500 = " -cpu e6500" 46QEMU_EXTRAOPTIONS_e500mc = " -cpu e500mc"
47QEMU_OPTIONS_append_e6500-64b = " -cpu e6500" 47QEMU_EXTRAOPTIONS_e5500 = " -cpu e5500"
48QEMU_OPTIONS_append_ppc7400 = " -cpu 7400" 48QEMU_EXTRAOPTIONS_e5500-64b = " -cpu e5500"
49QEMU_EXTRAOPTIONS_e6500 = " -cpu e6500"
50QEMU_EXTRAOPTIONS_e6500-64b = " -cpu e6500"
51QEMU_EXTRAOPTIONS_ppc7400 = " -cpu 7400"
diff --git a/meta/recipes-devtools/qemu/qemuwrapper-cross_1.0.bb b/meta/recipes-devtools/qemu/qemuwrapper-cross_1.0.bb
index d2981b5575..959cd6fba0 100644
--- a/meta/recipes-devtools/qemu/qemuwrapper-cross_1.0.bb
+++ b/meta/recipes-devtools/qemu/qemuwrapper-cross_1.0.bb
@@ -9,7 +9,7 @@ do_install () {
9 9
10 echo "#!/bin/sh" > ${D}${bindir_crossscripts}/qemuwrapper 10 echo "#!/bin/sh" > ${D}${bindir_crossscripts}/qemuwrapper
11 qemu_binary=${@qemu_target_binary(d)} 11 qemu_binary=${@qemu_target_binary(d)}
12 qemu_options='${@d.getVar("QEMU_OPTIONS_%s" % d.getVar('PACKAGE_ARCH', True), True) or d.getVar('QEMU_OPTIONS', True) or ""}' 12 qemu_options='${QEMU_OPTIONS}'
13 echo "$qemu_binary $qemu_options \"\$@\"" >> ${D}${bindir_crossscripts}/qemuwrapper 13 echo "$qemu_binary $qemu_options \"\$@\"" >> ${D}${bindir_crossscripts}/qemuwrapper
14 fallback_qemu_bin= 14 fallback_qemu_bin=
15 case $qemu_binary in 15 case $qemu_binary in