summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools')
-rw-r--r--meta/recipes-devtools/qemu/qemu-helper-native_1.0.bb4
-rw-r--r--meta/recipes-devtools/qemu/qemu-native.inc17
-rw-r--r--meta/recipes-devtools/qemu/qemu-native_3.1.0.bb9
-rw-r--r--meta/recipes-devtools/qemu/qemu-system-native_3.1.0.bb23
-rw-r--r--meta/recipes-devtools/qemu/qemu-targets.inc6
-rw-r--r--meta/recipes-devtools/qemu/qemu.inc97
-rw-r--r--meta/recipes-devtools/qemu/qemu_3.1.0.bb68
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 @@
1SUMMARY = "Helper utilities needed by the runqemu script" 1SUMMARY = "Helper utilities needed by the runqemu script"
2LICENSE = "GPLv2" 2LICENSE = "GPLv2"
3RDEPENDS_${PN} = "qemu-native" 3RDEPENDS_${PN} = "qemu-system-native"
4PR = "r1" 4PR = "r1"
5 5
6LIC_FILES_CHKSUM = "file://${WORKDIR}/tunctl.c;endline=4;md5=ff3a09996bc5fff6bc5d4e0b4c28f999" 6LIC_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
23DEPENDS += "qemu-native" 23DEPENDS += "qemu-system-native"
24addtask addto_recipe_sysroot after do_populate_sysroot before do_build 24addtask 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 @@
1inherit native
2
3require qemu.inc
4
5SRC_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 "
9EXTRA_OECONF_append = " --python=python2.7"
10
11EXTRA_OEMAKE_append = " LD='${LD}' AR='${AR}' OBJCOPY='${OBJCOPY}' LDFLAGS='${LDFLAGS}'"
12
13LDFLAGS_append = " -fuse-ld=bfd"
14
15do_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 @@
1BPN = "qemu"
2
3DEPENDS = "glib-2.0-native zlib-native"
4
5require qemu-native.inc
6
7EXTRA_OECONF_append = " --target-list=${@get_qemu_usermode_target_list(d)} --disable-tools --disable-blobs --disable-guest-agent"
8
9PACKAGECONFIG ??= ""
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 @@
1BPN = "qemu"
2
3require 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
8DEPENDS = "glib-2.0-native zlib-native pixman-native qemu-native"
9
10EXTRA_OECONF_append = " --target-list=${@get_qemu_system_target_list(d)}"
11
12PACKAGECONFIG ??= "fdt alsa kvm"
13
14# Handle distros such as CentOS 5 32-bit that do not have kvm support
15PACKAGECONFIG_remove = "${@'kvm' if not os.path.exists('/usr/include/linux/kvm.h') else ''}"
16
17do_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
24def get_qemu_usermode_target_list(d):
25 return ",".join(filter(lambda i: "-linux-user" in i, get_qemu_target_list(d).split(',')))
26
27def 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 @@
1SUMMARY = "Fast open source processor emulator" 1SUMMARY = "Fast 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 pixman" 4
5RDEPENDS_${PN}_class-target += "bash" 5RDEPENDS_${PN}-ptest = "bash make"
6
7LIC_FILES_CHKSUM = "file://COPYING;md5=441c28d2cf86e15a37fa47e15a72fbac \
8 file://COPYING.LIB;endline=24;md5=c04def7ae38850e7d3ef548588159913"
9
10SRC_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 "
27UPSTREAM_CHECK_REGEX = "qemu-(?P<pver>\d+(\.\d+)+)\.tar"
28
29SRC_URI[md5sum] = "fb687ce0b02d3bf4327e36d3b99427a8"
30SRC_URI[sha256sum] = "6a0508df079a0a33c2487ca936a56c12122f105b8a96a44374704bef6c69abfc"
31
32COMPATIBLE_HOST_mipsarchn32 = "null"
33COMPATIBLE_HOST_mipsarchn64 = "null"
34
35do_install_append() {
36 # Prevent QA warnings about installed ${localstatedir}/run
37 if [ -d ${D}${localstatedir}/run ]; then rmdir ${D}${localstatedir}/run; fi
38}
39
40do_compile_ptest() {
41 make buildtest-TESTS
42}
43
44do_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
7require qemu-targets.inc 55require qemu-targets.inc
8inherit pkgconfig bluetooth 56inherit pkgconfig bluetooth ptest
9BBCLASSEXTEND = "native nativesdk"
10 57
11# QEMU_TARGETS is overridable variable 58# QEMU_TARGETS is overridable variable
12QEMU_TARGETS ?= "arm aarch64 i386 mips mipsel mips64 mips64el ppc riscv32 riscv64 sh4 x86_64" 59QEMU_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 "
32EXTRA_OECONF_append_class-native = " --python=python2.7"
33
34EXTRA_OEMAKE_append_class-native = " LD='${LD}' AR='${AR}' OBJCOPY='${OBJCOPY}' LDFLAGS='${LDFLAGS}'"
35
36LDFLAGS_append_class-native = " -fuse-ld=bfd"
37 78
38export LIBTOOL="${HOST_SYS}-libtool" 79export 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
59make_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
70do_install_append_class-native() {
71 ${@bb.utils.contains('PACKAGECONFIG', 'gtk+', 'make_qemu_wrapper', '', d)}
72}
73
74do_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
92PACKAGECONFIG ??= " \ 114make_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"
96PACKAGECONFIG_class-native ??= "fdt alsa kvm"
97PACKAGECONFIG_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
100PACKAGECONFIG_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
103PACKAGECONFIG_remove_darwin = "kvm" 126PACKAGECONFIG_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 @@
1BBCLASSEXTEND = "nativesdk"
2
1require qemu.inc 3require qemu.inc
2 4
3inherit ptest 5DEPENDS = "glib-2.0 zlib pixman"
4
5RDEPENDS_${PN}-ptest = "bash make"
6
7LIC_FILES_CHKSUM = "file://COPYING;md5=441c28d2cf86e15a37fa47e15a72fbac \
8 file://COPYING.LIB;endline=24;md5=c04def7ae38850e7d3ef548588159913"
9
10SRC_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 "
27UPSTREAM_CHECK_REGEX = "qemu-(?P<pver>\d+(\.\d+)+)\.tar"
28
29SRC_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
34SRC_URI[md5sum] = "fb687ce0b02d3bf4327e36d3b99427a8"
35SRC_URI[sha256sum] = "6a0508df079a0a33c2487ca936a56c12122f105b8a96a44374704bef6c69abfc"
36
37COMPATIBLE_HOST_mipsarchn32 = "null"
38COMPATIBLE_HOST_mipsarchn64 = "null"
39
40do_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
46do_compile_ptest() { 7RDEPENDS_${PN}_class-target += "bash"
47 make buildtest-TESTS
48}
49 8
50do_install_ptest() { 9EXTRA_OECONF_append_class-target = " --target-list=${@get_qemu_target_list(d)}"
51 cp -rL ${B}/tests ${D}${PTEST_PATH} 10EXTRA_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 12do_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
16PACKAGECONFIG ??= " \
17 fdt sdl kvm \
18 ${@bb.utils.filter('DISTRO_FEATURES', 'alsa xen', d)} \
19"
20PACKAGECONFIG_class-nativesdk ??= "fdt sdl kvm"
21
22