summaryrefslogtreecommitdiff
path: root/meta/packages/qemu
diff options
context:
space:
mode:
authorRichard Purdie <rpurdie@linux.intel.com>2010-08-27 15:14:24 +0100
committerRichard Purdie <rpurdie@linux.intel.com>2010-08-27 15:29:45 +0100
commit29d6678fd546377459ef75cf54abeef5b969b5cf (patch)
tree8edd65790e37a00d01c3f203f773fe4b5012db18 /meta/packages/qemu
parentda49de6885ee1bc424e70bc02f21f6ab920efb55 (diff)
downloadopenembedded-core-29d6678fd546377459ef75cf54abeef5b969b5cf.tar.gz
openembedded-core-29d6678fd546377459ef75cf54abeef5b969b5cf.tar.bz2
openembedded-core-29d6678fd546377459ef75cf54abeef5b969b5cf.zip
Major layout change to the packages directory
Having one monolithic packages directory makes it hard to find things and is generally overwhelming. This commit splits it into several logical sections roughly based on function, recipes.txt gives more information about the classifications used. The opportunity is also used to switch from "packages" to "recipes" as used in OpenEmbedded as the term "packages" can be confusing to people and has many different meanings. Not all recipes have been classified yet, this is just a first pass at separating things out. Some packages are moved to meta-extras as they're no longer actively used or maintained. Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'meta/packages/qemu')
-rw-r--r--meta/packages/qemu/qemu-0.12.4/fix-dirent.patch12
-rw-r--r--meta/packages/qemu/qemu-0.12.4/fix-nogl.patch96
-rw-r--r--meta/packages/qemu/qemu-0.12.4/glflags.patch13
-rw-r--r--meta/packages/qemu/qemu-0.12.4/init-info.patch16
-rw-r--r--meta/packages/qemu/qemu-0.12.4/linker-flags.patch22
-rw-r--r--meta/packages/qemu/qemu-0.12.4/no-strip.patch26
-rw-r--r--meta/packages/qemu/qemu-0.12.4/powerpc_rom.binbin4096 -> 0 bytes
-rw-r--r--meta/packages/qemu/qemu-0.12.4/qemu-git-qemugl-host.patch34376
-rw-r--r--meta/packages/qemu/qemu-0.12.4/qemu-ppc-hack.patch136
-rw-r--r--meta/packages/qemu/qemu-0.12.4/qemu-vmware-vga-depth.patch115
-rw-r--r--meta/packages/qemu/qemu-0.12.4/qemugl-allow-glxcontext-release.patch63
-rw-r--r--meta/packages/qemu/qemu-0.12.4/workaround_bad_futex_headers.patch24
-rw-r--r--meta/packages/qemu/qemu-helper-native_1.0.bb21
-rw-r--r--meta/packages/qemu/qemu-helper-nativesdk_1.0.bb44
-rw-r--r--meta/packages/qemu/qemu-helper/raw2flash.c370
-rw-r--r--meta/packages/qemu/qemu-helper/tunctl.c156
-rw-r--r--meta/packages/qemu/qemu.inc39
-rw-r--r--meta/packages/qemu/qemu_0.12.4.bb27
-rw-r--r--meta/packages/qemu/qemu_git.bb21
19 files changed, 0 insertions, 35577 deletions
diff --git a/meta/packages/qemu/qemu-0.12.4/fix-dirent.patch b/meta/packages/qemu/qemu-0.12.4/fix-dirent.patch
deleted file mode 100644
index 8bbfa0e88e..0000000000
--- a/meta/packages/qemu/qemu-0.12.4/fix-dirent.patch
+++ /dev/null
@@ -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>
diff --git a/meta/packages/qemu/qemu-0.12.4/fix-nogl.patch b/meta/packages/qemu/qemu-0.12.4/fix-nogl.patch
deleted file mode 100644
index 528b6f0d18..0000000000
--- a/meta/packages/qemu/qemu-0.12.4/fix-nogl.patch
+++ /dev/null
@@ -1,96 +0,0 @@
-Index: qemu-0.12.4/Makefile.target
-===================================================================
---- qemu-0.12.4.orig/Makefile.target 2010-06-24 07:59:15.669394205 +0100
-+++ qemu-0.12.4/Makefile.target 2010-06-24 08:07:38.739399512 +0100
-@@ -47,6 +47,10 @@
- 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_PPC) += dummygl.o
- libobj-$(TARGET_ARM) += neon_helper.o iwmmxt_helper.o
- libobj-$(TARGET_ALPHA) += alpha_palcode.o
-
-Index: qemu-0.12.4/target-arm/dummygl.c
-===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ qemu-0.12.4/target-arm/dummygl.c 2010-06-24 07:59:15.899401748 +0100
-@@ -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-0.12.4/target-mips/dummygl.c
-===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ qemu-0.12.4/target-mips/dummygl.c 2010-06-24 07:59:15.899401748 +0100
-@@ -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-0.12.4/target-ppc/dummygl.c
-===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ qemu-0.12.4/target-ppc/dummygl.c 2010-06-24 08:07:59.070712946 +0100
-@@ -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)
-+{
-+
-+}
diff --git a/meta/packages/qemu/qemu-0.12.4/glflags.patch b/meta/packages/qemu/qemu-0.12.4/glflags.patch
deleted file mode 100644
index 0a27c2dee1..0000000000
--- a/meta/packages/qemu/qemu-0.12.4/glflags.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-Index: git/Makefile.target
-===================================================================
---- git.orig/Makefile.target 2010-05-27 12:35:26.000000000 -0400
-+++ git/Makefile.target 2010-05-27 12:59:53.520415731 -0400
-@@ -326,7 +326,7 @@ vl.o: qemu-options.h
-
- monitor.o: qemu-monitor.h
-
--LIBS += -lGL -lGLU
-+LIBS += -lGL
-
- ARLIBS=../libqemu_common.a libqemu.a $(HWLIB)
-
diff --git a/meta/packages/qemu/qemu-0.12.4/init-info.patch b/meta/packages/qemu/qemu-0.12.4/init-info.patch
deleted file mode 100644
index 8ba7d8ff4c..0000000000
--- a/meta/packages/qemu/qemu-0.12.4/init-info.patch
+++ /dev/null
@@ -1,16 +0,0 @@
-# This is a workaround to the crashes seen on Ubuntu. Setting info to zero
-# makes info.info.x11.display zero and avoids the calls to
-# opengl_exec_set_parent_window, one of which is crashing.
-
-Index: qemu-0.12.4/sdl.c
-===================================================================
---- qemu-0.12.4.orig/sdl.c
-+++ qemu-0.12.4/sdl.c
-@@ -871,6 +871,7 @@ void sdl_display_init(DisplayState *ds,
- vi = SDL_GetVideoInfo();
- host_format = *(vi->vfmt);
-
-+ bzero(&info, sizeof(info));
- SDL_GetWMInfo(&info);
- if (info.subsystem == SDL_SYSWM_X11 && info.info.x11.display)
- opengl_exec_set_parent_window(info.info.x11.display,
diff --git a/meta/packages/qemu/qemu-0.12.4/linker-flags.patch b/meta/packages/qemu/qemu-0.12.4/linker-flags.patch
deleted file mode 100644
index 7b33aa4840..0000000000
--- a/meta/packages/qemu/qemu-0.12.4/linker-flags.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-Fedora 13 switched the default behaviour of the linker to no longer
-indirectly link to required libraries (i.e. dependencies of a library
-already linked to). Therefore we need to explicitly pass the depended on
-libraries into the linker for building to work on Fedora 13.
-
-More information is available on the Fedora Wiki:
-https://fedoraproject.org/wiki/UnderstandingDSOLinkChange
-
-JL - 15/06/10
-Index: qemu-0.12.4/Makefile.target
-===================================================================
---- qemu-0.12.4.orig/Makefile.target 2010-06-15 11:21:52.000000000 +0100
-+++ qemu-0.12.4/Makefile.target 2010-06-15 11:25:27.212852910 +0100
-@@ -178,7 +178,7 @@
- obj-y += virtio-blk.o virtio-balloon.o virtio-net.o virtio-console.o virtio-pci.o
- obj-$(CONFIG_KVM) += kvm.o kvm-all.o
- obj-$(CONFIG_ISA_MMIO) += isa_mmio.o
--LIBS+=-lz
-+LIBS+=-lz -lX11 -ldl
-
- sound-obj-y =
- sound-obj-$(CONFIG_SB16) += sb16.o
diff --git a/meta/packages/qemu/qemu-0.12.4/no-strip.patch b/meta/packages/qemu/qemu-0.12.4/no-strip.patch
deleted file mode 100644
index 8a95a688b3..0000000000
--- a/meta/packages/qemu/qemu-0.12.4/no-strip.patch
+++ /dev/null
@@ -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
diff --git a/meta/packages/qemu/qemu-0.12.4/powerpc_rom.bin b/meta/packages/qemu/qemu-0.12.4/powerpc_rom.bin
deleted file mode 100644
index c4044296c5..0000000000
--- a/meta/packages/qemu/qemu-0.12.4/powerpc_rom.bin
+++ /dev/null
Binary files differ
diff --git a/meta/packages/qemu/qemu-0.12.4/qemu-git-qemugl-host.patch b/meta/packages/qemu/qemu-0.12.4/qemu-git-qemugl-host.patch
deleted file mode 100644
index ab31476218..0000000000
--- a/meta/packages/qemu/qemu-0.12.4/qemu-git-qemugl-host.patch
+++ /dev/null
@@ -1,34376 +0,0 @@
-Index: qemu-0.12.4/Makefile.target
-===================================================================
---- qemu-0.12.4.orig/Makefile.target
-+++ qemu-0.12.4/Makefile.target
-@@ -46,6 +46,7 @@ libobj-$(CONFIG_SOFTFLOAT) += fpu/softfl
- libobj-$(CONFIG_NOSOFTFLOAT) += fpu/softfloat-native.o
- libobj-y += op_helper.o helper.o
- libobj-$(CONFIG_NEED_MMU) += mmu.o
-+libobj-$(TARGET_I386) += helper_opengl.o opengl_exec.o
- libobj-$(TARGET_ARM) += neon_helper.o iwmmxt_helper.o
- libobj-$(TARGET_ALPHA) += alpha_palcode.o
-
-@@ -82,6 +83,21 @@ op_helper.o cpu-exec.o: QEMU_CFLAGS += $
- # cpu_signal_handler() in cpu-exec.c.
- signal.o: QEMU_CFLAGS += $(HELPER_CFLAGS)
-
-+parse_gl_h: parse_gl_h.c
-+ $(HOST_CC) -g -o $@ $<
-+server_stub.c: parse_gl_h
-+ ./parse_gl_h
-+gl_func.h: parse_gl_h
-+ ./parse_gl_h
-+GL_CFLAGS := -Wall -g -O2 -fno-strict-aliasing
-+opengl_func.h: gl_func.h
-+helper_opengl.o: helper_opengl.c opengl_func.h server_stub.c
-+ $(CC) $(GL_CFLAGS) $(DEFINES) -c -o $@ $< -I.. -I. -I../fpu -I../target-i386 -DNEED_CPU_H
-+gl_beginend.h: ../target-i386/beginend_funcs.sh
-+ $< > $@
-+opengl_exec.o : opengl_exec.c server_stub.c gl_func.h opengl_func.h gl_beginend.h
-+ $(CC) $(GL_CFLAGS) $(DEFINES) -c -o $@ $< -I. -I../target-i386
-+
- #########################################################
- # Linux user emulator target
-
-@@ -196,6 +212,10 @@ obj-i386-y += usb-uhci.o vmmouse.o vmpor
- obj-i386-y += device-hotplug.o pci-hotplug.o smbios.o wdt_ib700.o
- obj-i386-y += ne2000-isa.o
-
-+ifeq ($(TARGET_BASE_ARCH), i386)
-+QEMU_CFLAGS += -DTARGET_OPENGL_OK
-+endif
-+
- # shared objects
- obj-ppc-y = ppc.o ide/core.o ide/qdev.o ide/isa.o ide/pci.o ide/macio.o
- obj-ppc-y += ide/cmd646.o
-@@ -303,6 +323,8 @@ vl.o: qemu-options.h
-
- monitor.o: qemu-monitor.h
-
-+LIBS += -lGL -lGLU
-+
- ARLIBS=../libqemu_common.a libqemu.a $(HWLIB)
-
- endif # CONFIG_SOFTMMU
-Index: qemu-0.12.4/hw/pixel_ops.h
-===================================================================
---- qemu-0.12.4.orig/hw/pixel_ops.h
-+++ qemu-0.12.4/hw/pixel_ops.h
-@@ -4,6 +4,12 @@ static inline unsigned int rgb_to_pixel8
- return ((r >> 5) << 5) | ((g >> 5) << 2) | (b >> 6);
- }
-
-+static inline unsigned int rgb_to_pixel8bgr(unsigned int r, unsigned int g,
-+ unsigned int b)
-+{
-+ return ((b >> 5) << 5) | ((g >> 5) << 2) | (r >> 6);
-+}
-+
- static inline unsigned int rgb_to_pixel15(unsigned int r, unsigned int g,
- unsigned int b)
- {
-Index: qemu-0.12.4/hw/vmware_vga.c
-===================================================================
---- qemu-0.12.4.orig/hw/vmware_vga.c
-+++ qemu-0.12.4/hw/vmware_vga.c
-@@ -489,6 +489,8 @@ static inline void vmsvga_cursor_define(
-
- #define CMD(f) le32_to_cpu(s->cmd->f)
-
-+static uint32_t last_cmd;
-+
- static inline int vmsvga_fifo_empty(struct vmsvga_state_s *s)
- {
- if (!s->config || !s->enable)
-@@ -498,11 +500,18 @@ static inline int vmsvga_fifo_empty(stru
-
- static inline uint32_t vmsvga_fifo_read_raw(struct vmsvga_state_s *s)
- {
-- uint32_t cmd = s->fifo[CMD(stop) >> 2];
-- s->cmd->stop = cpu_to_le32(CMD(stop) + 4);
-- if (CMD(stop) >= CMD(max))
-+ int offset = CMD(stop);
-+
-+ if (unlikely(s->cmd->next_cmd == s->cmd->stop)) {
-+ fprintf(stderr, "%s: FIFO empty during CMD %i\n",
-+ __FUNCTION__, last_cmd);
-+ return 0x00000000;
-+ }
-+
-+ s->cmd->stop = cpu_to_le32(offset + 4);
-+ if (offset + 4 >= CMD(max))
- s->cmd->stop = s->cmd->min;
-- return cmd;
-+ return s->fifo[offset >> 2];
- }
-
- static inline uint32_t vmsvga_fifo_read(struct vmsvga_state_s *s)
-@@ -512,12 +521,12 @@ static inline uint32_t vmsvga_fifo_read(
-
- static void vmsvga_fifo_run(struct vmsvga_state_s *s)
- {
-- uint32_t cmd, colour;
-+ uint32_t colour;
- int args = 0;
- int x, y, dx, dy, width, height;
- struct vmsvga_cursor_definition_s cursor;
- while (!vmsvga_fifo_empty(s))
-- switch (cmd = vmsvga_fifo_read(s)) {
-+ switch (last_cmd = vmsvga_fifo_read(s)) {
- case SVGA_CMD_UPDATE:
- case SVGA_CMD_UPDATE_VERBOSE:
- x = vmsvga_fifo_read(s);
-@@ -624,7 +633,7 @@ static void vmsvga_fifo_run(struct vmsvg
- while (args --)
- vmsvga_fifo_read(s);
- printf("%s: Unknown command 0x%02x in SVGA command FIFO\n",
-- __FUNCTION__, cmd);
-+ __FUNCTION__, last_cmd);
- break;
- }
-
-@@ -1143,6 +1152,12 @@ static void vmsvga_init(struct vmsvga_st
-
- vga_init_vbe(&s->vga);
-
-+#ifdef EMBED_STDVGA
-+ s->vga.map_addr = VBE_DISPI_LFB_PHYSICAL_ADDRESS;
-+ s->vga.map_end = VBE_DISPI_LFB_PHYSICAL_ADDRESS + vga_ram_size;
-+ vga_dirty_log_start(s);
-+#endif
-+
- rom_add_vga(VGABIOS_FILENAME);
-
- vmsvga_reset(s);
-Index: qemu-0.12.4/qemu-char.c
-===================================================================
---- qemu-0.12.4.orig/qemu-char.c
-+++ qemu-0.12.4/qemu-char.c
-@@ -2235,6 +2235,69 @@ static CharDriverState *qemu_chr_open_so
- return NULL;
- }
-
-+#define TARGET_OPENGL_OK
-+#if defined(TARGET_OPENGL_OK)
-+static uint8_t buffer[32];
-+static int buffer_len;
-+static int hexdigit[128] = {
-+ ['0'] = 0x0,
-+ ['1'] = 0x1,
-+ ['2'] = 0x2,
-+ ['3'] = 0x3,
-+ ['4'] = 0x4,
-+ ['5'] = 0x5,
-+ ['6'] = 0x6,
-+ ['7'] = 0x7,
-+ ['8'] = 0x8,
-+ ['9'] = 0x9,
-+ ['a'] = 0xa,
-+ ['b'] = 0xb,
-+ ['c'] = 0xc,
-+ ['d'] = 0xd,
-+ ['e'] = 0xe,
-+ ['f'] = 0xf,
-+};
-+
-+static int opengl_chr_write(CharDriverState *chr, const uint8_t *buf, int len)
-+{
-+ uint64_t ptr = 0;
-+ int i;
-+
-+ if (memchr(buf, 'x', len))
-+ opengl_process_enable();
-+ return len;
-+ memcpy(buffer + buffer_len, buf, len);
-+ buffer_len += len;
-+
-+ if (buffer_len >= 16) {
-+ for (i = 0; i < 16; i ++)
-+ ptr = (ptr << 4) + hexdigit[buffer[i]];
-+
-+ buffer_len -= 16;
-+ if (buffer_len)
-+ memcpy(buffer, buffer + 16, buffer_len);
-+
-+ mem_opengl(ptr);
-+ }
-+
-+ return len;
-+}
-+
-+CharDriverState *qemu_chr_open_opengl(void)
-+{
-+ CharDriverState *chr = qemu_mallocz(sizeof(CharDriverState));
-+
-+ chr->opaque = chr;
-+ chr->chr_write = opengl_chr_write;
-+
-+ qemu_chr_generic_open(chr);
-+
-+ return chr;
-+}
-+#else
-+#define qemu_chr_open_opengl() 0
-+#endif
-+
- QemuOpts *qemu_chr_parse_compat(const char *label, const char *filename)
- {
- char host[65], port[33], width[8], height[8];
-@@ -2353,6 +2416,10 @@ QemuOpts *qemu_chr_parse_compat(const ch
- qemu_opt_set(opts, "path", filename);
- return opts;
- }
-+ if (!strcmp(filename, "opengl")){
-+ qemu_opt_set(opts, "backend", "opengl");
-+ return opts;
-+ }
-
- fail:
- qemu_opts_del(opts);
-@@ -2368,6 +2435,7 @@ static const struct {
- { .name = "udp", .open = qemu_chr_open_udp },
- { .name = "msmouse", .open = qemu_chr_open_msmouse },
- { .name = "vc", .open = text_console_init },
-+ { .name = "opengl", .open = qemu_chr_open_opengl },
- #ifdef _WIN32
- { .name = "file", .open = qemu_chr_open_win_file_out },
- { .name = "pipe", .open = qemu_chr_open_win_pipe },
-Index: qemu-0.12.4/sdl.c
-===================================================================
---- qemu-0.12.4.orig/sdl.c
-+++ qemu-0.12.4/sdl.c
-@@ -58,6 +58,8 @@ static uint8_t allocator;
- static SDL_PixelFormat host_format;
- static int scaling_active = 0;
-
-+extern void opengl_exec_set_parent_window(Display* _dpy, Window _parent_window);
-+
- static void sdl_update(DisplayState *ds, int x, int y, int w, int h)
- {
- // printf("updating x=%d y=%d w=%d h=%d\n", x, y, w, h);
-@@ -119,12 +121,22 @@ static void do_sdl_resize(int new_width,
-
- static void sdl_resize(DisplayState *ds)
- {
-- if (!allocator) {
-+ SDL_SysWMinfo info;
-+ static Display *dpy;
-+
-+ if (!allocator) {
- if (!scaling_active)
- do_sdl_resize(ds_get_width(ds), ds_get_height(ds), 0);
- else if (real_screen->format->BitsPerPixel != ds_get_bits_per_pixel(ds))
- do_sdl_resize(real_screen->w, real_screen->h, ds_get_bits_per_pixel(ds));
- sdl_setdata(ds);
-+
-+ SDL_GetWMInfo(&info);
-+ if (info.subsystem == SDL_SYSWM_X11 && info.info.x11.display &&
-+ (!dpy || dpy == info.info.x11.display)) {
-+ dpy = info.info.x11.display;
-+ opengl_exec_set_parent_window(dpy, info.info.x11.window);
-+ }
- } else {
- if (guest_screen != NULL) {
- SDL_FreeSurface(guest_screen);
-@@ -453,7 +465,7 @@ static void sdl_show_cursor(void)
-
- if (!kbd_mouse_is_absolute()) {
- SDL_ShowCursor(1);
-- if (guest_cursor &&
-+ if (guest_cursor && !force_pointer &&
- (gui_grab || kbd_mouse_is_absolute() || absolute_enabled))
- SDL_SetCursor(guest_sprite);
- else
-@@ -464,7 +476,8 @@ static void sdl_show_cursor(void)
- static void sdl_grab_start(void)
- {
- if (guest_cursor) {
-- SDL_SetCursor(guest_sprite);
-+ if (!force_pointer)
-+ SDL_SetCursor(guest_sprite);
- if (!kbd_mouse_is_absolute() && !absolute_enabled)
- SDL_WarpMouse(guest_x, guest_y);
- } else
-@@ -505,8 +518,8 @@ static void sdl_send_mouse_event(int dx,
- absolute_enabled = 1;
- }
-
-- dx = x * 0x7FFF / (width - 1);
-- dy = y * 0x7FFF / (height - 1);
-+ dx = x * 0x7FFF / (width - 1);
-+ dy = y * 0x7FFF / (height - 1);
- } else if (absolute_enabled) {
- sdl_show_cursor();
- absolute_enabled = 0;
-@@ -761,7 +774,8 @@ static void sdl_mouse_warp(int x, int y,
- if (!guest_cursor)
- sdl_show_cursor();
- if (gui_grab || kbd_mouse_is_absolute() || absolute_enabled) {
-- SDL_SetCursor(guest_sprite);
-+ if (!force_pointer)
-+ SDL_SetCursor(guest_sprite);
- if (!kbd_mouse_is_absolute() && !absolute_enabled)
- SDL_WarpMouse(x, y);
- }
-@@ -815,7 +829,7 @@ static void sdl_mouse_define(int width,
- }
- guest_sprite = SDL_CreateCursor(sprite, mask, width, height, hot_x, hot_y);
-
-- if (guest_cursor &&
-+ if (guest_cursor && !force_pointer &&
- (gui_grab || kbd_mouse_is_absolute() || absolute_enabled))
- SDL_SetCursor(guest_sprite);
- }
-@@ -832,6 +846,7 @@ void sdl_display_init(DisplayState *ds,
- int flags;
- uint8_t data = 0;
- DisplayAllocator *da;
-+ SDL_SysWMinfo info;
- const SDL_VideoInfo *vi;
-
- #if defined(__APPLE__)
-@@ -856,6 +871,12 @@ void sdl_display_init(DisplayState *ds,
- vi = SDL_GetVideoInfo();
- host_format = *(vi->vfmt);
-
-+ SDL_GetWMInfo(&info);
-+ if (info.subsystem == SDL_SYSWM_X11 && info.info.x11.display)
-+ opengl_exec_set_parent_window(info.info.x11.display,
-+ RootWindow(info.info.x11.display,
-+ DefaultScreen(info.info.x11.display)));
-+
- dcl = qemu_mallocz(sizeof(DisplayChangeListener));
- dcl->dpy_update = sdl_update;
- dcl->dpy_resize = sdl_resize;
-@@ -891,4 +912,9 @@ void sdl_display_init(DisplayState *ds,
- gui_fullscreen_initial_grab = 1;
- sdl_grab_start();
- }
-+
-+ SDL_GetWMInfo(&info);
-+ if (info.subsystem == SDL_SYSWM_X11 && info.info.x11.display)
-+ opengl_exec_set_parent_window(info.info.x11.display,
-+ info.info.x11.window);
- }
-Index: qemu-0.12.4/slirp/udp.c
-===================================================================
---- qemu-0.12.4.orig/slirp/udp.c
-+++ qemu-0.12.4/slirp/udp.c
-@@ -40,6 +40,7 @@
-
- #include <slirp.h>
- #include "ip_icmp.h"
-+#include "bswap.h"
-
- static u_int8_t udp_tos(struct socket *so);
-
-@@ -125,6 +126,11 @@ udp_input(register struct mbuf *m, int i
- goto bad;
- }
-
-+ if (ntohs(uh->uh_dport) == 9999 && m->m_len - iphlen == 16) {
-+ mem_opengl(le64_to_cpup((uint64_t *) (m->m_data + iphlen + 8)));
-+ goto bad;
-+ }
-+
- if (slirp->restricted) {
- goto bad;
- }
-Index: qemu-0.12.4/sysemu.h
-===================================================================
---- qemu-0.12.4.orig/sysemu.h
-+++ qemu-0.12.4/sysemu.h
-@@ -141,6 +141,7 @@ extern int semihosting_enabled;
- extern int old_param;
- extern int boot_menu;
- extern QEMUClock *rtc_clock;
-+extern int force_pointer;
-
- #define MAX_NODES 64
- extern int nb_numa_nodes;
-Index: qemu-0.12.4/target-i386/beginend_funcs.sh
-===================================================================
---- /dev/null
-+++ qemu-0.12.4/target-i386/beginend_funcs.sh
-@@ -0,0 +1,23 @@
-+#! /bin/sh
-+# Copyright 2008 (C) Intel Corporation
-+#
-+# echo names of functions that are legal between a glBegin and glEnd pair.
-+echo -e MAGIC_MACRO\(glVertex{2,3,4}{s,i,f,d}{,v}\)\\n
-+echo -e MAGIC_MACRO\(glTexCoord{1,2,3,4}{s,i,f,d}{,v}\)\\n
-+echo -e MAGIC_MACRO\(glMultiTexCoord{1,2,3,4}{s,i,f,d}{,v}\)\\n
-+echo -e MAGIC_MACRO\(glNormal3{b,s,i,f,d}{,v}\)\\n
-+echo -e MAGIC_MACRO\(glFogCoord{f,d}{,v}\)\\n
-+echo -e MAGIC_MACRO\(glColor{3,4}{b,s,i,f,d,ub,us,ui}{,v}\)\\n
-+echo -e MAGIC_MACRO\(glSecondaryColor3{b,s,i,f,d,ub,us,ui}{,v}\)\\n
-+echo -e MAGIC_MACRO\(glIndex{s,i,f,d,ub}{,v}\)\\n
-+echo -e MAGIC_MACRO\(glVertexAttrib{1,2,3,4}{s,f,d}{,v}\)\\n
-+echo -e MAGIC_MACRO\(glVertexAttrib4{b,i,ub,us,ui}v\)\\n
-+echo -e MAGIC_MACRO\(glVertexAttrib4Nub\)\\n
-+echo -e MAGIC_MACRO\(glVertexAttrib4N{b,s,i,ub,us,ui}v\)\\n
-+echo -e MAGIC_MACRO\(glArrayElement\)\\n
-+echo -e MAGIC_MACRO\(glEvalCoord{1,2}{f,d}{,v}\)\\n
-+echo -e MAGIC_MACRO\(glEvalPoint{1,2}\)\\n
-+echo -e MAGIC_MACRO\(glMaterial{i,f}{,v}\)\\n
-+echo -e MAGIC_MACRO\(glCallList\)\\n
-+echo -e MAGIC_MACRO\(glCallLists\)\\n
-+echo -e MAGIC_MACRO\(glEdgeFlag{,v}\)\\n
-Index: qemu-0.12.4/target-i386/ghash.c
-===================================================================
---- /dev/null
-+++ qemu-0.12.4/target-i386/ghash.c
-@@ -0,0 +1,347 @@
-+/* This is a modified and simplified version of original ghash.c */
-+
-+/* GLIB - Library of useful routines for C programming
-+ * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
-+ *
-+ * This library is free software; you can redistribute it and/or
-+ * modify it under the terms of the GNU Lesser General Public
-+ * License as published by the Free Software Foundation; either
-+ * version 2 of the License, or (at your option) any later version.
-+ *
-+ * This library is distributed in the hope that it will be useful,
-+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+ * Lesser General Public License for more details.
-+ *
-+ * You should have received a copy of the GNU Lesser General Public
-+ * License along with this library; if not, write to the
-+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-+ * Boston, MA 02111-1307, USA.
-+ */
-+
-+/*
-+ * Modified by the GLib Team and others 1997-2000. See the AUTHORS
-+ * file for a list of people on the GLib Team. See the ChangeLog
-+ * files for a list of changes. These files are distributed with
-+ * GLib at ftp://ftp.gtk.org/pub/gtk/.
-+ */
-+
-+
-+#include <stdlib.h>
-+
-+#include "ghash.h"
-+
-+#define HASH_TABLE_MIN_SIZE 11
-+#define HASH_TABLE_MAX_SIZE 13845163
-+
-+#define CLAMP(x, low, high) (((x) > (high)) ? (high) : (((x) < (low)) ? (low) : (x)))
-+
-+
-+typedef struct _SimpleHashNode SimpleHashNode;
-+
-+struct _SimpleHashNode
-+{
-+ int key;
-+ void* value;
-+ SimpleHashNode *next;
-+};
-+
-+struct _SimpleHashTable
-+{
-+ int size;
-+ int nnodes;
-+ SimpleHashNode **nodes;
-+ SimpleDestroyNotify value_destroy_func;
-+};
-+
-+static const unsigned int simple_primes[] =
-+{
-+ 11,
-+ 19,
-+ 37,
-+ 73,
-+ 109,
-+ 163,
-+ 251,
-+ 367,
-+ 557,
-+ 823,
-+ 1237,
-+ 1861,
-+ 2777,
-+ 4177,
-+ 6247,
-+ 9371,
-+ 14057,
-+ 21089,
-+ 31627,
-+ 47431,
-+ 71143,
-+ 106721,
-+ 160073,
-+ 240101,
-+ 360163,
-+ 540217,
-+ 810343,
-+ 1215497,
-+ 1823231,
-+ 2734867,
-+ 4102283,
-+ 6153409,
-+ 9230113,
-+ 13845163,
-+};
-+
-+static const unsigned int simple_nprimes = sizeof (simple_primes) / sizeof (simple_primes[0]);
-+
-+unsigned int simple_spaced_primes_closest (unsigned int num)
-+{
-+ int i;
-+
-+ for (i = 0; i < simple_nprimes; i++)
-+ if (simple_primes[i] > num)
-+ return simple_primes[i];
-+
-+ return simple_primes[simple_nprimes - 1];
-+}
-+
-+#define HASH_TABLE_RESIZE(hash_table) \
-+ do { \
-+ if ((hash_table->size >= 3 * hash_table->nnodes && \
-+ hash_table->size > HASH_TABLE_MIN_SIZE) || \
-+ (3 * hash_table->size <= hash_table->nnodes && \
-+ hash_table->size < HASH_TABLE_MAX_SIZE)) \
-+ simple_hash_table_resize (hash_table); \
-+ } while(0)
-+
-+static void simple_hash_table_resize (SimpleHashTable *hash_table);
-+static SimpleHashNode** simple_hash_table_lookup_node (SimpleHashTable *hash_table,
-+ int key);
-+static SimpleHashNode* simple_hash_node_new (int key,
-+ void* value);
-+static void simple_hash_nodes_destroy (SimpleHashNode *hash_node,
-+ SimpleDestroyNotify value_destroy_func);
-+
-+
-+#define alloc0(type, n) (type*)calloc(n, sizeof(type))
-+
-+SimpleHashTable*
-+simple_hash_table_new (SimpleDestroyNotify value_destroy_func)
-+{
-+ SimpleHashTable *hash_table;
-+
-+ hash_table = alloc0(SimpleHashTable, 1);
-+ hash_table->size = HASH_TABLE_MIN_SIZE;
-+ hash_table->nnodes = 0;
-+ hash_table->value_destroy_func = value_destroy_func;
-+ hash_table->nodes = alloc0 (SimpleHashNode*, hash_table->size);
-+
-+ return hash_table;
-+}
-+
-+SimpleHashTable* simple_hash_table_clone(SimpleHashTable *hash_table,
-+ SimpleCloneValue clone_value_func)
-+{
-+ SimpleHashTable *hash_table_new;
-+ SimpleHashNode *new_node;
-+ SimpleHashNode *node;
-+ int i;
-+
-+ hash_table_new = alloc0 (SimpleHashTable, 1);
-+ hash_table_new->size = hash_table->size;
-+ hash_table_new->nnodes = hash_table->nnodes;
-+ hash_table_new->value_destroy_func = hash_table->value_destroy_func;
-+ hash_table_new->nodes = alloc0 (SimpleHashNode*, hash_table_new->size);
-+ for (i = 0; i < hash_table->size; i++)
-+ {
-+ node = hash_table->nodes[i];
-+ while(node)
-+ {
-+ SimpleHashNode *next = hash_table_new->nodes[i];
-+ new_node = simple_hash_node_new(node->key,
-+ (clone_value_func)? clone_value_func(node->value) : node->value);
-+ new_node->next = next;
-+ hash_table_new->nodes[i] = new_node;
-+ node = node->next;
-+ }
-+ }
-+ return hash_table_new;
-+}
-+
-+void
-+simple_hash_table_destroy (SimpleHashTable *hash_table)
-+{
-+ int i;
-+
-+ for (i = 0; i < hash_table->size; i++)
-+ {
-+ simple_hash_nodes_destroy (hash_table->nodes[i],
-+ hash_table->value_destroy_func);
-+ hash_table->nodes[i] = NULL;
-+ }
-+ free (hash_table->nodes);
-+ free (hash_table);
-+}
-+
-+static inline SimpleHashNode**
-+simple_hash_table_lookup_node (SimpleHashTable *hash_table,
-+ int key)
-+{
-+ SimpleHashNode **node;
-+
-+ node = &hash_table->nodes[(unsigned int)key % hash_table->size];
-+ while (*node && (*node)->key != key)
-+ node = &(*node)->next;
-+
-+ return node;
-+}
-+
-+void*
-+simple_hash_table_lookup (SimpleHashTable *hash_table, int key)
-+{
-+ SimpleHashNode *node;
-+
-+ node = *simple_hash_table_lookup_node (hash_table, key);
-+
-+ return node ? node->value : NULL;
-+}
-+
-+void**
-+simple_hash_table_lookup_pointer (SimpleHashTable *hash_table, int key)
-+{
-+ SimpleHashNode *node;
-+