summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/qemu/qemu.inc
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/qemu/qemu.inc')
-rw-r--r--meta/recipes-devtools/qemu/qemu.inc97
1 files changed, 60 insertions, 37 deletions
diff --git a/meta/recipes-devtools/qemu/qemu.inc b/meta/recipes-devtools/qemu/qemu.inc
index 7fd580c8ae..ebee2974d2 100644
--- a/meta/recipes-devtools/qemu/qemu.inc
+++ b/meta/recipes-devtools/qemu/qemu.inc
@@ -1,12 +1,59 @@
1SUMMARY = "Fast open source processor emulator" 1SUMMARY = "Fast open source processor emulator"
2HOMEPAGE = "http://qemu.org" 2HOMEPAGE = "http://qemu.org"
3LICENSE = "GPLv2 & LGPLv2.1" 3LICENSE = "GPLv2 & LGPLv2.1"
4DEPENDS = "glib-2.0 zlib pixman" 4
5RDEPENDS_${PN}_class-target += "bash" 5RDEPENDS_${PN}-ptest = "bash make"
6
7LIC_FILES_CHKSUM = "file://COPYING;md5=441c28d2cf86e15a37fa47e15a72fbac \
8 file://COPYING.LIB;endline=24;md5=c04def7ae38850e7d3ef548588159913"
9
10SRC_URI = "https://download.qemu.org/${BPN}-${PV}.tar.xz \
11 file://powerpc_rom.bin \
12 file://0001-sdl.c-allow-user-to-disable-pointer-grabs.patch \
13 file://0002-qemu-Add-missing-wacom-HID-descriptor.patch \
14 file://0003-Add-subpackage-ptest-which-runs-all-unit-test-cases-.patch \
15 file://run-ptest \
16 file://0004-qemu-Add-addition-environment-space-to-boot-loader-q.patch \
17 file://0005-qemu-disable-Valgrind.patch \
18 file://0006-qemu-Limit-paths-searched-during-user-mode-emulation.patch \
19 file://0007-qemu-native-set-ld.bfd-fix-cflags-and-set-some-envir.patch \
20 file://0008-chardev-connect-socket-to-a-spawned-command.patch \
21 file://0009-apic-fixup-fallthrough-to-PIC.patch \
22 file://0010-linux-user-Fix-webkitgtk-hangs-on-32-bit-x86-target.patch \
23 file://0011-Revert-linux-user-fix-mmap-munmap-mprotect-mremap-sh.patch \
24 file://0001-Add-a-missing-X11-include.patch \
25 file://0001-egl-headless-add-egl_create_context.patch \
26 "
27UPSTREAM_CHECK_REGEX = "qemu-(?P<pver>\d+(\.\d+)+)\.tar"
28
29SRC_URI[md5sum] = "fb687ce0b02d3bf4327e36d3b99427a8"
30SRC_URI[sha256sum] = "6a0508df079a0a33c2487ca936a56c12122f105b8a96a44374704bef6c69abfc"
31
32COMPATIBLE_HOST_mipsarchn32 = "null"
33COMPATIBLE_HOST_mipsarchn64 = "null"
34
35do_install_append() {
36 # Prevent QA warnings about installed ${localstatedir}/run
37 if [ -d ${D}${localstatedir}/run ]; then rmdir ${D}${localstatedir}/run; fi
38}
39
40do_compile_ptest() {
41 make buildtest-TESTS
42}
43
44do_install_ptest() {
45 cp -rL ${B}/tests ${D}${PTEST_PATH}
46 find ${D}${PTEST_PATH}/tests -type f -name "*.[Sshcod]" | xargs -i rm -rf {}
47
48 cp ${S}/tests/Makefile.include ${D}${PTEST_PATH}/tests
49 # Don't check the file genreated by configure
50 sed -i -e '/wildcard config-host.mak/d' \
51 -e '$ {/endif/d}' ${D}${PTEST_PATH}/tests/Makefile.include
52}
53
6 54
7require qemu-targets.inc 55require qemu-targets.inc
8inherit pkgconfig bluetooth 56inherit pkgconfig bluetooth ptest
9BBCLASSEXTEND = "native nativesdk"
10 57
11# QEMU_TARGETS is overridable variable 58# QEMU_TARGETS is overridable variable
12QEMU_TARGETS ?= "arm aarch64 i386 mips mipsel mips64 mips64el ppc riscv32 riscv64 sh4 x86_64" 59QEMU_TARGETS ?= "arm aarch64 i386 mips mipsel mips64 mips64el ppc riscv32 riscv64 sh4 x86_64"
@@ -25,15 +72,9 @@ EXTRA_OECONF = " \
25 --with-confsuffix=/${BPN} \ 72 --with-confsuffix=/${BPN} \
26 --disable-strip \ 73 --disable-strip \
27 --disable-werror \ 74 --disable-werror \
28 --target-list=${@get_qemu_target_list(d)} \
29 --extra-cflags='${CFLAGS}' \ 75 --extra-cflags='${CFLAGS}' \
30 ${PACKAGECONFIG_CONFARGS} \ 76 ${PACKAGECONFIG_CONFARGS} \
31 " 77 "
32EXTRA_OECONF_append_class-native = " --python=python2.7"
33
34EXTRA_OEMAKE_append_class-native = " LD='${LD}' AR='${AR}' OBJCOPY='${OBJCOPY}' LDFLAGS='${LDFLAGS}'"
35
36LDFLAGS_append_class-native = " -fuse-ld=bfd"
37 78
38export LIBTOOL="${HOST_SYS}-libtool" 79export LIBTOOL="${HOST_SYS}-libtool"
39 80
@@ -56,25 +97,6 @@ do_install () {
56 oe_runmake 'DESTDIR=${D}' install 97 oe_runmake 'DESTDIR=${D}' install
57} 98}
58 99
59make_qemu_wrapper() {
60 gdk_pixbuf_module_file=`pkg-config --variable=gdk_pixbuf_cache_file gdk-pixbuf-2.0`
61
62 for tool in `ls ${D}${bindir}/qemu-system-*`; do
63 create_wrapper $tool \
64 GDK_PIXBUF_MODULE_FILE=$gdk_pixbuf_module_file \
65 FONTCONFIG_PATH=/etc/fonts \
66 GTK_THEME=Adwaita
67 done
68}
69
70do_install_append_class-native() {
71 ${@bb.utils.contains('PACKAGECONFIG', 'gtk+', 'make_qemu_wrapper', '', d)}
72}
73
74do_install_append_class-nativesdk() {
75 ${@bb.utils.contains('PACKAGECONFIG', 'gtk+', 'make_qemu_wrapper', '', d)}
76}
77
78# The following fragment will create a wrapper for qemu-mips user emulation 100# The following fragment will create a wrapper for qemu-mips user emulation
79# binary in order to work around a segmentation fault issue. Basically, by 101# binary in order to work around a segmentation fault issue. Basically, by
80# default, the reserved virtual address space for 32-on-64 bit is set to 4GB. 102# default, the reserved virtual address space for 32-on-64 bit is set to 4GB.
@@ -89,15 +111,16 @@ do_install_append() {
89} 111}
90# END of qemu-mips workaround 112# END of qemu-mips workaround
91 113
92PACKAGECONFIG ??= " \ 114make_qemu_wrapper() {
93 fdt sdl kvm \ 115 gdk_pixbuf_module_file=`pkg-config --variable=gdk_pixbuf_cache_file gdk-pixbuf-2.0`
94 ${@bb.utils.filter('DISTRO_FEATURES', 'alsa xen', d)} \
95"
96PACKAGECONFIG_class-native ??= "fdt alsa kvm"
97PACKAGECONFIG_class-nativesdk ??= "fdt sdl kvm"
98 116
99# Handle distros such as CentOS 5 32-bit that do not have kvm support 117 for tool in `ls ${D}${bindir}/qemu-system-*`; do
100PACKAGECONFIG_class-native_remove = "${@'kvm' if not os.path.exists('/usr/include/linux/kvm.h') else ''}" 118 create_wrapper $tool \
119 GDK_PIXBUF_MODULE_FILE=$gdk_pixbuf_module_file \
120 FONTCONFIG_PATH=/etc/fonts \
121 GTK_THEME=Adwaita
122 done
123}
101 124
102# Disable kvm on targets that do not support it 125# Disable kvm on targets that do not support it
103PACKAGECONFIG_remove_darwin = "kvm" 126PACKAGECONFIG_remove_darwin = "kvm"