2013-12-19 15:13:01 +00:00
|
|
|
SUMMARY = "Fast open source processor emulator"
|
2010-05-28 08:13:03 +00:00
|
|
|
HOMEPAGE = "http://qemu.org"
|
2010-11-26 15:58:15 +00:00
|
|
|
LICENSE = "GPLv2 & LGPLv2.1"
|
2014-08-14 14:26:53 +00:00
|
|
|
DEPENDS = "glib-2.0 zlib pixman"
|
2016-05-06 15:04:51 +00:00
|
|
|
RDEPENDS_${PN}_class-target += "bash"
|
2012-12-10 08:08:13 +00:00
|
|
|
|
|
|
|
require qemu-targets.inc
|
2017-01-02 07:17:56 +00:00
|
|
|
inherit autotools pkgconfig bluetooth
|
2012-12-10 08:08:13 +00:00
|
|
|
BBCLASSEXTEND = "native nativesdk"
|
2010-05-28 08:13:03 +00:00
|
|
|
|
2011-03-25 22:52:33 +00:00
|
|
|
# QEMU_TARGETS is overridable variable
|
2014-08-14 09:55:49 +00:00
|
|
|
QEMU_TARGETS ?= "arm aarch64 i386 mips mipsel mips64 mips64el ppc sh4 x86_64"
|
2011-03-25 22:52:33 +00:00
|
|
|
|
2017-01-02 06:57:23 +00:00
|
|
|
EXTRA_OECONF = " \
|
|
|
|
--prefix=${prefix} \
|
|
|
|
--bindir=${bindir} \
|
|
|
|
--includedir=${includedir} \
|
|
|
|
--libdir=${libdir} \
|
|
|
|
--mandir=${mandir} \
|
|
|
|
--datadir=${datadir} \
|
|
|
|
--docdir=${docdir}/${BPN} \
|
|
|
|
--sysconfdir=${sysconfdir} \
|
|
|
|
--libexecdir=${libexecdir} \
|
|
|
|
--localstatedir=${localstatedir} \
|
|
|
|
--with-confsuffix=/${BPN} \
|
|
|
|
--disable-strip \
|
|
|
|
--disable-werror \
|
|
|
|
--target-list=${@get_qemu_target_list(d)} \
|
|
|
|
--with-system-pixman \
|
|
|
|
--extra-cflags='${CFLAGS}' \
|
|
|
|
"
|
2017-04-06 19:48:39 +00:00
|
|
|
EXTRA_OECONF_append_class-native = " --python=${USRBINPATH}/python2.7"
|
2016-06-13 01:09:56 +00:00
|
|
|
|
|
|
|
EXTRA_OEMAKE_append_class-native = " LD='${LD}' AR='${AR}' OBJCOPY='${OBJCOPY}' LDFLAGS='${LDFLAGS}'"
|
|
|
|
|
|
|
|
LDFLAGS_append_class-native = " -fuse-ld=bfd"
|
|
|
|
|
2013-07-12 01:00:04 +00:00
|
|
|
export LIBTOOL="${HOST_SYS}-libtool"
|
|
|
|
|
2012-12-10 08:08:13 +00:00
|
|
|
do_configure_prepend_class-native() {
|
qemu: fix qemu-native pkg-config paths
For qemu-native, the pkg-config paths do not
include build host paths.
This is an issue for libsdl for example, where SDL is
used by qemu, but for qemu-native libsdl-native is not
built, but assumed to be provided by the build host.
Because pkg-config do not search for libsdl config files
on the build host sysroot, the configure stage of qemu-native
will fail because it will not find SDL as being installed.
Usually, the isssue is masked by a functional sdl-config that
will be interogated instead of pkg-config. However, on Build
Appliance, sdl-config is deliberately made non-functional,
so the issue manifests itself.
The fix will create an extended PKG_CONFIG_PATH, which does
include the build host sysroot paths for pkg-config.
Fix for [YOCTO #6495].
(From OE-Core rev: 68a5ed337f8f7ee8e5bf55542ec82d786eb754db)
Signed-off-by: Cristian Iorga <cristian.iorga@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-07-03 12:57:32 +00:00
|
|
|
# Append build host pkg-config paths for native target since the host may provide sdl
|
2014-07-30 13:42:34 +00:00
|
|
|
BHOST_PKGCONFIG_PATH=$(PATH=/usr/bin:/bin pkg-config --variable pc_path pkg-config || echo "")
|
|
|
|
if [ ! -z "$BHOST_PKGCONFIG_PATH" ]; then
|
|
|
|
export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:$BHOST_PKGCONFIG_PATH
|
|
|
|
fi
|
2016-06-13 01:09:56 +00:00
|
|
|
|
|
|
|
# Alter target makefiles to accept CFLAGS set via env
|
|
|
|
sed -i -r \
|
|
|
|
-e 's/^(C|OP_C|HELPER_C)FLAGS=/\1FLAGS+=/' \
|
|
|
|
"${S}"/Makefile "${S}"/Makefile.target
|
2012-12-10 08:08:13 +00:00
|
|
|
}
|
2010-05-28 08:13:03 +00:00
|
|
|
|
|
|
|
do_configure() {
|
2017-01-02 07:10:16 +00:00
|
|
|
${S}/configure ${EXTRA_OECONF}
|
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
|
|
|
|
}
|
|
|
|
|
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
|
|
|
|
2015-02-10 08:15:24 +00:00
|
|
|
PACKAGECONFIG ??= " \
|
2015-09-02 14:55:59 +00:00
|
|
|
fdt sdl \
|
2017-01-02 07:10:16 +00:00
|
|
|
fdt sdl kvm \
|
2017-02-27 13:02:50 +00:00
|
|
|
${@bb.utils.filter('DISTRO_FEATURES', 'alsa xen', d)} \
|
2015-02-10 08:15:24 +00:00
|
|
|
"
|
2017-03-16 09:15:29 +00:00
|
|
|
PACKAGECONFIG_class-native ??= "fdt alsa kvm"
|
2017-01-02 07:10:16 +00:00
|
|
|
PACKAGECONFIG_class-nativesdk ??= "fdt sdl kvm"
|
|
|
|
|
|
|
|
# Handle distros such as CentOS 5 32-bit that do not have kvm support
|
|
|
|
PACKAGECONFIG_class-native_remove = "${@'kvm' if not os.path.exists('/usr/include/linux/kvm.h') else ''}"
|
|
|
|
|
|
|
|
# Disable kvm on targets that do not support it
|
|
|
|
PACKAGECONFIG_remove_darwin = "kvm"
|
|
|
|
PACKAGECONFIG_remove_mingw32 = "kvm"
|
2016-04-27 08:28:35 +00:00
|
|
|
|
|
|
|
PACKAGECONFIG[sdl] = "--enable-sdl,--disable-sdl,libsdl"
|
2013-07-04 01:59:37 +00:00
|
|
|
PACKAGECONFIG[virtfs] = "--enable-virtfs --enable-attr,--disable-virtfs,libcap attr,"
|
|
|
|
PACKAGECONFIG[aio] = "--enable-linux-aio,--disable-linux-aio,libaio,"
|
2013-11-08 07:17:57 +00:00
|
|
|
PACKAGECONFIG[xfs] = "--enable-xfsctl,--disable-xfsctl,xfsprogs,"
|
2015-02-10 08:15:24 +00:00
|
|
|
PACKAGECONFIG[xen] = "--enable-xen,--disable-xen,xen,xen-libxenstore xen-libxenctrl xen-libxenguest"
|
qemu: add PACKAGECONFIG for vnc, libcurl, nss, uuid, curses, gtk+, libcap-ng
Use PACKAGECONFIG to explicitly address vnc, libcurl, nss, uuid, curses, gtk+,
libcap-ng dependencies rather than tested by configure.
It avoided potential errors while multiple builds shared a common state_cache.
(From OE-Core rev: 4482af07df26644885bae49b98f5d765a5caa68c)
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-02 06:52:59 +00:00
|
|
|
PACKAGECONFIG[vnc-sasl] = "--enable-vnc --enable-vnc-sasl,--disable-vnc-sasl,cyrus-sasl,"
|
|
|
|
PACKAGECONFIG[vnc-jpeg] = "--enable-vnc --enable-vnc-jpeg,--disable-vnc-jpeg,jpeg,"
|
|
|
|
PACKAGECONFIG[vnc-png] = "--enable-vnc --enable-vnc-png,--disable-vnc-png,libpng,"
|
|
|
|
PACKAGECONFIG[libcurl] = "--enable-curl,--disable-curl,libcurl,"
|
2015-12-21 11:24:21 +00:00
|
|
|
PACKAGECONFIG[nss] = "--enable-smartcard,--disable-smartcard,nss,"
|
qemu: add PACKAGECONFIG for vnc, libcurl, nss, uuid, curses, gtk+, libcap-ng
Use PACKAGECONFIG to explicitly address vnc, libcurl, nss, uuid, curses, gtk+,
libcap-ng dependencies rather than tested by configure.
It avoided potential errors while multiple builds shared a common state_cache.
(From OE-Core rev: 4482af07df26644885bae49b98f5d765a5caa68c)
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-02 06:52:59 +00:00
|
|
|
PACKAGECONFIG[curses] = "--enable-curses,--disable-curses,ncurses,"
|
2016-06-17 19:37:49 +00:00
|
|
|
PACKAGECONFIG[gtk+] = "--enable-gtk --with-gtkabi=3.0 --enable-vte,--disable-gtk --disable-vte,gtk+3 vte"
|
qemu: add PACKAGECONFIG for vnc, libcurl, nss, uuid, curses, gtk+, libcap-ng
Use PACKAGECONFIG to explicitly address vnc, libcurl, nss, uuid, curses, gtk+,
libcap-ng dependencies rather than tested by configure.
It avoided potential errors while multiple builds shared a common state_cache.
(From OE-Core rev: 4482af07df26644885bae49b98f5d765a5caa68c)
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-02 06:52:59 +00:00
|
|
|
PACKAGECONFIG[libcap-ng] = "--enable-cap-ng,--disable-cap-ng,libcap-ng,"
|
2014-05-12 18:54:04 +00:00
|
|
|
PACKAGECONFIG[ssh2] = "--enable-libssh2,--disable-libssh2,libssh2,"
|
2017-01-02 06:45:40 +00:00
|
|
|
PACKAGECONFIG[gcrypt] = "--enable-gcrypt,--disable-gcrypt,libgcrypt,"
|
2015-12-23 21:22:24 +00:00
|
|
|
PACKAGECONFIG[nettle] = "--enable-nettle,--disable-nettle,nettle"
|
2014-07-24 21:11:15 +00:00
|
|
|
PACKAGECONFIG[libusb] = "--enable-libusb,--disable-libusb,libusb1"
|
2014-08-14 14:27:42 +00:00
|
|
|
PACKAGECONFIG[fdt] = "--enable-fdt,--disable-fdt,dtc"
|
2017-01-02 06:45:40 +00:00
|
|
|
PACKAGECONFIG[alsa] = "--audio-drv-list='oss alsa',,alsa-lib"
|
2015-05-06 15:21:46 +00:00
|
|
|
PACKAGECONFIG[glx] = "--enable-opengl,--disable-opengl,mesa"
|
2014-08-14 09:55:48 +00:00
|
|
|
PACKAGECONFIG[lzo] = "--enable-lzo,--disable-lzo,lzo"
|
2014-08-27 09:34:04 +00:00
|
|
|
PACKAGECONFIG[numa] = "--enable-numa,--disable-numa,numactl"
|
2015-07-28 09:05:09 +00:00
|
|
|
PACKAGECONFIG[gnutls] = "--enable-gnutls,--disable-gnutls,gnutls"
|
2015-11-27 15:14:50 +00:00
|
|
|
PACKAGECONFIG[bzip2] = "--enable-bzip2,--disable-bzip2,bzip2"
|
2017-01-02 06:45:40 +00:00
|
|
|
PACKAGECONFIG[bluez] = "--enable-bluez,--disable-bluez,${BLUEZ}"
|
|
|
|
PACKAGECONFIG[libiscsi] = "--enable-libiscsi,--disable-libiscsi"
|
2017-01-02 07:10:16 +00:00
|
|
|
PACKAGECONFIG[kvm] = "--enable-kvm,--disable-kvm"
|
2011-05-15 01:44:36 +00:00
|
|
|
|
2011-07-05 10:14:36 +00:00
|
|
|
INSANE_SKIP_${PN} = "arch"
|