diff options
Diffstat (limited to 'meta/recipes-devtools')
| -rw-r--r-- | meta/recipes-devtools/qemu/qemu-helper-native_1.0.bb | 4 | ||||
| -rw-r--r-- | meta/recipes-devtools/qemu/qemu-native.inc | 17 | ||||
| -rw-r--r-- | meta/recipes-devtools/qemu/qemu-native_3.1.0.bb | 9 | ||||
| -rw-r--r-- | meta/recipes-devtools/qemu/qemu-system-native_3.1.0.bb | 23 | ||||
| -rw-r--r-- | meta/recipes-devtools/qemu/qemu-targets.inc | 6 | ||||
| -rw-r--r-- | meta/recipes-devtools/qemu/qemu.inc | 97 | ||||
| -rw-r--r-- | meta/recipes-devtools/qemu/qemu_3.1.0.bb | 68 |
7 files changed, 133 insertions, 91 deletions
diff --git a/meta/recipes-devtools/qemu/qemu-helper-native_1.0.bb b/meta/recipes-devtools/qemu/qemu-helper-native_1.0.bb index d86b155176..d9d9da0fad 100644 --- a/meta/recipes-devtools/qemu/qemu-helper-native_1.0.bb +++ b/meta/recipes-devtools/qemu/qemu-helper-native_1.0.bb | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | SUMMARY = "Helper utilities needed by the runqemu script" | 1 | SUMMARY = "Helper utilities needed by the runqemu script" |
| 2 | LICENSE = "GPLv2" | 2 | LICENSE = "GPLv2" |
| 3 | RDEPENDS_${PN} = "qemu-native" | 3 | RDEPENDS_${PN} = "qemu-system-native" |
| 4 | PR = "r1" | 4 | PR = "r1" |
| 5 | 5 | ||
| 6 | LIC_FILES_CHKSUM = "file://${WORKDIR}/tunctl.c;endline=4;md5=ff3a09996bc5fff6bc5d4e0b4c28f999" | 6 | LIC_FILES_CHKSUM = "file://${WORKDIR}/tunctl.c;endline=4;md5=ff3a09996bc5fff6bc5d4e0b4c28f999" |
| @@ -20,5 +20,5 @@ do_install() { | |||
| 20 | install tunctl ${D}${bindir}/ | 20 | install tunctl ${D}${bindir}/ |
| 21 | } | 21 | } |
| 22 | 22 | ||
| 23 | DEPENDS += "qemu-native" | 23 | DEPENDS += "qemu-system-native" |
| 24 | addtask addto_recipe_sysroot after do_populate_sysroot before do_build | 24 | addtask addto_recipe_sysroot after do_populate_sysroot before do_build |
diff --git a/meta/recipes-devtools/qemu/qemu-native.inc b/meta/recipes-devtools/qemu/qemu-native.inc new file mode 100644 index 0000000000..4373ad9e63 --- /dev/null +++ b/meta/recipes-devtools/qemu/qemu-native.inc | |||
| @@ -0,0 +1,17 @@ | |||
| 1 | inherit native | ||
| 2 | |||
| 3 | require qemu.inc | ||
| 4 | |||
| 5 | SRC_URI_append = " \ | ||
| 6 | file://0012-fix-libcap-header-issue-on-some-distro.patch \ | ||
| 7 | file://0013-cpus.c-Add-error-messages-when-qemi_cpu_kick_thread-.patch \ | ||
| 8 | " | ||
| 9 | EXTRA_OECONF_append = " --python=python2.7" | ||
| 10 | |||
| 11 | EXTRA_OEMAKE_append = " LD='${LD}' AR='${AR}' OBJCOPY='${OBJCOPY}' LDFLAGS='${LDFLAGS}'" | ||
| 12 | |||
| 13 | LDFLAGS_append = " -fuse-ld=bfd" | ||
| 14 | |||
| 15 | do_install_append() { | ||
| 16 | ${@bb.utils.contains('PACKAGECONFIG', 'gtk+', 'make_qemu_wrapper', '', d)} | ||
| 17 | } | ||
diff --git a/meta/recipes-devtools/qemu/qemu-native_3.1.0.bb b/meta/recipes-devtools/qemu/qemu-native_3.1.0.bb new file mode 100644 index 0000000000..c8acff8e19 --- /dev/null +++ b/meta/recipes-devtools/qemu/qemu-native_3.1.0.bb | |||
| @@ -0,0 +1,9 @@ | |||
| 1 | BPN = "qemu" | ||
| 2 | |||
| 3 | DEPENDS = "glib-2.0-native zlib-native" | ||
| 4 | |||
| 5 | require qemu-native.inc | ||
| 6 | |||
| 7 | EXTRA_OECONF_append = " --target-list=${@get_qemu_usermode_target_list(d)} --disable-tools --disable-blobs --disable-guest-agent" | ||
| 8 | |||
| 9 | PACKAGECONFIG ??= "" | ||
diff --git a/meta/recipes-devtools/qemu/qemu-system-native_3.1.0.bb b/meta/recipes-devtools/qemu/qemu-system-native_3.1.0.bb new file mode 100644 index 0000000000..5bf528bec1 --- /dev/null +++ b/meta/recipes-devtools/qemu/qemu-system-native_3.1.0.bb | |||
| @@ -0,0 +1,23 @@ | |||
| 1 | BPN = "qemu" | ||
| 2 | |||
| 3 | require qemu-native.inc | ||
| 4 | |||
| 5 | # As some of the files installed by qemu-native and qemu-system-native | ||
| 6 | # are the same, we depend on qemu-native to get the full installation set | ||
| 7 | # and avoid file clashes | ||
| 8 | DEPENDS = "glib-2.0-native zlib-native pixman-native qemu-native" | ||
| 9 | |||
| 10 | EXTRA_OECONF_append = " --target-list=${@get_qemu_system_target_list(d)}" | ||
| 11 | |||
| 12 | PACKAGECONFIG ??= "fdt alsa kvm" | ||
| 13 | |||
| 14 | # Handle distros such as CentOS 5 32-bit that do not have kvm support | ||
| 15 | PACKAGECONFIG_remove = "${@'kvm' if not os.path.exists('/usr/include/linux/kvm.h') else ''}" | ||
| 16 | |||
| 17 | do_install_append() { | ||
| 18 | install -Dm 0755 ${WORKDIR}/powerpc_rom.bin ${D}${datadir}/qemu | ||
| 19 | |||
| 20 | # The following is also installed by qemu-native | ||
| 21 | rm -f ${D}${datadir}/qemu/trace-events-all | ||
| 22 | rm -rf ${D}${datadir}/qemu/keymaps | ||
| 23 | } | ||
diff --git a/meta/recipes-devtools/qemu/qemu-targets.inc b/meta/recipes-devtools/qemu/qemu-targets.inc index a7d7b5f708..550d6f0ab1 100644 --- a/meta/recipes-devtools/qemu/qemu-targets.inc +++ b/meta/recipes-devtools/qemu/qemu-targets.inc | |||
| @@ -20,3 +20,9 @@ def get_qemu_target_list(d): | |||
| 20 | if 'linux' not in tos: | 20 | if 'linux' not in tos: |
| 21 | return softmmuonly + ''.join([arch + "-softmmu" + "," for arch in archs]).rstrip(',') | 21 | return softmmuonly + ''.join([arch + "-softmmu" + "," for arch in archs]).rstrip(',') |
| 22 | return softmmuonly + linuxuseronly + ''.join([arch + "-linux-user" + "," + arch + "-softmmu" + "," for arch in archs]).rstrip(',') | 22 | return softmmuonly + linuxuseronly + ''.join([arch + "-linux-user" + "," + arch + "-softmmu" + "," for arch in archs]).rstrip(',') |
| 23 | |||
| 24 | def get_qemu_usermode_target_list(d): | ||
| 25 | return ",".join(filter(lambda i: "-linux-user" in i, get_qemu_target_list(d).split(','))) | ||
| 26 | |||
| 27 | def get_qemu_system_target_list(d): | ||
| 28 | return ",".join(filter(lambda i: "-linux-user" not in i, get_qemu_target_list(d).split(','))) | ||
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 @@ | |||
| 1 | SUMMARY = "Fast open source processor emulator" | 1 | SUMMARY = "Fast open source processor emulator" |
| 2 | HOMEPAGE = "http://qemu.org" | 2 | HOMEPAGE = "http://qemu.org" |
| 3 | LICENSE = "GPLv2 & LGPLv2.1" | 3 | LICENSE = "GPLv2 & LGPLv2.1" |
| 4 | DEPENDS = "glib-2.0 zlib pixman" | 4 | |
| 5 | RDEPENDS_${PN}_class-target += "bash" | 5 | RDEPENDS_${PN}-ptest = "bash make" |
| 6 | |||
| 7 | LIC_FILES_CHKSUM = "file://COPYING;md5=441c28d2cf86e15a37fa47e15a72fbac \ | ||
| 8 | file://COPYING.LIB;endline=24;md5=c04def7ae38850e7d3ef548588159913" | ||
| 9 | |||
| 10 | SRC_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 | " | ||
| 27 | UPSTREAM_CHECK_REGEX = "qemu-(?P<pver>\d+(\.\d+)+)\.tar" | ||
| 28 | |||
| 29 | SRC_URI[md5sum] = "fb687ce0b02d3bf4327e36d3b99427a8" | ||
| 30 | SRC_URI[sha256sum] = "6a0508df079a0a33c2487ca936a56c12122f105b8a96a44374704bef6c69abfc" | ||
| 31 | |||
| 32 | COMPATIBLE_HOST_mipsarchn32 = "null" | ||
| 33 | COMPATIBLE_HOST_mipsarchn64 = "null" | ||
| 34 | |||
| 35 | do_install_append() { | ||
| 36 | # Prevent QA warnings about installed ${localstatedir}/run | ||
| 37 | if [ -d ${D}${localstatedir}/run ]; then rmdir ${D}${localstatedir}/run; fi | ||
| 38 | } | ||
| 39 | |||
| 40 | do_compile_ptest() { | ||
| 41 | make buildtest-TESTS | ||
| 42 | } | ||
| 43 | |||
| 44 | do_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 | ||
| 7 | require qemu-targets.inc | 55 | require qemu-targets.inc |
| 8 | inherit pkgconfig bluetooth | 56 | inherit pkgconfig bluetooth ptest |
| 9 | BBCLASSEXTEND = "native nativesdk" | ||
| 10 | 57 | ||
| 11 | # QEMU_TARGETS is overridable variable | 58 | # QEMU_TARGETS is overridable variable |
| 12 | QEMU_TARGETS ?= "arm aarch64 i386 mips mipsel mips64 mips64el ppc riscv32 riscv64 sh4 x86_64" | 59 | QEMU_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 | " |
| 32 | EXTRA_OECONF_append_class-native = " --python=python2.7" | ||
| 33 | |||
| 34 | EXTRA_OEMAKE_append_class-native = " LD='${LD}' AR='${AR}' OBJCOPY='${OBJCOPY}' LDFLAGS='${LDFLAGS}'" | ||
| 35 | |||
| 36 | LDFLAGS_append_class-native = " -fuse-ld=bfd" | ||
| 37 | 78 | ||
| 38 | export LIBTOOL="${HOST_SYS}-libtool" | 79 | export 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 | ||
| 59 | make_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 | |||
| 70 | do_install_append_class-native() { | ||
| 71 | ${@bb.utils.contains('PACKAGECONFIG', 'gtk+', 'make_qemu_wrapper', '', d)} | ||
| 72 | } | ||
| 73 | |||
| 74 | do_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 | ||
| 92 | PACKAGECONFIG ??= " \ | 114 | make_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 | " | ||
| 96 | PACKAGECONFIG_class-native ??= "fdt alsa kvm" | ||
| 97 | PACKAGECONFIG_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 |
| 100 | PACKAGECONFIG_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 |
| 103 | PACKAGECONFIG_remove_darwin = "kvm" | 126 | PACKAGECONFIG_remove_darwin = "kvm" |
diff --git a/meta/recipes-devtools/qemu/qemu_3.1.0.bb b/meta/recipes-devtools/qemu/qemu_3.1.0.bb index ea4277edde..04d8bee99f 100644 --- a/meta/recipes-devtools/qemu/qemu_3.1.0.bb +++ b/meta/recipes-devtools/qemu/qemu_3.1.0.bb | |||
| @@ -1,58 +1,22 @@ | |||
| 1 | BBCLASSEXTEND = "nativesdk" | ||
| 2 | |||
| 1 | require qemu.inc | 3 | require qemu.inc |
| 2 | 4 | ||
| 3 | inherit ptest | 5 | DEPENDS = "glib-2.0 zlib pixman" |
| 4 | |||
| 5 | RDEPENDS_${PN}-ptest = "bash make" | ||
| 6 | |||
| 7 | LIC_FILES_CHKSUM = "file://COPYING;md5=441c28d2cf86e15a37fa47e15a72fbac \ | ||
| 8 | file://COPYING.LIB;endline=24;md5=c04def7ae38850e7d3ef548588159913" | ||
| 9 | |||
| 10 | SRC_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 | " | ||
| 27 | UPSTREAM_CHECK_REGEX = "qemu-(?P<pver>\d+(\.\d+)+)\.tar" | ||
| 28 | |||
| 29 | SRC_URI_append_class-native = " \ | ||
| 30 | file://0012-fix-libcap-header-issue-on-some-distro.patch \ | ||
| 31 | file://0013-cpus.c-Add-error-messages-when-qemi_cpu_kick_thread-.patch \ | ||
| 32 | " | ||
| 33 | |||
| 34 | SRC_URI[md5sum] = "fb687ce0b02d3bf4327e36d3b99427a8" | ||
| 35 | SRC_URI[sha256sum] = "6a0508df079a0a33c2487ca936a56c12122f105b8a96a44374704bef6c69abfc" | ||
| 36 | |||
| 37 | COMPATIBLE_HOST_mipsarchn32 = "null" | ||
| 38 | COMPATIBLE_HOST_mipsarchn64 = "null" | ||
| 39 | |||
| 40 | do_install_append() { | ||
| 41 | # Prevent QA warnings about installed ${localstatedir}/run | ||
| 42 | if [ -d ${D}${localstatedir}/run ]; then rmdir ${D}${localstatedir}/run; fi | ||
| 43 | install -Dm 0755 ${WORKDIR}/powerpc_rom.bin ${D}${datadir}/qemu | ||
| 44 | } | ||
| 45 | 6 | ||
| 46 | do_compile_ptest() { | 7 | RDEPENDS_${PN}_class-target += "bash" |
| 47 | make buildtest-TESTS | ||
| 48 | } | ||
| 49 | 8 | ||
| 50 | do_install_ptest() { | 9 | EXTRA_OECONF_append_class-target = " --target-list=${@get_qemu_target_list(d)}" |
| 51 | cp -rL ${B}/tests ${D}${PTEST_PATH} | 10 | EXTRA_OECONF_append_class-nativesdk = " --target-list=${@get_qemu_target_list(d)}" |
| 52 | find ${D}${PTEST_PATH}/tests -type f -name "*.[Sshcod]" | xargs -i rm -rf {} | ||
| 53 | 11 | ||
| 54 | cp ${S}/tests/Makefile.include ${D}${PTEST_PATH}/tests | 12 | do_install_append_class-nativesdk() { |
| 55 | # Don't check the file genreated by configure | 13 | ${@bb.utils.contains('PACKAGECONFIG', 'gtk+', 'make_qemu_wrapper', '', d)} |
| 56 | sed -i -e '/wildcard config-host.mak/d' \ | ||
| 57 | -e '$ {/endif/d}' ${D}${PTEST_PATH}/tests/Makefile.include | ||
| 58 | } | 14 | } |
| 15 | |||
| 16 | PACKAGECONFIG ??= " \ | ||
| 17 | fdt sdl kvm \ | ||
| 18 | ${@bb.utils.filter('DISTRO_FEATURES', 'alsa xen', d)} \ | ||
| 19 | " | ||
| 20 | PACKAGECONFIG_class-nativesdk ??= "fdt sdl kvm" | ||
| 21 | |||
| 22 | |||
