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.inc66
1 files changed, 51 insertions, 15 deletions
diff --git a/meta/recipes-devtools/qemu/qemu.inc b/meta/recipes-devtools/qemu/qemu.inc
index 95556ba8f7..ca411a6ef9 100644
--- a/meta/recipes-devtools/qemu/qemu.inc
+++ b/meta/recipes-devtools/qemu/qemu.inc
@@ -1,23 +1,54 @@
1DESCRIPTION = "open source processor emulator" 1DESCRIPTION = "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 alsa-lib virtual/libx11" 4DEPENDS = "glib-2.0 zlib alsa-lib virtual/libx11 pixman"
5DEPENDS_class-native = "zlib-native alsa-lib-native glib-2.0-native pixman-native"
6DEPENDS_class-nativesdk = "nativesdk-zlib nativesdk-libsdl nativesdk-glib-2.0 nativesdk-pixman"
7RDEPENDS_class-nativesdk = "nativesdk-libsdl"
8
9require qemu-targets.inc
10inherit autotools
11BBCLASSEXTEND = "native nativesdk"
5 12
6# QEMU_TARGETS is overridable variable 13# QEMU_TARGETS is overridable variable
7QEMU_TARGETS ?= "arm i386 mips mipsel mips64 mips64el ppc sh4 x86_64" 14QEMU_TARGETS ?= "arm i386 mips mipsel mips64 mips64el ppc sh4 x86_64"
8 15
9require qemu-targets.inc
10
11SDL ?= "--disable-sdl" 16SDL ?= "--disable-sdl"
12SDL_class-native ?= "" 17SDL_class-native ?= ""
13SDL_class-nativesdk ?= "" 18SDL_class-nativesdk ?= ""
14 19
15EXTRA_OECONF += "--target-list=${@get_qemu_target_list(d)} --disable-werror --disable-vnc-tls --audio-drv-list=oss,alsa --audio-card-list=ac97,es1370 ${SDL} --disable-curl --disable-vnc-jpeg --disable-bluez" 20SRC_URI = "\
21 file://powerpc_rom.bin \
22 file://no-strip.patch \
23 file://linker-flags.patch \
24 file://fix-configure-checks.patch \
25 file://fallback-to-safe-mmap_min_addr.patch \
26 file://larger_default_ram_size.patch \
27 file://arm-bgr.patch \
28 file://Revert-vmware_vga-Add-back-some-info-in-local-state-.patch \
29 "
16 30
17#EXTRA_OECONF += "--disable-sdl" 31SRC_URI_append_class-nativesdk = "\
32 file://relocatable_sdk.patch \
33 "
18 34
35EXTRA_OECONF += "--target-list=${@get_qemu_target_list(d)} --disable-werror --disable-vnc-tls --audio-drv-list=oss,alsa --audio-card-list=ac97,es1370 ${SDL} --disable-curl --disable-vnc-jpeg --disable-bluez --with-system-pixman"
19 36
20inherit autotools 37EXTRA_OECONF_class-nativesdk = "--target-list=${@get_qemu_target_list(d)} --disable-werror --disable-vnc-tls \
38 --disable-curl \
39 "
40
41do_configure_prepend_class-native() {
42 # Undo the -lX11 added by linker-flags.patch, don't assume that host has libX11 installed
43 sed -i 's/-lX11//g' Makefile.target
44}
45
46do_configure_prepend_class-nativesdk() {
47 if [ "${@base_contains('DISTRO_FEATURES', 'x11', 'x11', '', d)}" = "" ] ; then
48 # Undo the -lX11 added by linker-flags.patch
49 sed -i 's/-lX11//g' Makefile.target
50 fi
51}
21 52
22do_configure() { 53do_configure() {
23 # Handle distros such as CentOS 5 32-bit that do not have kvm support 54 # Handle distros such as CentOS 5 32-bit that do not have kvm support
@@ -38,16 +69,21 @@ do_install () {
38 install -m 0755 ${WORKDIR}/powerpc_rom.bin ${D}${datadir}/qemu 69 install -m 0755 ${WORKDIR}/powerpc_rom.bin ${D}${datadir}/qemu
39} 70}
40 71
41PACKAGECONFIG ??= "" 72# The following fragment will create a wrapper for qemu-mips user emulation
42 73# binary in order to work around a segmentation fault issue. Basically, by
43DEPENDS_class-native = "zlib-native alsa-lib-native glib-2.0-native" 74# default, the reserved virtual address space for 32-on-64 bit is set to 4GB.
44DEPENDS_class-nativesdk = "nativesdk-zlib nativesdk-libsdl nativesdk-glib-2.0" 75# This will trigger a MMU access fault in the virtual CPU. With this change,
45RDEPENDS_class-nativesdk = "nativesdk-libsdl" 76# the qemu-mips works fine.
46EXTRA_OECONF_class-nativesdk = "--target-list=${@get_qemu_target_list(d)} --disable-werror --disable-vnc-tls \ 77# IMPORTANT: This piece needs to be removed once the root cause is fixed!
47 --disable-curl \ 78do_install_append() {
48 " 79 if [ -e "${D}/${bindir}/qemu-mips" ]; then
80 create_wrapper ${D}/${bindir}/qemu-mips \
81 QEMU_RESERVED_VA=0x0
82 fi
83}
84# END of qemu-mips workaround
49 85
50BBCLASSEXTEND = "native nativesdk" 86PACKAGECONFIG ??= ""
51 87
52# Qemu target will not build in world build for ARM or Mips 88# Qemu target will not build in world build for ARM or Mips
53BROKEN_qemuarm = "1" 89BROKEN_qemuarm = "1"