diff options
Diffstat (limited to 'meta/recipes-devtools/qemu/qemu.inc')
-rw-r--r-- | meta/recipes-devtools/qemu/qemu.inc | 97 |
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 @@ SUMMARY = "Fast open source processor emulator" HOMEPAGE = "http://qemu.org" LICENSE = "GPLv2 & LGPLv2.1" -DEPENDS = "glib-2.0 zlib pixman" -RDEPENDS_${PN}_class-target += "bash" + +RDEPENDS_${PN}-ptest = "bash make" + +LIC_FILES_CHKSUM = "file://COPYING;md5=441c28d2cf86e15a37fa47e15a72fbac \ + file://COPYING.LIB;endline=24;md5=c04def7ae38850e7d3ef548588159913" + +SRC_URI = "https://download.qemu.org/${BPN}-${PV}.tar.xz \ + file://powerpc_rom.bin \ + file://0001-sdl.c-allow-user-to-disable-pointer-grabs.patch \ + file://0002-qemu-Add-missing-wacom-HID-descriptor.patch \ + file://0003-Add-subpackage-ptest-which-runs-all-unit-test-cases-.patch \ + file://run-ptest \ + file://0004-qemu-Add-addition-environment-space-to-boot-loader-q.patch \ + file://0005-qemu-disable-Valgrind.patch \ + file://0006-qemu-Limit-paths-searched-during-user-mode-emulation.patch \ + file://0007-qemu-native-set-ld.bfd-fix-cflags-and-set-some-envir.patch \ + file://0008-chardev-connect-socket-to-a-spawned-command.patch \ + file://0009-apic-fixup-fallthrough-to-PIC.patch \ + file://0010-linux-user-Fix-webkitgtk-hangs-on-32-bit-x86-target.patch \ + file://0011-Revert-linux-user-fix-mmap-munmap-mprotect-mremap-sh.patch \ + file://0001-Add-a-missing-X11-include.patch \ + file://0001-egl-headless-add-egl_create_context.patch \ + " +UPSTREAM_CHECK_REGEX = "qemu-(?P<pver>\d+(\.\d+)+)\.tar" + +SRC_URI[md5sum] = "fb687ce0b02d3bf4327e36d3b99427a8" +SRC_URI[sha256sum] = "6a0508df079a0a33c2487ca936a56c12122f105b8a96a44374704bef6c69abfc" + +COMPATIBLE_HOST_mipsarchn32 = "null" +COMPATIBLE_HOST_mipsarchn64 = "null" + +do_install_append() { + # Prevent QA warnings about installed ${localstatedir}/run + if [ -d ${D}${localstatedir}/run ]; then rmdir ${D}${localstatedir}/run; fi +} + +do_compile_ptest() { + make buildtest-TESTS +} + +do_install_ptest() { + cp -rL ${B}/tests ${D}${PTEST_PATH} + find ${D}${PTEST_PATH}/tests -type f -name "*.[Sshcod]" | xargs -i rm -rf {} + + cp ${S}/tests/Makefile.include ${D}${PTEST_PATH}/tests + # Don't check the file genreated by configure + sed -i -e '/wildcard config-host.mak/d' \ + -e '$ {/endif/d}' ${D}${PTEST_PATH}/tests/Makefile.include +} + require qemu-targets.inc -inherit pkgconfig bluetooth -BBCLASSEXTEND = "native nativesdk" +inherit pkgconfig bluetooth ptest # QEMU_TARGETS is overridable variable QEMU_TARGETS ?= "arm aarch64 i386 mips mipsel mips64 mips64el ppc riscv32 riscv64 sh4 x86_64" @@ -25,15 +72,9 @@ EXTRA_OECONF = " \ --with-confsuffix=/${BPN} \ --disable-strip \ --disable-werror \ - --target-list=${@get_qemu_target_list(d)} \ --extra-cflags='${CFLAGS}' \ ${PACKAGECONFIG_CONFARGS} \ " -EXTRA_OECONF_append_class-native = " --python=python2.7" - -EXTRA_OEMAKE_append_class-native = " LD='${LD}' AR='${AR}' OBJCOPY='${OBJCOPY}' LDFLAGS='${LDFLAGS}'" - -LDFLAGS_append_class-native = " -fuse-ld=bfd" export LIBTOOL="${HOST_SYS}-libtool" @@ -56,25 +97,6 @@ do_install () { oe_runmake 'DESTDIR=${D}' install } -make_qemu_wrapper() { - gdk_pixbuf_module_file=`pkg-config --variable=gdk_pixbuf_cache_file gdk-pixbuf-2.0` - - for tool in `ls ${D}${bindir}/qemu-system-*`; do - create_wrapper $tool \ - GDK_PIXBUF_MODULE_FILE=$gdk_pixbuf_module_file \ - FONTCONFIG_PATH=/etc/fonts \ - GTK_THEME=Adwaita - done -} - -do_install_append_class-native() { - ${@bb.utils.contains('PACKAGECONFIG', 'gtk+', 'make_qemu_wrapper', '', d)} -} - -do_install_append_class-nativesdk() { - ${@bb.utils.contains('PACKAGECONFIG', 'gtk+', 'make_qemu_wrapper', '', d)} -} - # 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. @@ -89,15 +111,16 @@ do_install_append() { } # END of qemu-mips workaround -PACKAGECONFIG ??= " \ - fdt sdl kvm \ - ${@bb.utils.filter('DISTRO_FEATURES', 'alsa xen', d)} \ -" -PACKAGECONFIG_class-native ??= "fdt alsa kvm" -PACKAGECONFIG_class-nativesdk ??= "fdt sdl kvm" +make_qemu_wrapper() { + gdk_pixbuf_module_file=`pkg-config --variable=gdk_pixbuf_cache_file gdk-pixbuf-2.0` -# 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 ''}" + for tool in `ls ${D}${bindir}/qemu-system-*`; do + create_wrapper $tool \ + GDK_PIXBUF_MODULE_FILE=$gdk_pixbuf_module_file \ + FONTCONFIG_PATH=/etc/fonts \ + GTK_THEME=Adwaita + done +} # Disable kvm on targets that do not support it PACKAGECONFIG_remove_darwin = "kvm" |