qemu: reduce duplication, use an inc file and share common patches

There's no need to carry around two copies of the same patches for qemu-git and
qemu-0.12 so drop the qemu-git directory and update the git recipe to use the
qemu-0.12 directory for patches.

Move common code from the two recipes to an inc file.

Signed-off-by: Joshua Lock <josh@linux.intel.com>

fweh
This commit is contained in:
Joshua Lock 2010-05-28 09:13:03 +01:00
parent 3d6e7e7d0c
commit 32a85c1570
17 changed files with 47 additions and 34645 deletions

View File

@ -1,12 +0,0 @@
Index: qemu/linux-user/syscall.c
===================================================================
--- qemu.orig/linux-user/syscall.c 2010-05-11 13:16:22.421783949 -0400
+++ qemu/linux-user/syscall.c 2010-05-11 13:16:31.759805849 -0400
@@ -26,6 +26,7 @@
#include <errno.h>
#include <unistd.h>
#include <fcntl.h>
+#include <dirent.h>
#include <time.h>
#include <limits.h>
#include <sys/types.h>

View File

@ -1,68 +0,0 @@
Index: qemu/Makefile.target
===================================================================
--- qemu.orig/Makefile.target 2010-05-11 16:53:34.545811866 -0400
+++ qemu/Makefile.target 2010-05-11 16:53:37.743809704 -0400
@@ -47,6 +47,9 @@ libobj-$(CONFIG_NOSOFTFLOAT) += fpu/soft
libobj-y += op_helper.o helper.o
libobj-$(CONFIG_NEED_MMU) += mmu.o
libobj-$(TARGET_I386) += helper_opengl.o opengl_exec.o
+libobj-$(TARGET_X86_64) += helper_opengl.o opengl_exec.o
+libobj-$(TARGET_ARM) += dummygl.o
+libobj-$(TARGET_MIPS) += dummygl.o
libobj-$(TARGET_ARM) += neon_helper.o iwmmxt_helper.o
libobj-$(TARGET_ALPHA) += alpha_palcode.o
Index: qemu/target-arm/dummygl.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ qemu/target-arm/dummygl.c 2010-05-11 16:53:37.743809704 -0400
@@ -0,0 +1,22 @@
+#include <string.h>
+#include <stdlib.h>
+#include <assert.h>
+#include <stdint.h>
+#include <X11/Xlib.h>
+#include <X11/Xutil.h>
+
+void opengl_exec_set_parent_window(Display* _dpy, Window _parent_window)
+{
+
+}
+
+void opengl_process_enable(void)
+{
+
+}
+
+
+void mem_opengl(uint64_t ptr)
+{
+
+}
Index: qemu/target-mips/dummygl.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ qemu/target-mips/dummygl.c 2010-05-11 16:53:37.744811919 -0400
@@ -0,0 +1,22 @@
+#include <string.h>
+#include <stdlib.h>
+#include <assert.h>
+#include <stdint.h>
+#include <X11/Xlib.h>
+#include <X11/Xutil.h>
+
+void opengl_exec_set_parent_window(Display* _dpy, Window _parent_window)
+{
+
+}
+
+void opengl_process_enable(void)
+{
+
+}
+
+
+void mem_opengl(uint64_t ptr)
+{
+
+}

View File

@ -1,26 +0,0 @@
Index: qemu/Makefile
===================================================================
--- qemu.orig/Makefile 2010-05-11 17:17:06.416912704 -0400
+++ qemu/Makefile 2010-05-11 17:17:17.051812402 -0400
@@ -300,7 +300,7 @@ endif
install: all $(if $(BUILD_DOCS),install-doc)
$(INSTALL_DIR) "$(DESTDIR)$(bindir)"
ifneq ($(TOOLS),)
- $(INSTALL_PROG) $(STRIP_OPT) $(TOOLS) "$(DESTDIR)$(bindir)"
+ $(INSTALL_PROG) $(TOOLS) "$(DESTDIR)$(bindir)"
endif
ifneq ($(BLOBS),)
$(INSTALL_DIR) "$(DESTDIR)$(datadir)"
Index: qemu/Makefile.target
===================================================================
--- qemu.orig/Makefile.target 2010-05-11 17:17:12.188784092 -0400
+++ qemu/Makefile.target 2010-05-11 17:17:17.052808122 -0400
@@ -351,7 +351,7 @@ clean:
install: all
ifneq ($(PROGS),)
- $(INSTALL) -m 755 $(STRIP_OPT) $(PROGS) "$(DESTDIR)$(bindir)"
+ $(INSTALL) -m 755 $(PROGS) "$(DESTDIR)$(bindir)"
endif
# Include automatically generated dependency files

File diff suppressed because it is too large Load Diff

View File

@ -1,63 +0,0 @@
Allow releasing the GLXContext/Drawable with glXMakeCurrent.
---
commit d942ed4e853e08d2298f3e11e9a952c1d952bff5
tree f0a934efd8a8ff48e2d96f0d6fc7d70bef106bfe
parent 93619e6be184f8de08759d347825ee0d678a6f9c
author Andrzej Zaborowski <andrew.zaborowski@intel.com> Tue, 16 Jun 2009 22:22:05 +0200
committer Andrzej Zaborowski <andrew.zaborowski@intel.com> Tue, 16 Jun 2009 22:22:05 +0200
target-i386/opengl_exec.c | 31 ++++++++++++++++---------------
1 files changed, 16 insertions(+), 15 deletions(-)
Index: qemu/target-i386/opengl_exec.c
===================================================================
--- qemu.orig/target-i386/opengl_exec.c 2010-05-10 18:46:43.175394992 -0400
+++ qemu/target-i386/opengl_exec.c 2010-05-10 18:46:43.218419933 -0400
@@ -1600,10 +1600,9 @@ int do_function_call(int func_number, ar
fprintf(stderr, "client_drawable=%p fake_ctx=%d\n",
(void *) client_drawable, fake_ctxt);
- if (client_drawable == 0 && fake_ctxt == 0) {
+ if (client_drawable == 0 && fake_ctxt == 0)
ret_int = glXMakeCurrent(dpy, 0, NULL);
- process->current_state = &process->default_state;
- } else if ((drawable = (GLXDrawable)
+ else if ((drawable = (GLXDrawable)
get_association_fakepbuffer_pbuffer(
process, client_drawable))) {
GLXContext ctxt = get_association_fakecontext_glxcontext(
@@ -1651,19 +1650,21 @@ int do_function_call(int func_number, ar
}
if (ret_int) {
- for (i = 0; i < process->nb_states; i ++) {
- if (process->glstates[i]->fake_ctxt == fake_ctxt) {
- /* HACK !!! REMOVE */
- process->current_state = process->glstates[i];
- process->current_state->drawable = drawable;
- break;
- }
- }
+ if (fake_ctxt) {
+ for (i = 0; i < process->nb_states; i ++)
+ if (process->glstates[i]->fake_ctxt == fake_ctxt) {
+ /* HACK !!! REMOVE */
+ process->current_state = process->glstates[i];
+ process->current_state->drawable = drawable;
+ break;
+ }
- if (i == process->nb_states) {
- fprintf(stderr, "error remembering the new context\n");
- exit(-1);
- }
+ if (i == process->nb_states) {
+ fprintf(stderr, "error remembering the new context\n");
+ exit(-1);
+ }
+ } else
+ process->current_state = &process->default_state;
}
break;
}

View File

@ -1,24 +0,0 @@
---
linux-user/syscall.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
Index: qemu/linux-user/syscall.c
===================================================================
--- qemu.orig/linux-user/syscall.c 2010-05-11 16:52:16.929785275 -0400
+++ qemu/linux-user/syscall.c 2010-05-11 16:52:25.174783517 -0400
@@ -94,6 +94,15 @@
#define CLONE_NPTL_FLAGS2 0
#endif
+#define FUTEX_WAIT 0
+#define FUTEX_WAKE 1
+#define FUTEX_FD 2
+#define FUTEX_REQUEUE 3
+#define FUTEX_CMP_REQUEUE 4
+#define FUTEX_WAKE_OP 5
+#define FUTEX_LOCK_PI 6
+#define FUTEX_UNLOCK_PI 7
+
//#define DEBUG
//#include <linux/msdos_fs.h>

View File

@ -0,0 +1,38 @@
DESCRIPTION = "open source processor emulator"
HOMEPAGE = "http://qemu.org"
LICENSE = "GPL"
DEPENDS = "zlib"
EXTRA_OECONF = "--target-list=arm-linux-user,arm-softmmu,i386-softmmu,x86_64-softmmu,mips-linux-user,mips-softmmu --disable-werror --disable-vnc-tls"
#EXTRA_OECONF += "--disable-sdl"
inherit autotools
# For our gl powered QEMU you need libGL and SDL headers
do_configure_prepend_virtclass-native() {
libgl='no'
libsdl='no'
test -e /usr/lib/libGL.so -a -e /usr/lib/libGLU.so && libgl='yes'
test -e /usr/lib64/libGL.so -a -e /usr/lib64/libGLU.so && libgl='yes'
test -e /usr/lib/pkgconfig/sdl.pc -o -e /usr/lib64/pkgconfig/sdl.pc && libsdl='yes'
if [ "$libsdl" != 'yes' -o "$libgl" != 'yes' ]; then
echo "You need libGL.so and libGLU.so to exist in your library path and the development headers for SDL installed to build qemu-native.
Ubuntu package names are: libgl1-mesa-dev, libglu1-mesa-dev and libsdl1.2-dev"
exit 1;
fi
}
do_configure() {
${S}/configure --prefix=${prefix} ${EXTRA_OECONF}
chmod a+x ${S}/target-i386/beginend_funcs.sh
}
SRC_URI_append_virtclass-nativesdk = " file://glflags.patch;patch=1"
DEPENDS_virtclass-nativesdk = "zlib-nativesdk libsdl-nativesdk qemugl-nativesdk"
RDEPENDS_virtclass-nativesdk = "libsdl-nativesdk"
EXTRA_OECONF_virtclass-nativesdk = "--target-list=arm-linux-user,arm-softmmu,i386-softmmu,x86_64-softmmu,mips-linux-user,mips-softmmu --disable-vnc-tls --cc=${HOST_PREFIX}gcc"
BBCLASSEXTEND = "native nativesdk"

View File

@ -1,12 +1,12 @@
LICENSE = "GPL"
DEPENDS = "zlib"
PR = "r9"
require qemu.inc
PR = "r10"
FILESPATH = "${FILE_DIRNAME}/qemu-${PV}"
FILESDIR = "${WORKDIR}"
SRC_URI = "\
http://download.savannah.gnu.org/releases/qemu/qemu-0.12.0.tar.gz \
http://download.savannah.gnu.org/releases/qemu/qemu-${PV}.tar.gz \
file://workaround_bad_futex_headers.patch;patch=1 \
file://qemu-git-qemugl-host.patch;patch=1 \
file://no-strip.patch;patch=1 \
@ -15,37 +15,3 @@ SRC_URI = "\
file://qemugl-allow-glxcontext-release.patch;patch=1"
S = "${WORKDIR}/qemu-${PV}"
EXTRA_OECONF = "--target-list=arm-linux-user,arm-softmmu,i386-softmmu,x86_64-softmmu,mips-linux-user,mips-softmmu --disable-werror --disable-vnc-tls"
#EXTRA_OECONF += "--disable-sdl"
inherit autotools
# For our gl powered QEMU you need libGL and SDL headers
do_configure_prepend_virtclass-native() {
libgl='no'
libsdl='no'
test -e /usr/lib/libGL.so -a -e /usr/lib/libGLU.so && libgl='yes'
test -e /usr/lib64/libGL.so -a -e /usr/lib64/libGLU.so && libgl='yes'
test -e /usr/lib/pkgconfig/sdl.pc -o -e /usr/lib64/pkgconfig/sdl.pc && libsdl='yes'
if [ "$libsdl" != 'yes' -o "$libgl" != 'yes' ]; then
echo "You need libGL.so and libGLU.so to exist in your library path and the development headers for SDL installed to build qemu-native.
Ubuntu package names are: libgl1-mesa-dev, libglu1-mesa-dev and libsdl1.2-dev"
exit 1;
fi
}
do_configure() {
${S}/configure --prefix=${prefix} ${EXTRA_OECONF}
chmod a+x ${S}/target-i386/beginend_funcs.sh
}
SRC_URI_append_virtclass-nativesdk = " file://glflags.patch;patch=1"
DEPENDS_virtclass-nativesdk = "zlib-nativesdk libsdl-nativesdk qemugl-nativesdk"
RDEPENDS_virtclass-nativesdk = "libsdl-nativesdk"
EXTRA_OECONF_virtclass-nativesdk = "--target-list=arm-linux-user,arm-softmmu,i386-softmmu,x86_64-softmmu,mips-linux-user,mips-softmmu --disable-vnc-tls --cc=${HOST_PREFIX}gcc"
BBCLASSEXTEND = "native nativesdk"

View File

@ -1,9 +1,9 @@
LICENSE = "GPL"
DEPENDS = "zlib"
PV = "0.12.0+git${SRCREV}"
PR = "r5"
require qemu.inc
FILESPATH = "${FILE_DIRNAME}/qemu-${PV}/:${FILE_DIRNAME}/qemu-git/"
PV = "0.12.0+git${SRCREV}"
PR = "r6"
FILESPATH = "${FILE_DIRNAME}/qemu-${PV}/:${FILE_DIRNAME}/qemu-git/:${FILE_DIRNAME}/qemu-0.12/"
SRC_URI = "\
git://git.sv.gnu.org/qemu.git;protocol=git \
@ -16,36 +16,3 @@ SRC_URI = "\
S = "${WORKDIR}/git"
EXTRA_OECONF = "--target-list=arm-linux-user,arm-softmmu,i386-softmmu,x86_64-softmmu,mips-linux-user,mips-softmmu --disable-werror --disable-vnc-tls"
#EXTRA_OECONF += "--disable-sdl"
inherit autotools
# For our gl powered QEMU you need libGL and SDL headers
do_configure_prepend_virtclass-native() {
libgl='no'
libsdl='no'
test -e /usr/lib/libGL.so -a -e /usr/lib/libGLU.so && libgl='yes'
test -e /usr/lib64/libGL.so -a -e /usr/lib64/libGLU.so && libgl='yes'
test -e /usr/lib/pkgconfig/sdl.pc -o -e /usr/lib64/pkgconfig/sdl.pc && libsdl='yes'
if [ "$libsdl" != 'yes' -o "$libgl" != 'yes' ]; then
echo "You need libGL.so and libGLU.so to exist in your library path and the development headers for SDL installed to build qemu-native.
Ubuntu package names are: libgl1-mesa-dev, libglu1-mesa-dev and libsdl1.2-dev"
exit 1;
fi
}
do_configure() {
${S}/configure --prefix=${prefix} ${EXTRA_OECONF}
chmod a+x ${S}/target-i386/beginend_funcs.sh
}
SRC_URI_append_virtclass-nativesdk = " file://glflags.patch;patch=1"
DEPENDS_virtclass-nativesdk = "zlib-nativesdk libsdl-nativesdk qemugl-nativesdk"
RDEPENDS_virtclass-nativesdk = "libsdl-nativesdk"
EXTRA_OECONF_virtclass-nativesdk = "--target-list=arm-linux-user,arm-softmmu,i386-softmmu,x86_64-softmmu,mips-linux-user,mips-softmmu --disable-vnc-tls --cc=${HOST_PREFIX}gcc"
BBCLASSEXTEND = "native nativesdk"