2010-05-28 08:13:03 +00:00
|
|
|
DESCRIPTION = "open source processor emulator"
|
|
|
|
HOMEPAGE = "http://qemu.org"
|
2010-11-26 15:58:15 +00:00
|
|
|
LICENSE = "GPLv2 & LGPLv2.1"
|
2012-12-10 08:08:13 +00:00
|
|
|
DEPENDS = "glib-2.0 zlib alsa-lib virtual/libx11 pixman"
|
|
|
|
DEPENDS_class-native = "zlib-native alsa-lib-native glib-2.0-native pixman-native"
|
|
|
|
DEPENDS_class-nativesdk = "nativesdk-zlib nativesdk-libsdl nativesdk-glib-2.0 nativesdk-pixman"
|
2013-02-03 17:05:37 +00:00
|
|
|
RDEPENDS_${PN}_class-nativesdk = "nativesdk-libsdl"
|
2012-12-10 08:08:13 +00:00
|
|
|
|
|
|
|
require qemu-targets.inc
|
|
|
|
inherit autotools
|
|
|
|
BBCLASSEXTEND = "native nativesdk"
|
2010-05-28 08:13:03 +00:00
|
|
|
|
2011-03-25 22:52:33 +00:00
|
|
|
# QEMU_TARGETS is overridable variable
|
|
|
|
QEMU_TARGETS ?= "arm i386 mips mipsel mips64 mips64el ppc sh4 x86_64"
|
|
|
|
|
2011-04-19 23:34:05 +00:00
|
|
|
SDL ?= "--disable-sdl"
|
2012-10-27 08:48:17 +00:00
|
|
|
SDL_class-native ?= ""
|
|
|
|
SDL_class-nativesdk ?= ""
|
2011-03-25 22:52:33 +00:00
|
|
|
|
2012-12-10 08:08:13 +00:00
|
|
|
SRC_URI = "\
|
|
|
|
file://powerpc_rom.bin \
|
|
|
|
file://no-strip.patch \
|
|
|
|
file://linker-flags.patch \
|
|
|
|
file://fix-configure-checks.patch \
|
|
|
|
file://fallback-to-safe-mmap_min_addr.patch \
|
|
|
|
file://larger_default_ram_size.patch \
|
|
|
|
file://arm-bgr.patch \
|
|
|
|
file://Revert-vmware_vga-Add-back-some-info-in-local-state-.patch \
|
|
|
|
"
|
2011-04-19 23:34:05 +00:00
|
|
|
|
2012-12-10 08:08:13 +00:00
|
|
|
SRC_URI_append_class-nativesdk = "\
|
|
|
|
file://relocatable_sdk.patch \
|
|
|
|
"
|
2010-05-28 08:13:03 +00:00
|
|
|
|
2013-02-07 14:01:31 +00:00
|
|
|
EXTRA_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 --disable-smartcard"
|
2011-04-27 04:43:17 +00:00
|
|
|
|
2012-12-10 08:08:13 +00:00
|
|
|
EXTRA_OECONF_class-nativesdk = "--target-list=${@get_qemu_target_list(d)} --disable-werror --disable-vnc-tls \
|
|
|
|
--disable-curl \
|
|
|
|
"
|
|
|
|
|
|
|
|
do_configure_prepend_class-native() {
|
|
|
|
# Undo the -lX11 added by linker-flags.patch, don't assume that host has libX11 installed
|
|
|
|
sed -i 's/-lX11//g' Makefile.target
|
|
|
|
}
|
|
|
|
|
|
|
|
do_configure_prepend_class-nativesdk() {
|
|
|
|
if [ "${@base_contains('DISTRO_FEATURES', 'x11', 'x11', '', d)}" = "" ] ; then
|
|
|
|
# Undo the -lX11 added by linker-flags.patch
|
|
|
|
sed -i 's/-lX11//g' Makefile.target
|
|
|
|
fi
|
|
|
|
}
|
2010-05-28 08:13:03 +00:00
|
|
|
|
|
|
|
do_configure() {
|
2011-12-14 16:35:11 +00:00
|
|
|
# Handle distros such as CentOS 5 32-bit that do not have kvm support
|
2011-12-23 15:57:01 +00:00
|
|
|
KVMOPTS="--disable-kvm"
|
2011-12-22 17:43:33 +00:00
|
|
|
if [ "${PN}" != "qemu-native" -a "${PN}" != "nativesdk-qemu" ] \
|
2012-07-18 00:44:46 +00:00
|
|
|
|| [ -f /usr/include/linux/kvm.h ] ; then
|
|
|
|
KVMOPTS="--enable-kvm"
|
2011-12-14 16:35:11 +00:00
|
|
|
fi
|
|
|
|
|
2012-09-13 04:18:09 +00:00
|
|
|
${S}/configure --prefix=${prefix} --sysconfdir=${sysconfdir} --libexecdir=${libexecdir} --disable-strip ${EXTRA_OECONF} $KVMOPTS
|
2011-08-11 07:13:32 +00:00
|
|
|
test ! -e ${S}/target-i386/beginend_funcs.sh || chmod a+x ${S}/target-i386/beginend_funcs.sh
|
2010-05-28 08:13:03 +00:00
|
|
|
}
|
|
|
|
|
2011-07-05 10:14:36 +00:00
|
|
|
do_install () {
|
|
|
|
export STRIP="true"
|
|
|
|
autotools_do_install
|
|
|
|
install -d ${D}${datadir}/qemu
|
|
|
|
install -m 0755 ${WORKDIR}/powerpc_rom.bin ${D}${datadir}/qemu
|
|
|
|
}
|
|
|
|
|
2012-12-10 08:08:13 +00:00
|
|
|
# The following fragment will create a wrapper for qemu-mips user emulation
|
|
|
|
# binary in order to work around a segmentation fault issue. Basically, by
|
|
|
|
# default, the reserved virtual address space for 32-on-64 bit is set to 4GB.
|
|
|
|
# This will trigger a MMU access fault in the virtual CPU. With this change,
|
|
|
|
# the qemu-mips works fine.
|
|
|
|
# IMPORTANT: This piece needs to be removed once the root cause is fixed!
|
|
|
|
do_install_append() {
|
|
|
|
if [ -e "${D}/${bindir}/qemu-mips" ]; then
|
|
|
|
create_wrapper ${D}/${bindir}/qemu-mips \
|
|
|
|
QEMU_RESERVED_VA=0x0
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
# END of qemu-mips workaround
|
2010-05-28 08:13:03 +00:00
|
|
|
|
2012-12-10 08:08:13 +00:00
|
|
|
PACKAGECONFIG ??= ""
|
2011-05-15 01:44:36 +00:00
|
|
|
|
|
|
|
# Qemu target will not build in world build for ARM or Mips
|
|
|
|
BROKEN_qemuarm = "1"
|
|
|
|
BROKEN_qemumips = "1"
|
2011-07-05 10:14:36 +00:00
|
|
|
|
|
|
|
INSANE_SKIP_${PN} = "arch"
|