summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorJeff Dike <jdike@addtoit.com>2010-05-20 13:02:39 -0400
committerJoshua Lock <josh@linux.intel.com>2010-05-26 14:14:48 +0100
commita49e605a52a3bd6b688a16104fa9b5d17e06bcd5 (patch)
treec5c36a93775d59b3675ee9d671f00300959fcd72 /meta
parenteb69ecdfcc23cad8a40c3d57bc8e989e6e0666d0 (diff)
downloadpoky-a49e605a52a3bd6b688a16104fa9b5d17e06bcd5.tar.gz
qemu: Updated to 0.12.0
Updated the metadata in the recipe, changed the git revision in poky-default-revisions.inc, and pulled the qemu patches forward.
Diffstat (limited to 'meta')
-rw-r--r--meta/conf/distro/include/poky-default-revisions.inc2
-rw-r--r--meta/packages/qemu/qemu-git/2ca2078e287174522e3a6229618947d3d285b8c0.patch130
-rw-r--r--meta/packages/qemu/qemu-git/fix-dirent.patch6
-rw-r--r--meta/packages/qemu/qemu-git/fix-nogl.patch31
-rw-r--r--meta/packages/qemu/qemu-git/no-strip.patch30
-rw-r--r--meta/packages/qemu/qemu-git/qemu-git-qemugl-host.patch561
-rw-r--r--meta/packages/qemu/qemu-git/qemugl-allow-glxcontext-release.patch12
-rw-r--r--meta/packages/qemu/qemu-git/workaround_bad_futex_headers.patch10
-rw-r--r--meta/packages/qemu/qemu-git/zlibsearch.patch13
-rw-r--r--meta/packages/qemu/qemu_git.bb10
10 files changed, 291 insertions, 514 deletions
diff --git a/meta/conf/distro/include/poky-default-revisions.inc b/meta/conf/distro/include/poky-default-revisions.inc
index 7a3fc8bcc7..a30208fc7e 100644
--- a/meta/conf/distro/include/poky-default-revisions.inc
+++ b/meta/conf/distro/include/poky-default-revisions.inc
@@ -105,7 +105,7 @@ SRCREV_pn-pkgconfig ??= "66d49f1375fec838bcd301bb4ca2ef76cee0e47c"
105SRCREV_pn-psplash ??= "422" 105SRCREV_pn-psplash ??= "422"
106SRCREV_pn-pseudo ??= "086e65c90420b3d38f30c3cd81a0f8573f6f69cf" 106SRCREV_pn-pseudo ??= "086e65c90420b3d38f30c3cd81a0f8573f6f69cf"
107SRCREV_pn-pseudo-native ??= "086e65c90420b3d38f30c3cd81a0f8573f6f69cf" 107SRCREV_pn-pseudo-native ??= "086e65c90420b3d38f30c3cd81a0f8573f6f69cf"
108QEMUSRCREV ??= "9eab386edbf8cf002a731f8204a156f243a47a57" 108QEMUSRCREV ??= "72bb3c7571226af13cfe9eec020a56add3d30a70"
109SRCREV_pn-qemu-native ??= "${QEMUSRCREV}" 109SRCREV_pn-qemu-native ??= "${QEMUSRCREV}"
110SRCREV_pn-qemu-nativesdk ??= "${QEMUSRCREV}" 110SRCREV_pn-qemu-nativesdk ??= "${QEMUSRCREV}"
111SRCREV_pn-qemu ??= "${QEMUSRCREV}" 111SRCREV_pn-qemu ??= "${QEMUSRCREV}"
diff --git a/meta/packages/qemu/qemu-git/2ca2078e287174522e3a6229618947d3d285b8c0.patch b/meta/packages/qemu/qemu-git/2ca2078e287174522e3a6229618947d3d285b8c0.patch
deleted file mode 100644
index e2ebf67922..0000000000
--- a/meta/packages/qemu/qemu-git/2ca2078e287174522e3a6229618947d3d285b8c0.patch
+++ /dev/null
@@ -1,130 +0,0 @@
1From 2ca2078e287174522e3a6229618947d3d285b8c0 Mon Sep 17 00:00:00 2001
2From: François Revol <revol@free.fr>
3Date: Tue, 25 Aug 2009 09:14:10 +0000
4Subject: Fixed wacom emulation
5
6- for absolute mode, scale coordinates to the real device maximum values,
7since some drivers (on Haiku and Linux at least) need them as such,
8and the HID descriptor is boggus on some models anyway,
9- keep the coordinates even when no button is pressed, on real tablet
10the pen is sensed on the surface even without direct contact,
11and drivers expect this,
12- map left button to pressure according to what the Haiku driver wants,
13- map the right button to the pen button,
14- map the middle button to the eraser,
15- use asynchronous reporting as the hid code does, stops the Haiku driver
16(and probably others) from spending 50% cpu polling for changes.
17
18Signed-off-by: François Revol <revol@free.fr>
19Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
20---
21Index: git/hw/usb-wacom.c
22===================================================================
23--- git.orig/hw/usb-wacom.c 2009-11-24 14:10:15.000000000 +0000
24+++ git/hw/usb-wacom.c 2009-11-24 16:39:26.000000000 +0000
25@@ -50,6 +50,8 @@
26 WACOM_MODE_HID = 1,
27 WACOM_MODE_WACOM = 2,
28 } mode;
29+ uint8_t idle;
30+ int changed;
31 } USBWacomState;
32
33 static const uint8_t qemu_wacom_dev_descriptor[] = {
34@@ -125,6 +127,7 @@
35 s->dy += dy1;
36 s->dz += dz1;
37 s->buttons_state = buttons_state;
38+ s->changed = 1;
39 }
40
41 static void usb_wacom_event(void *opaque,
42@@ -132,10 +135,12 @@
43 {
44 USBWacomState *s = opaque;
45
46- s->x = x;
47- s->y = y;
48+ /* scale to Penpartner resolution */
49+ s->x = (x * 5040 / 0x7FFF);
50+ s->y = (y * 3780 / 0x7FFF);
51 s->dz += dz;
52 s->buttons_state = buttons_state;
53+ s->changed = 1;
54 }
55
56 static inline int int_clamp(int val, int vmin, int vmax)
57@@ -199,26 +204,22 @@
58 if (s->buttons_state & MOUSE_EVENT_LBUTTON)
59 b |= 0x01;
60 if (s->buttons_state & MOUSE_EVENT_RBUTTON)
61- b |= 0x02;
62+ b |= 0x40;
63 if (s->buttons_state & MOUSE_EVENT_MBUTTON)
64- b |= 0x04;
65+ b |= 0x20; /* eraser */
66
67 if (len < 7)
68 return 0;
69
70 buf[0] = s->mode;
71- buf[5] = 0x00;
72- if (b) {
73- buf[1] = s->x & 0xff;
74- buf[2] = s->x >> 8;
75- buf[3] = s->y & 0xff;
76- buf[4] = s->y >> 8;
77+ buf[5] = 0x00 | (b & 0xf0);
78+ buf[1] = s->x & 0xff;
79+ buf[2] = s->x >> 8;
80+ buf[3] = s->y & 0xff;
81+ buf[4] = s->y >> 8;
82+ if (b & 0x3f) {
83 buf[6] = 0;
84 } else {
85- buf[1] = 0;
86- buf[2] = 0;
87- buf[3] = 0;
88- buf[4] = 0;
89 buf[6] = (unsigned char) -127;
90 }
91
92@@ -350,7 +351,12 @@
93 else if (s->mode == WACOM_MODE_WACOM)
94 ret = usb_wacom_poll(s, data, length);
95 break;
96+ case HID_GET_IDLE:
97+ ret = 1;
98+ data[0] = s->idle;
99+ break;
100 case HID_SET_IDLE:
101+ s->idle = (uint8_t) (value >> 8);
102 ret = 0;
103 break;
104 default:
105@@ -369,6 +375,9 @@
106 switch (p->pid) {
107 case USB_TOKEN_IN:
108 if (p->devep == 1) {
109+ if (!(s->changed || s->idle))
110+ return USB_RET_NAK;
111+ s->changed = 0;
112 if (s->mode == WACOM_MODE_HID)
113 ret = usb_mouse_poll(s, p->data, p->len);
114 else if (s->mode == WACOM_MODE_WACOM)
115@@ -399,7 +408,6 @@
116 s = qemu_mallocz(sizeof(USBWacomState));
117 s->dev.speed = USB_SPEED_FULL;
118 s->dev.handle_packet = usb_generic_handle_packet;
119-
120 s->dev.handle_reset = usb_wacom_handle_reset;
121 s->dev.handle_control = usb_wacom_handle_control;
122 s->dev.handle_data = usb_wacom_handle_data;
123@@ -407,6 +415,7 @@
124
125 pstrcpy(s->dev.devname, sizeof(s->dev.devname),
126 "QEMU PenPartner Tablet");
127+ s->changed = 1;
128
129 return (USBDevice *) s;
130 }
diff --git a/meta/packages/qemu/qemu-git/fix-dirent.patch b/meta/packages/qemu/qemu-git/fix-dirent.patch
index 575dbfa0c9..8bbfa0e88e 100644
--- a/meta/packages/qemu/qemu-git/fix-dirent.patch
+++ b/meta/packages/qemu/qemu-git/fix-dirent.patch
@@ -1,7 +1,7 @@
1Index: trunk/linux-user/syscall.c 1Index: qemu/linux-user/syscall.c
2=================================================================== 2===================================================================
3--- trunk.orig/linux-user/syscall.c 2009-01-05 12:51:52.000000000 +0000 3--- qemu.orig/linux-user/syscall.c 2010-05-11 13:16:22.421783949 -0400
4+++ trunk/linux-user/syscall.c 2009-01-05 12:51:52.000000000 +0000 4+++ qemu/linux-user/syscall.c 2010-05-11 13:16:31.759805849 -0400
5@@ -26,6 +26,7 @@ 5@@ -26,6 +26,7 @@
6 #include <errno.h> 6 #include <errno.h>
7 #include <unistd.h> 7 #include <unistd.h>
diff --git a/meta/packages/qemu/qemu-git/fix-nogl.patch b/meta/packages/qemu/qemu-git/fix-nogl.patch
index 6cb812f00c..68efab3a1f 100644
--- a/meta/packages/qemu/qemu-git/fix-nogl.patch
+++ b/meta/packages/qemu/qemu-git/fix-nogl.patch
@@ -1,20 +1,21 @@
1Index: git/Makefile.target 1Index: qemu/Makefile.target
2=================================================================== 2===================================================================
3--- git.orig/Makefile.target 2009-06-09 22:05:27.000000000 +0100 3--- qemu.orig/Makefile.target 2010-05-11 16:53:34.545811866 -0400
4+++ git/Makefile.target 2009-06-09 22:05:28.000000000 +0100 4+++ qemu/Makefile.target 2010-05-11 16:53:37.743809704 -0400
5@@ -155,6 +155,8 @@ 5@@ -47,6 +47,9 @@ libobj-$(CONFIG_NOSOFTFLOAT) += fpu/soft
6 libobj-y += op_helper.o helper.o
7 libobj-$(CONFIG_NEED_MMU) += mmu.o
8 libobj-$(TARGET_I386) += helper_opengl.o opengl_exec.o
9+libobj-$(TARGET_X86_64) += helper_opengl.o opengl_exec.o
10+libobj-$(TARGET_ARM) += dummygl.o
11+libobj-$(TARGET_MIPS) += dummygl.o
12 libobj-$(TARGET_ARM) += neon_helper.o iwmmxt_helper.o
13 libobj-$(TARGET_ALPHA) += alpha_palcode.o
6 14
7 ifeq ($(TARGET_BASE_ARCH), i386) 15Index: qemu/target-arm/dummygl.c
8 LIBOBJS+=helper_opengl.o opengl_exec.o
9+else
10+LIBOBJS+=dummygl.o
11 endif
12
13 ifeq ($(TARGET_BASE_ARCH), arm)
14Index: git/target-arm/dummygl.c
15=================================================================== 16===================================================================
16--- /dev/null 1970-01-01 00:00:00.000000000 +0000 17--- /dev/null 1970-01-01 00:00:00.000000000 +0000
17+++ git/target-arm/dummygl.c 2009-06-09 22:15:55.000000000 +0100 18+++ qemu/target-arm/dummygl.c 2010-05-11 16:53:37.743809704 -0400
18@@ -0,0 +1,22 @@ 19@@ -0,0 +1,22 @@
19+#include <string.h> 20+#include <string.h>
20+#include <stdlib.h> 21+#include <stdlib.h>
@@ -38,10 +39,10 @@ Index: git/target-arm/dummygl.c
38+{ 39+{
39+ 40+
40+} 41+}
41Index: git/target-mips/dummygl.c 42Index: qemu/target-mips/dummygl.c
42=================================================================== 43===================================================================
43--- /dev/null 1970-01-01 00:00:00.000000000 +0000 44--- /dev/null 1970-01-01 00:00:00.000000000 +0000
44+++ git/target-mips/dummygl.c 2009-06-09 22:15:55.000000000 +0100 45+++ qemu/target-mips/dummygl.c 2010-05-11 16:53:37.744811919 -0400
45@@ -0,0 +1,22 @@ 46@@ -0,0 +1,22 @@
46+#include <string.h> 47+#include <string.h>
47+#include <stdlib.h> 48+#include <stdlib.h>
diff --git a/meta/packages/qemu/qemu-git/no-strip.patch b/meta/packages/qemu/qemu-git/no-strip.patch
index fc69b37e16..8a95a688b3 100644
--- a/meta/packages/qemu/qemu-git/no-strip.patch
+++ b/meta/packages/qemu/qemu-git/no-strip.patch
@@ -1,22 +1,26 @@
1--- qemu.orig/Makefile 2008-01-29 23:16:27.000000000 -0800 1Index: qemu/Makefile
2+++ qemu-0.9.1/Makefile 2008-01-29 23:16:38.000000000 -0800 2===================================================================
3@@ -174,7 +174,7 @@ 3--- qemu.orig/Makefile 2010-05-11 17:17:06.416912704 -0400
4+++ qemu/Makefile 2010-05-11 17:17:17.051812402 -0400
5@@ -300,7 +300,7 @@ endif
4 install: all $(if $(BUILD_DOCS),install-doc) 6 install: all $(if $(BUILD_DOCS),install-doc)
5 mkdir -p "$(DESTDIR)$(bindir)" 7 $(INSTALL_DIR) "$(DESTDIR)$(bindir)"
6 ifneq ($(TOOLS),) 8 ifneq ($(TOOLS),)
7- $(INSTALL) -m 755 -s $(TOOLS) "$(DESTDIR)$(bindir)" 9- $(INSTALL_PROG) $(STRIP_OPT) $(TOOLS) "$(DESTDIR)$(bindir)"
8+ $(INSTALL) -m 755 $(TOOLS) "$(DESTDIR)$(bindir)" 10+ $(INSTALL_PROG) $(TOOLS) "$(DESTDIR)$(bindir)"
9 endif 11 endif
10 mkdir -p "$(DESTDIR)$(datadir)" 12 ifneq ($(BLOBS),)
11 for x in bios.bin vgabios.bin vgabios-cirrus.bin ppc_rom.bin \ 13 $(INSTALL_DIR) "$(DESTDIR)$(datadir)"
12--- qemu.orig/Makefile.target 2008-01-29 23:16:27.000000000 -0800 14Index: qemu/Makefile.target
13+++ qemu-0.9.1/Makefile.target 2008-01-29 23:17:33.000000000 -0800 15===================================================================
14@@ -632,7 +632,7 @@ 16--- qemu.orig/Makefile.target 2010-05-11 17:17:12.188784092 -0400
17+++ qemu/Makefile.target 2010-05-11 17:17:17.052808122 -0400
18@@ -351,7 +351,7 @@ clean:
15 19
16 install: all 20 install: all
17 ifneq ($(PROGS),) 21 ifneq ($(PROGS),)
18- $(INSTALL) -m 755 -s $(PROGS) "$(DESTDIR)$(bindir)" 22- $(INSTALL) -m 755 $(STRIP_OPT) $(PROGS) "$(DESTDIR)$(bindir)"
19+ $(INSTALL) -m 755 $(PROGS) "$(DESTDIR)$(bindir)" 23+ $(INSTALL) -m 755 $(PROGS) "$(DESTDIR)$(bindir)"
20 endif 24 endif
21 25
22 ifneq ($(wildcard .depend),) 26 # Include automatically generated dependency files
diff --git a/meta/packages/qemu/qemu-git/qemu-git-qemugl-host.patch b/meta/packages/qemu/qemu-git/qemu-git-qemugl-host.patch
index 00d9ca7cc2..7ec491daed 100644
--- a/meta/packages/qemu/qemu-git/qemu-git-qemugl-host.patch
+++ b/meta/packages/qemu/qemu-git/qemu-git-qemugl-host.patch
@@ -1,21 +1,18 @@
1Index: git/Makefile.target 1Index: qemu/Makefile.target
2=================================================================== 2===================================================================
3--- git.orig/Makefile.target 2009-12-02 13:13:56.000000000 +0000 3--- qemu.orig/Makefile.target 2010-05-11 18:05:22.955784896 -0400
4+++ git/Makefile.target 2010-01-14 16:34:58.000000000 +0000 4+++ qemu/Makefile.target 2010-05-14 13:34:07.721301429 -0400
5@@ -153,6 +153,10 @@ 5@@ -46,6 +46,7 @@ libobj-$(CONFIG_SOFTFLOAT) += fpu/softfl
6 CPPFLAGS+=-I$(SRC_PATH)/fpu 6 libobj-$(CONFIG_NOSOFTFLOAT) += fpu/softfloat-native.o
7 LIBOBJS+= op_helper.o helper.o 7 libobj-y += op_helper.o helper.o
8 libobj-$(CONFIG_NEED_MMU) += mmu.o
9+libobj-$(TARGET_I386) += helper_opengl.o opengl_exec.o
10 libobj-$(TARGET_ARM) += neon_helper.o iwmmxt_helper.o
11 libobj-$(TARGET_ALPHA) += alpha_palcode.o
8 12
9+ifeq ($(TARGET_BASE_ARCH), i386) 13@@ -82,6 +83,21 @@ op_helper.o cpu-exec.o: QEMU_CFLAGS += $
10+LIBOBJS+=helper_opengl.o opengl_exec.o 14 # cpu_signal_handler() in cpu-exec.c.
11+endif 15 signal.o: QEMU_CFLAGS += $(HELPER_CFLAGS)
12+
13 ifeq ($(TARGET_BASE_ARCH), arm)
14 LIBOBJS+= neon_helper.o iwmmxt_helper.o
15 endif
16@@ -224,6 +228,21 @@
17
18 cpu-exec.o: CFLAGS += $(HELPER_CFLAGS)
19 16
20+parse_gl_h: parse_gl_h.c 17+parse_gl_h: parse_gl_h.c
21+ $(HOST_CC) -g -o $@ $< 18+ $(HOST_CC) -g -o $@ $<
@@ -35,29 +32,31 @@ Index: git/Makefile.target
35 ######################################################### 32 #########################################################
36 # Linux user emulator target 33 # Linux user emulator target
37 34
38@@ -584,7 +603,7 @@ 35@@ -196,6 +212,10 @@ obj-i386-y += usb-uhci.o vmmouse.o vmpor
39 OBJS+= cirrus_vga.o apic.o parallel.o acpi.o piix_pci.o 36 obj-i386-y += device-hotplug.o pci-hotplug.o smbios.o wdt_ib700.o
40 OBJS+= usb-uhci.o vmmouse.o vmport.o vmware_vga.o hpet.o 37 obj-i386-y += ne2000-isa.o
41 OBJS += device-hotplug.o pci-hotplug.o 38
42-CPPFLAGS += -DHAS_AUDIO -DHAS_AUDIO_CHOICE 39+ifeq ($(TARGET_BASE_ARCH), i386)
43+CPPFLAGS += -DHAS_AUDIO -DHAS_AUDIO_CHOICE -DTARGET_OPENGL_OK 40+QEMU_CFLAGS += -DTARGET_OPENGL_OK
44 endif 41+endif
45 ifeq ($(TARGET_BASE_ARCH), ppc) 42+
46 CPPFLAGS += -DHAS_AUDIO -DHAS_AUDIO_CHOICE 43 # shared objects
47@@ -727,7 +746,7 @@ 44 obj-ppc-y = ppc.o ide/core.o ide/qdev.o ide/isa.o ide/pci.o ide/macio.o
48 $(QEMU_PROG): LIBS += $(SDL_LIBS) $(COCOA_LIBS) $(CURSES_LIBS) $(BRLAPI_LIBS) $(VDE_LIBS) 45 obj-ppc-y += ide/cmd646.o
46@@ -303,6 +323,8 @@ vl.o: qemu-options.h
49 47
50 $(QEMU_PROG): $(OBJS) ../libqemu_common.a libqemu.a 48 monitor.o: qemu-monitor.h
51- $(LINK)
52+ $(LINK) -lGL -lGLU
53 49
54 endif # !CONFIG_USER_ONLY 50+LIBS += -lGL -lGLU
51+
52 ARLIBS=../libqemu_common.a libqemu.a $(HWLIB)
55 53
56Index: git/hw/pixel_ops.h 54 endif # CONFIG_SOFTMMU
55Index: qemu/hw/pixel_ops.h
57=================================================================== 56===================================================================
58--- git.orig/hw/pixel_ops.h 2009-12-02 13:13:56.000000000 +0000 57--- qemu.orig/hw/pixel_ops.h 2010-05-11 18:05:22.959804376 -0400
59+++ git/hw/pixel_ops.h 2010-01-14 15:55:40.000000000 +0000 58+++ qemu/hw/pixel_ops.h 2010-05-12 12:10:40.092908994 -0400
60@@ -4,6 +4,12 @@ 59@@ -4,6 +4,12 @@ static inline unsigned int rgb_to_pixel8
61 return ((r >> 5) << 5) | ((g >> 5) << 2) | (b >> 6); 60 return ((r >> 5) << 5) | ((g >> 5) << 2) | (b >> 6);
62 } 61 }
63 62
@@ -70,11 +69,11 @@ Index: git/hw/pixel_ops.h
70 static inline unsigned int rgb_to_pixel15(unsigned int r, unsigned int g, 69 static inline unsigned int rgb_to_pixel15(unsigned int r, unsigned int g,
71 unsigned int b) 70 unsigned int b)
72 { 71 {
73Index: git/hw/vmware_vga.c 72Index: qemu/hw/vmware_vga.c
74=================================================================== 73===================================================================
75--- git.orig/hw/vmware_vga.c 2009-12-02 13:13:56.000000000 +0000 74--- qemu.orig/hw/vmware_vga.c 2010-05-11 18:05:22.959804376 -0400
76+++ git/hw/vmware_vga.c 2010-01-14 15:55:40.000000000 +0000 75+++ qemu/hw/vmware_vga.c 2010-05-12 12:10:40.124785891 -0400
77@@ -484,6 +484,8 @@ 76@@ -489,6 +489,8 @@ static inline void vmsvga_cursor_define(
78 77
79 #define CMD(f) le32_to_cpu(s->cmd->f) 78 #define CMD(f) le32_to_cpu(s->cmd->f)
80 79
@@ -83,7 +82,7 @@ Index: git/hw/vmware_vga.c
83 static inline int vmsvga_fifo_empty(struct vmsvga_state_s *s) 82 static inline int vmsvga_fifo_empty(struct vmsvga_state_s *s)
84 { 83 {
85 if (!s->config || !s->enable) 84 if (!s->config || !s->enable)
86@@ -493,11 +495,18 @@ 85@@ -498,11 +500,18 @@ static inline int vmsvga_fifo_empty(stru
87 86
88 static inline uint32_t vmsvga_fifo_read_raw(struct vmsvga_state_s *s) 87 static inline uint32_t vmsvga_fifo_read_raw(struct vmsvga_state_s *s)
89 { 88 {
@@ -106,7 +105,7 @@ Index: git/hw/vmware_vga.c
106 } 105 }
107 106
108 static inline uint32_t vmsvga_fifo_read(struct vmsvga_state_s *s) 107 static inline uint32_t vmsvga_fifo_read(struct vmsvga_state_s *s)
109@@ -507,12 +516,12 @@ 108@@ -512,12 +521,12 @@ static inline uint32_t vmsvga_fifo_read(
110 109
111 static void vmsvga_fifo_run(struct vmsvga_state_s *s) 110 static void vmsvga_fifo_run(struct vmsvga_state_s *s)
112 { 111 {
@@ -121,7 +120,7 @@ Index: git/hw/vmware_vga.c
121 case SVGA_CMD_UPDATE: 120 case SVGA_CMD_UPDATE:
122 case SVGA_CMD_UPDATE_VERBOSE: 121 case SVGA_CMD_UPDATE_VERBOSE:
123 x = vmsvga_fifo_read(s); 122 x = vmsvga_fifo_read(s);
124@@ -612,7 +621,7 @@ 123@@ -617,7 +626,7 @@ static void vmsvga_fifo_run(struct vmsvg
125 while (args --) 124 while (args --)
126 vmsvga_fifo_read(s); 125 vmsvga_fifo_read(s);
127 printf("%s: Unknown command 0x%02x in SVGA command FIFO\n", 126 printf("%s: Unknown command 0x%02x in SVGA command FIFO\n",
@@ -130,71 +129,24 @@ Index: git/hw/vmware_vga.c
130 break; 129 break;
131 } 130 }
132 131
133@@ -914,8 +923,9 @@ 132@@ -1136,6 +1145,12 @@ static void vmsvga_init(struct vmsvga_st
134 s->width = -1;
135 s->height = -1;
136 s->svgaid = SVGA_ID;
137- s->depth = 24;
138+ s->depth = 32;
139 s->bypp = (s->depth + 7) >> 3;
140+ s->bypp = 4; /* XXX: until we can get host's actual depth */
141 s->cursor.on = 0;
142 s->redraw_fifo_first = 0;
143 s->redraw_fifo_last = 0;
144@@ -1140,6 +1150,12 @@
145 /* XXX: use optimized standard vga accesses */
146 cpu_register_physical_memory(VBE_DISPI_LFB_PHYSICAL_ADDRESS,
147 vga_ram_size, vga_ram_offset);
148+
149+#ifdef EMBED_STDVGA
150+ s->map_addr = VBE_DISPI_LFB_PHYSICAL_ADDRESS;
151+ s->map_end = VBE_DISPI_LFB_PHYSICAL_ADDRESS + vga_ram_size;
152+ vga_dirty_log_start((VGAState *) s);
153+#endif
154 #endif
155 }
156 133
157Index: git/kqemu.c 134 vga_init_vbe(&s->vga);
158===================================================================
159--- git.orig/kqemu.c 2009-12-02 13:13:56.000000000 +0000
160+++ git/kqemu.c 2010-01-14 15:55:40.000000000 +0000
161@@ -93,6 +93,8 @@
162 int qpi_io_memory;
163 uint32_t kqemu_comm_base; /* physical address of the QPI communication page */
164 135
165+extern int enable_gl; 136+#ifdef EMBED_STDVGA
137+ s->vga.map_addr = VBE_DISPI_LFB_PHYSICAL_ADDRESS;
138+ s->vga.map_end = VBE_DISPI_LFB_PHYSICAL_ADDRESS + vga_ram_size;
139+ vga_dirty_log_start(s);
140+#endif
166+ 141+
167 #define cpuid(index, eax, ebx, ecx, edx) \ 142 rom_add_vga(VGABIOS_FILENAME);
168 asm volatile ("cpuid" \
169 : "=a" (eax), "=b" (ebx), "=c" (ecx), "=d" (edx) \
170@@ -860,6 +862,22 @@
171 else
172 env->hflags &= ~HF_OSFXSR_MASK;
173 143
174+ /* OPENGL Stuff */ 144 vmsvga_reset(s);
175+ if (enable_gl && ((env->hflags & HF_CPL_MASK) == 3)) { 145Index: qemu/qemu-char.c
176+ int index = (env->eip >> TARGET_PAGE_BITS) & (CPU_TLB_SIZE - 1);
177+ if (env->segs[R_CS].base != 0)
178+ fprintf(stderr, "env->segs[R_CS].base != 0 !\n");
179+ else if (__builtin_expect(env->tlb_table[1][index].addr_code !=
180+ (env->eip & TARGET_PAGE_MASK), 0))
181+ ldub_code(env->eip);
182+
183+ if (env->tlb_table[1][index].addend) {
184+ unsigned char *ptr = env->eip + env->tlb_table[1][index].addend;
185+ if (ptr[0] == 0xcd && ptr[1] == 0x99)
186+ helper_opengl();
187+ }
188+ }
189+
190 LOG_INT("kqemu: kqemu_cpu_exec: ret=0x%x\n", ret);
191 if (ret == KQEMU_RET_SYSCALL) {
192 /* syscall instruction */
193Index: git/qemu-char.c
194=================================================================== 146===================================================================
195--- git.orig/qemu-char.c 2009-12-02 13:13:56.000000000 +0000 147--- qemu.orig/qemu-char.c 2010-05-11 18:05:22.955784896 -0400
196+++ git/qemu-char.c 2010-01-14 15:55:40.000000000 +0000 148+++ qemu/qemu-char.c 2010-05-12 17:20:54.280909040 -0400
197@@ -2112,6 +2112,69 @@ 149@@ -2232,6 +2232,69 @@ static CharDriverState *qemu_chr_open_so
198 return NULL; 150 return NULL;
199 } 151 }
200 152
@@ -253,7 +205,7 @@ Index: git/qemu-char.c
253+ chr->opaque = chr; 205+ chr->opaque = chr;
254+ chr->chr_write = opengl_chr_write; 206+ chr->chr_write = opengl_chr_write;
255+ 207+
256+ qemu_chr_reset(chr); 208+ qemu_chr_generic_open(chr);
257+ 209+
258+ return chr; 210+ return chr;
259+} 211+}
@@ -261,57 +213,66 @@ Index: git/qemu-char.c
261+#define qemu_chr_open_opengl() 0 213+#define qemu_chr_open_opengl() 0
262+#endif 214+#endif
263+ 215+
264 CharDriverState *qemu_chr_open(const char *label, const char *filename, void (*init)(struct CharDriverState *s)) 216 QemuOpts *qemu_chr_parse_compat(const char *label, const char *filename)
265 { 217 {
266 const char *p; 218 char host[65], port[33], width[8], height[8];
267@@ -2192,6 +2255,9 @@ 219@@ -2352,6 +2415,10 @@ QemuOpts *qemu_chr_parse_compat(const ch
268 chr = chr_baum_init(); 220 qemu_opt_set(opts, "path", filename);
269 } else 221 return opts;
270 #endif
271+ if (!strcmp(filename, "opengl")) {
272+ chr = qemu_chr_open_opengl();
273+ } else
274 {
275 chr = NULL;
276 } 222 }
277Index: git/sdl.c 223+ if (!strcmp(filename, "opengl")){
224+ qemu_opt_set(opts, "backend", "opengl");
225+ return opts;
226+ }
227
228 fail:
229 fprintf(stderr, "%s: fail on \"%s\"\n", __FUNCTION__, filename);
230@@ -2368,6 +2435,7 @@ static const struct {
231 { .name = "udp", .open = qemu_chr_open_udp },
232 { .name = "msmouse", .open = qemu_chr_open_msmouse },
233 { .name = "vc", .open = text_console_init },
234+ { .name = "opengl", .open = qemu_chr_open_opengl },
235 #ifdef _WIN32
236 { .name = "file", .open = qemu_chr_open_win_file_out },
237 { .name = "pipe", .open = qemu_chr_open_win_pipe },
238Index: qemu/sdl.c
278=================================================================== 239===================================================================
279--- git.orig/sdl.c 2009-12-02 13:13:56.000000000 +0000 240--- qemu.orig/sdl.c 2010-05-11 18:05:22.959804376 -0400
280+++ git/sdl.c 2010-01-14 15:55:40.000000000 +0000 241+++ qemu/sdl.c 2010-05-12 12:10:40.128783931 -0400
281@@ -54,6 +54,8 @@ 242@@ -58,6 +58,8 @@ static uint8_t allocator;
282 static int guest_x, guest_y; 243 static SDL_PixelFormat host_format;
283 static SDL_Cursor *guest_sprite = 0; 244 static int scaling_active = 0;
284 245
285+extern void opengl_exec_set_parent_window(Display* _dpy, Window _parent_window); 246+extern void opengl_exec_set_parent_window(Display* _dpy, Window _parent_window);
286+ 247+
287 static void sdl_update(DisplayState *ds, int x, int y, int w, int h) 248 static void sdl_update(DisplayState *ds, int x, int y, int w, int h)
288 { 249 {
289 SDL_Rect rec; 250 // printf("updating x=%d y=%d w=%d h=%d\n", x, y, w, h);
290@@ -85,7 +87,9 @@ 251@@ -119,12 +121,22 @@ static void do_sdl_resize(int new_width,
291 252
292 static void sdl_resize(DisplayState *ds) 253 static void sdl_resize(DisplayState *ds)
293 { 254 {
255- if (!allocator) {
294+ SDL_SysWMinfo info; 256+ SDL_SysWMinfo info;
295 int flags;
296+ static Display *dpy; 257+ static Display *dpy;
297
298 // printf("resizing to %d %d\n", w, h);
299
300@@ -104,6 +108,13 @@
301 }
302
303 sdl_setdata(ds);
304+ 258+
305+ SDL_GetWMInfo(&info); 259+ if (!allocator) {
306+ if (info.subsystem == SDL_SYSWM_X11 && info.info.x11.display && 260 if (!scaling_active)
307+ (!dpy || dpy == info.info.x11.display)) { 261 do_sdl_resize(ds_get_width(ds), ds_get_height(ds), 0);
308+ dpy = info.info.x11.display; 262 else if (real_screen->format->BitsPerPixel != ds_get_bits_per_pixel(ds))
309+ opengl_exec_set_parent_window(dpy, info.info.x11.window); 263 do_sdl_resize(real_screen->w, real_screen->h, ds_get_bits_per_pixel(ds));
310+ } 264 sdl_setdata(ds);
311 } 265+
312 266+ SDL_GetWMInfo(&info);
313 /* generic keyboard conversion */ 267+ if (info.subsystem == SDL_SYSWM_X11 && info.info.x11.display &&
314@@ -323,7 +334,7 @@ 268+ (!dpy || dpy == info.info.x11.display)) {
269+ dpy = info.info.x11.display;
270+ opengl_exec_set_parent_window(dpy, info.info.x11.window);
271+ }
272 } else {
273 if (guest_screen != NULL) {
274 SDL_FreeSurface(guest_screen);
275@@ -453,7 +465,7 @@ static void sdl_show_cursor(void)
315 276
316 if (!kbd_mouse_is_absolute()) { 277 if (!kbd_mouse_is_absolute()) {
317 SDL_ShowCursor(1); 278 SDL_ShowCursor(1);
@@ -320,7 +281,7 @@ Index: git/sdl.c
320 (gui_grab || kbd_mouse_is_absolute() || absolute_enabled)) 281 (gui_grab || kbd_mouse_is_absolute() || absolute_enabled))
321 SDL_SetCursor(guest_sprite); 282 SDL_SetCursor(guest_sprite);
322 else 283 else
323@@ -334,7 +345,8 @@ 284@@ -464,7 +476,8 @@ static void sdl_show_cursor(void)
324 static void sdl_grab_start(void) 285 static void sdl_grab_start(void)
325 { 286 {
326 if (guest_cursor) { 287 if (guest_cursor) {
@@ -330,7 +291,7 @@ Index: git/sdl.c
330 if (!kbd_mouse_is_absolute() && !absolute_enabled) 291 if (!kbd_mouse_is_absolute() && !absolute_enabled)
331 SDL_WarpMouse(guest_x, guest_y); 292 SDL_WarpMouse(guest_x, guest_y);
332 } else 293 } else
333@@ -375,8 +387,8 @@ 294@@ -505,8 +518,8 @@ static void sdl_send_mouse_event(int dx,
334 absolute_enabled = 1; 295 absolute_enabled = 1;
335 } 296 }
336 297
@@ -341,7 +302,7 @@ Index: git/sdl.c
341 } else if (absolute_enabled) { 302 } else if (absolute_enabled) {
342 sdl_show_cursor(); 303 sdl_show_cursor();
343 absolute_enabled = 0; 304 absolute_enabled = 0;
344@@ -606,7 +618,8 @@ 305@@ -760,7 +773,8 @@ static void sdl_mouse_warp(int x, int y,
345 if (!guest_cursor) 306 if (!guest_cursor)
346 sdl_show_cursor(); 307 sdl_show_cursor();
347 if (gui_grab || kbd_mouse_is_absolute() || absolute_enabled) { 308 if (gui_grab || kbd_mouse_is_absolute() || absolute_enabled) {
@@ -351,18 +312,7 @@ Index: git/sdl.c
351 if (!kbd_mouse_is_absolute() && !absolute_enabled) 312 if (!kbd_mouse_is_absolute() && !absolute_enabled)
352 SDL_WarpMouse(x, y); 313 SDL_WarpMouse(x, y);
353 } 314 }
354@@ -631,6 +644,10 @@ 315@@ -814,7 +828,7 @@ static void sdl_mouse_define(int width,
355 line = image;
356 for (x = 0; x < width; x ++, dst ++) {
357 switch (bpp) {
358+ case 32:
359+ src = *(line ++); src |= *(line ++);
360+ src = *(line ++); src |= *(line ++);
361+ break;
362 case 24:
363 src = *(line ++); src |= *(line ++); src |= *(line ++);
364 break;
365@@ -657,7 +674,7 @@
366 } 316 }
367 guest_sprite = SDL_CreateCursor(sprite, mask, width, height, hot_x, hot_y); 317 guest_sprite = SDL_CreateCursor(sprite, mask, width, height, hot_x, hot_y);
368 318
@@ -371,17 +321,17 @@ Index: git/sdl.c
371 (gui_grab || kbd_mouse_is_absolute() || absolute_enabled)) 321 (gui_grab || kbd_mouse_is_absolute() || absolute_enabled))
372 SDL_SetCursor(guest_sprite); 322 SDL_SetCursor(guest_sprite);
373 } 323 }
374@@ -673,6 +690,7 @@ 324@@ -831,6 +845,7 @@ void sdl_display_init(DisplayState *ds,
375 {
376 int flags; 325 int flags;
377 uint8_t data = 0; 326 uint8_t data = 0;
327 DisplayAllocator *da;
378+ SDL_SysWMinfo info; 328+ SDL_SysWMinfo info;
329 const SDL_VideoInfo *vi;
379 330
380 #if defined(__APPLE__) 331 #if defined(__APPLE__)
381 /* always use generic keymaps */ 332@@ -855,6 +870,12 @@ void sdl_display_init(DisplayState *ds,
382@@ -694,6 +712,12 @@ 333 vi = SDL_GetVideoInfo();
383 exit(1); 334 host_format = *(vi->vfmt);
384 }
385 335
386+ SDL_GetWMInfo(&info); 336+ SDL_GetWMInfo(&info);
387+ if (info.subsystem == SDL_SYSWM_X11 && info.info.x11.display) 337+ if (info.subsystem == SDL_SYSWM_X11 && info.info.x11.display)
@@ -392,7 +342,7 @@ Index: git/sdl.c
392 dcl = qemu_mallocz(sizeof(DisplayChangeListener)); 342 dcl = qemu_mallocz(sizeof(DisplayChangeListener));
393 dcl->dpy_update = sdl_update; 343 dcl->dpy_update = sdl_update;
394 dcl->dpy_resize = sdl_resize; 344 dcl->dpy_resize = sdl_resize;
395@@ -717,4 +741,9 @@ 345@@ -890,4 +911,9 @@ void sdl_display_init(DisplayState *ds,
396 gui_fullscreen_initial_grab = 1; 346 gui_fullscreen_initial_grab = 1;
397 sdl_grab_start(); 347 sdl_grab_start();
398 } 348 }
@@ -402,31 +352,19 @@ Index: git/sdl.c
402+ opengl_exec_set_parent_window(info.info.x11.display, 352+ opengl_exec_set_parent_window(info.info.x11.display,
403+ info.info.x11.window); 353+ info.info.x11.window);
404 } 354 }
405Index: git/slirp/ctl.h 355Index: qemu/slirp/udp.c
406=================================================================== 356===================================================================
407--- git.orig/slirp/ctl.h 2009-12-02 13:13:56.000000000 +0000 357--- qemu.orig/slirp/udp.c 2010-05-11 18:05:22.955784896 -0400
408+++ git/slirp/ctl.h 2010-01-14 15:55:40.000000000 +0000 358+++ qemu/slirp/udp.c 2010-05-12 12:10:40.129784123 -0400
409@@ -2,6 +2,7 @@
410 #define CTL_EXEC 1
411 #define CTL_ALIAS 2
412 #define CTL_DNS 3
413+#define CTL_OPENGL 6
414
415 #define CTL_SPECIAL "10.0.2.0"
416 #define CTL_LOCAL "10.0.2.15"
417Index: git/slirp/udp.c
418===================================================================
419--- git.orig/slirp/udp.c 2009-12-02 13:13:56.000000000 +0000
420+++ git/slirp/udp.c 2010-01-14 15:55:40.000000000 +0000
421@@ -40,6 +40,7 @@ 359@@ -40,6 +40,7 @@
422 360
423 #include <slirp.h> 361 #include <slirp.h>
424 #include "ip_icmp.h" 362 #include "ip_icmp.h"
425+#include "bswap.h" 363+#include "bswap.h"
426 364
427 #ifdef LOG_ENABLED 365 static u_int8_t udp_tos(struct socket *so);
428 struct udpstat udpstat; 366
429@@ -153,6 +154,11 @@ 367@@ -125,6 +126,11 @@ udp_input(register struct mbuf *m, int i
430 goto bad; 368 goto bad;
431 } 369 }
432 370
@@ -435,25 +373,25 @@ Index: git/slirp/udp.c
435+ goto bad; 373+ goto bad;
436+ } 374+ }
437+ 375+
438 if (slirp_restrict) 376 if (slirp->restricted) {
439 goto bad; 377 goto bad;
440 378 }
441Index: git/sysemu.h 379Index: qemu/sysemu.h
442=================================================================== 380===================================================================
443--- git.orig/sysemu.h 2009-12-02 13:13:56.000000000 +0000 381--- qemu.orig/sysemu.h 2010-05-11 18:05:22.959804376 -0400
444+++ git/sysemu.h 2010-01-14 15:55:40.000000000 +0000 382+++ qemu/sysemu.h 2010-05-12 12:10:40.129784123 -0400
445@@ -96,6 +96,7 @@ 383@@ -141,6 +141,7 @@ extern int semihosting_enabled;
446 extern int no_quit;
447 extern int semihosting_enabled;
448 extern int old_param; 384 extern int old_param;
385 extern int boot_menu;
386 extern QEMUClock *rtc_clock;
449+extern int force_pointer; 387+extern int force_pointer;
450 extern const char *bootp_filename;
451 388
452 #ifdef USE_KQEMU 389 #define MAX_NODES 64
453Index: git/target-i386/beginend_funcs.sh 390 extern int nb_numa_nodes;
391Index: qemu/target-i386/beginend_funcs.sh
454=================================================================== 392===================================================================
455--- /dev/null 1970-01-01 00:00:00.000000000 +0000 393--- /dev/null 1970-01-01 00:00:00.000000000 +0000
456+++ git/target-i386/beginend_funcs.sh 2010-01-14 15:55:40.000000000 +0000 394+++ qemu/target-i386/beginend_funcs.sh 2010-05-12 12:10:40.129784123 -0400
457@@ -0,0 +1,23 @@ 395@@ -0,0 +1,23 @@
458+#! /bin/sh 396+#! /bin/sh
459+# Copyright 2008 (C) Intel Corporation 397+# Copyright 2008 (C) Intel Corporation
@@ -478,10 +416,10 @@ Index: git/target-i386/beginend_funcs.sh
478+echo -e MAGIC_MACRO\(glCallList\)\\n 416+echo -e MAGIC_MACRO\(glCallList\)\\n
479+echo -e MAGIC_MACRO\(glCallLists\)\\n 417+echo -e MAGIC_MACRO\(glCallLists\)\\n
480+echo -e MAGIC_MACRO\(glEdgeFlag{,v}\)\\n 418+echo -e MAGIC_MACRO\(glEdgeFlag{,v}\)\\n
481Index: git/target-i386/ghash.c 419Index: qemu/target-i386/ghash.c
482=================================================================== 420===================================================================
483--- /dev/null 1970-01-01 00:00:00.000000000 +0000 421--- /dev/null 1970-01-01 00:00:00.000000000 +0000
484+++ git/target-i386/ghash.c 2010-01-14 15:55:40.000000000 +0000 422+++ qemu/target-i386/ghash.c 2010-05-12 12:10:40.130781590 -0400
485@@ -0,0 +1,347 @@ 423@@ -0,0 +1,347 @@
486+/* This is a modified and simplified version of original ghash.c */ 424+/* This is a modified and simplified version of original ghash.c */
487+ 425+
@@ -830,10 +768,10 @@ Index: git/target-i386/ghash.c
830+ hash_node = next; 768+ hash_node = next;
831+ } 769+ }
832+} 770+}
833Index: git/target-i386/ghash.h 771Index: qemu/target-i386/ghash.h
834=================================================================== 772===================================================================
835--- /dev/null 1970-01-01 00:00:00.000000000 +0000 773--- /dev/null 1970-01-01 00:00:00.000000000 +0000
836+++ git/target-i386/ghash.h 2010-01-14 15:55:40.000000000 +0000 774+++ qemu/target-i386/ghash.h 2010-05-12 12:10:40.130781590 -0400
837@@ -0,0 +1,59 @@ 775@@ -0,0 +1,59 @@
838+/* This is a modified and simplified version of original ghash.h */ 776+/* This is a modified and simplified version of original ghash.h */
839+ 777+
@@ -894,10 +832,10 @@ Index: git/target-i386/ghash.h
894+ 832+
895+#endif /* __SIMPLE_HASH_H__ */ 833+#endif /* __SIMPLE_HASH_H__ */
896+ 834+
897Index: git/target-i386/gl_func_perso.h 835Index: qemu/target-i386/gl_func_perso.h
898=================================================================== 836===================================================================
899--- /dev/null 1970-01-01 00:00:00.000000000 +0000 837--- /dev/null 1970-01-01 00:00:00.000000000 +0000
900+++ git/target-i386/gl_func_perso.h 2010-01-14 15:55:40.000000000 +0000 838+++ qemu/target-i386/gl_func_perso.h 2010-05-12 12:10:40.130781590 -0400
901@@ -0,0 +1,135 @@ 839@@ -0,0 +1,135 @@
902+/* 840+/*
903+ * Hand-implemented GL/GLX API 841+ * Hand-implemented GL/GLX API
@@ -1034,11 +972,11 @@ Index: git/target-i386/gl_func_perso.h
1034+MAGIC_MACRO(_glGetSelectBuffer_fake), 972+MAGIC_MACRO(_glGetSelectBuffer_fake),
1035+MAGIC_MACRO(_glFeedbackBuffer_fake), 973+MAGIC_MACRO(_glFeedbackBuffer_fake),
1036+MAGIC_MACRO(_glGetFeedbackBuffer_fake), 974+MAGIC_MACRO(_glGetFeedbackBuffer_fake),
1037Index: git/target-i386/helper.c 975Index: qemu/target-i386/helper.c
1038=================================================================== 976===================================================================
1039--- git.orig/target-i386/helper.c 2009-12-02 13:13:56.000000000 +0000 977--- qemu.orig/target-i386/helper.c 2010-05-11 18:05:22.955784896 -0400
1040+++ git/target-i386/helper.c 2010-01-14 15:55:40.000000000 +0000 978+++ qemu/target-i386/helper.c 2010-05-12 12:10:40.131781711 -0400
1041@@ -1326,7 +1326,7 @@ 979@@ -1433,7 +1433,7 @@ target_phys_addr_t cpu_get_phys_page_deb
1042 } 980 }
1043 981
1044 page_offset = (addr & TARGET_PAGE_MASK) & (page_size - 1); 982 page_offset = (addr & TARGET_PAGE_MASK) & (page_size - 1);
@@ -1047,21 +985,21 @@ Index: git/target-i386/helper.c
1047 return paddr; 985 return paddr;
1048 } 986 }
1049 987
1050Index: git/target-i386/helper.h 988Index: qemu/target-i386/helper.h
1051=================================================================== 989===================================================================
1052--- git.orig/target-i386/helper.h 2009-12-02 13:13:56.000000000 +0000 990--- qemu.orig/target-i386/helper.h 2010-05-11 18:05:22.956804503 -0400
1053+++ git/target-i386/helper.h 2010-01-14 15:55:40.000000000 +0000 991+++ qemu/target-i386/helper.h 2010-05-12 12:10:40.131781711 -0400
1054@@ -214,4 +214,6 @@ 992@@ -217,4 +217,6 @@ DEF_HELPER_2(rclq, tl, tl, tl)
1055 DEF_HELPER_2(rcrq, tl, tl, tl) 993 DEF_HELPER_2(rcrq, tl, tl, tl)
1056 #endif 994 #endif
1057 995
1058+DEF_HELPER_0(opengl, void) 996+DEF_HELPER_0(opengl, void)
1059+ 997+
1060 #include "def-helper.h" 998 #include "def-helper.h"
1061Index: git/target-i386/helper_opengl.c 999Index: qemu/target-i386/helper_opengl.c
1062=================================================================== 1000===================================================================
1063--- /dev/null 1970-01-01 00:00:00.000000000 +0000 1001--- /dev/null 1970-01-01 00:00:00.000000000 +0000
1064+++ git/target-i386/helper_opengl.c 2010-01-14 16:36:59.000000000 +0000 1002+++ qemu/target-i386/helper_opengl.c 2010-05-12 12:10:40.132781622 -0400
1065@@ -0,0 +1,1207 @@ 1003@@ -0,0 +1,1207 @@
1066+/* 1004+/*
1067+ * Host-side implementation of GL/GLX API 1005+ * Host-side implementation of GL/GLX API
@@ -1148,16 +1086,16 @@ Index: git/target-i386/helper_opengl.c
1148+ cpu_x86_handle_mmu_fault((CPUState *) env, addr, 0, 1, 1)); 1086+ cpu_x86_handle_mmu_fault((CPUState *) env, addr, 0, 1, 1));
1149+ return NULL; 1087+ return NULL;
1150+ } else { 1088+ } else {
1151+ if (ret + TARGET_PAGE_SIZE <= phys_ram_size) { 1089+ if (ret + TARGET_PAGE_SIZE <= last_ram_offset) {
1152+ return phys_ram_base + ret + 1090+ return qemu_get_ram_ptr(ret +
1153+ (((target_ulong) addr) & (TARGET_PAGE_SIZE - 1)); 1091+ (((target_ulong) addr) & (TARGET_PAGE_SIZE - 1)));
1154+ } else { 1092+ } else {
1155+ fprintf(stderr, 1093+ fprintf(stderr,
1156+ "cpu_get_phys_page_debug(env, " TARGET_FMT_lx ") == " 1094+ "cpu_get_phys_page_debug(env, " TARGET_FMT_lx ") == "
1157+ TARGET_FMT_lx "\n", addr, ret); 1095+ TARGET_FMT_lx "\n", addr, ret);
1158+ fprintf(stderr, 1096+ fprintf(stderr,
1159+ "ret=" TARGET_FMT_lx " phys_ram_size= " TARGET_FMT_lx 1097+ "ret=" TARGET_FMT_lx " last_ram_offset= " TARGET_FMT_lx
1160+ "\n", ret, (target_ulong) phys_ram_size); 1098+ "\n", ret, (target_ulong) last_ram_offset);
1161+ return NULL; 1099+ return NULL;
1162+ } 1100+ }
1163+ } 1101+ }
@@ -2270,11 +2208,11 @@ Index: git/target-i386/helper_opengl.c
2270+ io_register(); 2208+ io_register();
2271+} 2209+}
2272+#endif 2210+#endif
2273Index: git/target-i386/kvm.c 2211Index: qemu/target-i386/kvm.c
2274=================================================================== 2212===================================================================
2275--- git.orig/target-i386/kvm.c 2009-12-02 13:13:56.000000000 +0000 2213--- qemu.orig/target-i386/kvm.c 2010-05-11 18:05:22.956804503 -0400
2276+++ git/target-i386/kvm.c 2010-01-14 15:55:40.000000000 +0000 2214+++ qemu/target-i386/kvm.c 2010-05-12 12:10:40.132781622 -0400
2277@@ -480,7 +480,7 @@ 2215@@ -528,7 +528,7 @@ static int kvm_get_fpu(CPUState *env)
2278 return 0; 2216 return 0;
2279 } 2217 }
2280 2218
@@ -2283,10 +2221,10 @@ Index: git/target-i386/kvm.c
2283 { 2221 {
2284 struct kvm_sregs sregs; 2222 struct kvm_sregs sregs;
2285 uint32_t hflags; 2223 uint32_t hflags;
2286Index: git/target-i386/mesa_enums.c 2224Index: qemu/target-i386/mesa_enums.c
2287=================================================================== 2225===================================================================
2288--- /dev/null 1970-01-01 00:00:00.000000000 +0000 2226--- /dev/null 1970-01-01 00:00:00.000000000 +0000
2289+++ git/target-i386/mesa_enums.c 2010-01-14 15:55:40.000000000 +0000 2227+++ qemu/target-i386/mesa_enums.c 2010-05-12 12:10:40.163783695 -0400
2290@@ -0,0 +1,4890 @@ 2228@@ -0,0 +1,4890 @@
2291+/* DO NOT EDIT - This file generated automatically by gl_enums.py (from Mesa) script */ 2229+/* DO NOT EDIT - This file generated automatically by gl_enums.py (from Mesa) script */
2292+ 2230+
@@ -7178,10 +7116,10 @@ Index: git/target-i386/mesa_enums.c
7178+} 7116+}
7179+ 7117+
7180+ 7118+
7181Index: git/target-i386/mesa_get.c 7119Index: qemu/target-i386/mesa_get.c
7182=================================================================== 7120===================================================================
7183--- /dev/null 1970-01-01 00:00:00.000000000 +0000 7121--- /dev/null 1970-01-01 00:00:00.000000000 +0000
7184+++ git/target-i386/mesa_get.c 2010-01-14 15:55:40.000000000 +0000 7122+++ qemu/target-i386/mesa_get.c 2010-05-12 12:10:40.171781452 -0400
7185@@ -0,0 +1,5563 @@ 7123@@ -0,0 +1,5563 @@
7186+ 7124+
7187+/*** 7125+/***
@@ -12746,10 +12684,10 @@ Index: git/target-i386/mesa_get.c
12746+ params[i] = (GLdouble) values[i]; 12684+ params[i] = (GLdouble) values[i];
12747+} 12685+}
12748+ 12686+
12749Index: git/target-i386/mesa_gl.h 12687Index: qemu/target-i386/mesa_gl.h
12750=================================================================== 12688===================================================================
12751--- /dev/null 1970-01-01 00:00:00.000000000 +0000 12689--- /dev/null 1970-01-01 00:00:00.000000000 +0000
12752+++ git/target-i386/mesa_gl.h 2010-01-14 15:55:40.000000000 +0000 12690+++ qemu/target-i386/mesa_gl.h 2010-05-12 12:10:40.173780926 -0400
12753@@ -0,0 +1,2251 @@ 12691@@ -0,0 +1,2251 @@
12754+/* 12692+/*
12755+ * Mesa 3-D graphics library 12693+ * Mesa 3-D graphics library
@@ -15002,10 +14940,10 @@ Index: git/target-i386/mesa_gl.h
15002+#endif 14940+#endif
15003+ 14941+
15004+#endif /* __gl_h_ */ 14942+#endif /* __gl_h_ */
15005Index: git/target-i386/mesa_glext.h 14943Index: qemu/target-i386/mesa_glext.h
15006=================================================================== 14944===================================================================
15007--- /dev/null 1970-01-01 00:00:00.000000000 +0000 14945--- /dev/null 1970-01-01 00:00:00.000000000 +0000
15008+++ git/target-i386/mesa_glext.h 2010-01-14 15:55:40.000000000 +0000 14946+++ qemu/target-i386/mesa_glext.h 2010-05-12 12:10:40.180780867 -0400
15009@@ -0,0 +1,7279 @@ 14947@@ -0,0 +1,7279 @@
15010+#ifndef __glext_h_ 14948+#ifndef __glext_h_
15011+#define __glext_h_ 14949+#define __glext_h_
@@ -22286,10 +22224,10 @@ Index: git/target-i386/mesa_glext.h
22286+ 22224+
22287+/* ERO */ 22225+/* ERO */
22288+GLAPI void GLAPIENTRY fake_gluBuild2DMipmaps (GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *data); 22226+GLAPI void GLAPIENTRY fake_gluBuild2DMipmaps (GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *data);
22289Index: git/target-i386/mesa_glu.h 22227Index: qemu/target-i386/mesa_glu.h
22290=================================================================== 22228===================================================================
22291--- /dev/null 1970-01-01 00:00:00.000000000 +0000 22229--- /dev/null 1970-01-01 00:00:00.000000000 +0000
22292+++ git/target-i386/mesa_glu.h 2010-01-14 15:55:40.000000000 +0000 22230+++ qemu/target-i386/mesa_glu.h 2010-05-12 12:10:40.181781686 -0400
22293@@ -0,0 +1,354 @@ 22231@@ -0,0 +1,354 @@
22294+/* 22232+/*
22295+** License Applicability. Except to the extent portions of this file are 22233+** License Applicability. Except to the extent portions of this file are
@@ -22645,10 +22583,10 @@ Index: git/target-i386/mesa_glu.h
22645+#endif 22583+#endif
22646+ 22584+
22647+#endif /* __glu_h__ */ 22585+#endif /* __glu_h__ */
22648Index: git/target-i386/mesa_glx.h 22586Index: qemu/target-i386/mesa_glx.h
22649=================================================================== 22587===================================================================
22650--- /dev/null 1970-01-01 00:00:00.000000000 +0000 22588--- /dev/null 1970-01-01 00:00:00.000000000 +0000
22651+++ git/target-i386/mesa_glx.h 2010-01-14 15:55:40.000000000 +0000 22589+++ qemu/target-i386/mesa_glx.h 2010-05-12 12:10:40.181781686 -0400
22652@@ -0,0 +1,510 @@ 22590@@ -0,0 +1,510 @@
22653+/* 22591+/*
22654+ * Mesa 3-D graphics library 22592+ * Mesa 3-D graphics library
@@ -23160,10 +23098,10 @@ Index: git/target-i386/mesa_glx.h
23160+#endif 23098+#endif
23161+ 23099+
23162+#endif 23100+#endif
23163Index: git/target-i386/mesa_glxext.h 23101Index: qemu/target-i386/mesa_glxext.h
23164=================================================================== 23102===================================================================
23165--- /dev/null 1970-01-01 00:00:00.000000000 +0000 23103--- /dev/null 1970-01-01 00:00:00.000000000 +0000
23166+++ git/target-i386/mesa_glxext.h 2010-01-14 15:55:40.000000000 +0000 23104+++ qemu/target-i386/mesa_glxext.h 2010-05-12 12:10:40.182781668 -0400
23167@@ -0,0 +1,785 @@ 23105@@ -0,0 +1,785 @@
23168+#ifndef __glxext_h_ 23106+#ifndef __glxext_h_
23169+#define __glxext_h_ 23107+#define __glxext_h_
@@ -23950,10 +23888,10 @@ Index: git/target-i386/mesa_glxext.h
23950+#endif 23888+#endif
23951+ 23889+
23952+#endif 23890+#endif
23953Index: git/target-i386/mesa_mipmap.c 23891Index: qemu/target-i386/mesa_mipmap.c
23954=================================================================== 23892===================================================================
23955--- /dev/null 1970-01-01 00:00:00.000000000 +0000 23893--- /dev/null 1970-01-01 00:00:00.000000000 +0000
23956+++ git/target-i386/mesa_mipmap.c 2010-01-14 15:55:40.000000000 +0000 23894+++ qemu/target-i386/mesa_mipmap.c 2010-05-12 12:10:40.183781579 -0400
23957@@ -0,0 +1,824 @@ 23895@@ -0,0 +1,824 @@
23958+ 23896+
23959+/* 23897+/*
@@ -24779,10 +24717,10 @@ Index: git/target-i386/mesa_mipmap.c
24779+ 24717+
24780+ return retval; 24718+ return retval;
24781+} 24719+}
24782Index: git/target-i386/opengl_exec.c 24720Index: qemu/target-i386/opengl_exec.c
24783=================================================================== 24721===================================================================
24784--- /dev/null 1970-01-01 00:00:00.000000000 +0000 24722--- /dev/null 1970-01-01 00:00:00.000000000 +0000
24785+++ git/target-i386/opengl_exec.c 2010-01-14 16:34:53.000000000 +0000 24723+++ qemu/target-i386/opengl_exec.c 2010-05-14 13:34:05.506295624 -0400
24786@@ -0,0 +1,3931 @@ 24724@@ -0,0 +1,3931 @@
24787+/* 24725+/*
24788+ * Host-side implementation of GL/GLX API 24726+ * Host-side implementation of GL/GLX API
@@ -28715,10 +28653,10 @@ Index: git/target-i386/opengl_exec.c
28715+ 28653+
28716+ return ret_int; 28654+ return ret_int;
28717+} 28655+}
28718Index: git/target-i386/opengl_func.h 28656Index: qemu/target-i386/opengl_func.h
28719=================================================================== 28657===================================================================
28720--- /dev/null 1970-01-01 00:00:00.000000000 +0000 28658--- /dev/null 1970-01-01 00:00:00.000000000 +0000
28721+++ git/target-i386/opengl_func.h 2010-01-14 15:55:40.000000000 +0000 28659+++ qemu/target-i386/opengl_func.h 2010-05-12 12:10:40.187781086 -0400
28722@@ -0,0 +1,1108 @@ 28660@@ -0,0 +1,1108 @@
28723+/* 28661+/*
28724+ * Main header for both host and guest sides 28662+ * Main header for both host and guest sides
@@ -29828,10 +29766,10 @@ Index: git/target-i386/opengl_func.h
29828+#error Unsupported ABI 29766+#error Unsupported ABI
29829+#endif 29767+#endif
29830+#endif 29768+#endif
29831Index: git/target-i386/opengl_player.c 29769Index: qemu/target-i386/opengl_player.c
29832=================================================================== 29770===================================================================
29833--- /dev/null 1970-01-01 00:00:00.000000000 +0000 29771--- /dev/null 1970-01-01 00:00:00.000000000 +0000
29834+++ git/target-i386/opengl_player.c 2010-01-14 15:55:40.000000000 +0000 29772+++ qemu/target-i386/opengl_player.c 2010-05-12 12:10:40.188781627 -0400
29835@@ -0,0 +1,1461 @@ 29773@@ -0,0 +1,1461 @@
29836+/* 29774+/*
29837+ * Plays a sequence of OpenGL calls recorded either under qemu or with opengl_server 29775+ * Plays a sequence of OpenGL calls recorded either under qemu or with opengl_server
@@ -31294,10 +31232,10 @@ Index: git/target-i386/opengl_player.c
31294+ } 31232+ }
31295+ return 0; 31233+ return 0;
31296+} 31234+}
31297Index: git/target-i386/opengl_server.c 31235Index: qemu/target-i386/opengl_server.c
31298=================================================================== 31236===================================================================
31299--- /dev/null 1970-01-01 00:00:00.000000000 +0000 31237--- /dev/null 1970-01-01 00:00:00.000000000 +0000
31300+++ git/target-i386/opengl_server.c 2010-01-14 15:55:40.000000000 +0000 31238+++ qemu/target-i386/opengl_server.c 2010-05-12 12:10:40.188781627 -0400
31301@@ -0,0 +1,826 @@ 31239@@ -0,0 +1,826 @@
31302+/* 31240+/*
31303+ * TCP/IP OpenGL server 31241+ * TCP/IP OpenGL server
@@ -32125,10 +32063,10 @@ Index: git/target-i386/opengl_server.c
32125+ 32063+
32126+ return 0; 32064+ return 0;
32127+} 32065+}
32128Index: git/target-i386/opengl_utils.h 32066Index: qemu/target-i386/opengl_utils.h
32129=================================================================== 32067===================================================================
32130--- /dev/null 1970-01-01 00:00:00.000000000 +0000 32068--- /dev/null 1970-01-01 00:00:00.000000000 +0000
32131+++ git/target-i386/opengl_utils.h 2010-01-14 15:55:40.000000000 +0000 32069+++ qemu/target-i386/opengl_utils.h 2010-05-12 12:10:40.189781608 -0400
32132@@ -0,0 +1,453 @@ 32070@@ -0,0 +1,453 @@
32133+/* 32071+/*
32134+ * Functions used by host & client sides 32072+ * Functions used by host & client sides
@@ -32583,10 +32521,10 @@ Index: git/target-i386/opengl_utils.h
32583+} 32521+}
32584+ 32522+
32585+#endif 32523+#endif
32586Index: git/target-i386/parse_gl_h.c 32524Index: qemu/target-i386/parse_gl_h.c
32587=================================================================== 32525===================================================================
32588--- /dev/null 1970-01-01 00:00:00.000000000 +0000 32526--- /dev/null 1970-01-01 00:00:00.000000000 +0000
32589+++ git/target-i386/parse_gl_h.c 2010-01-14 15:55:40.000000000 +0000 32527+++ qemu/target-i386/parse_gl_h.c 2010-05-12 12:10:40.190781520 -0400
32590@@ -0,0 +1,1496 @@ 32528@@ -0,0 +1,1496 @@
32591+/* 32529+/*
32592+ * Parse gl.h et glx.h to auto-generate source code 32530+ * Parse gl.h et glx.h to auto-generate source code
@@ -34084,10 +34022,10 @@ Index: git/target-i386/parse_gl_h.c
34084+ 34022+
34085+ return 0; 34023+ return 0;
34086+} 34024+}
34087Index: git/target-i386/parse_mesa_get_c.c 34025Index: qemu/target-i386/parse_mesa_get_c.c
34088=================================================================== 34026===================================================================
34089--- /dev/null 1970-01-01 00:00:00.000000000 +0000 34027--- /dev/null 1970-01-01 00:00:00.000000000 +0000
34090+++ git/target-i386/parse_mesa_get_c.c 2010-01-14 15:55:40.000000000 +0000 34028+++ qemu/target-i386/parse_mesa_get_c.c 2010-05-12 12:10:40.190781520 -0400
34091@@ -0,0 +1,225 @@ 34029@@ -0,0 +1,225 @@
34092+/* 34030+/*
34093+ * Parse the "get.c" from mesa source tree to generate "glgetv_cst.h" 34031+ * Parse the "get.c" from mesa source tree to generate "glgetv_cst.h"
@@ -34314,11 +34252,11 @@ Index: git/target-i386/parse_mesa_get_c.c
34314+ fclose(outf); 34252+ fclose(outf);
34315+ return 0; 34253+ return 0;
34316+} 34254+}
34317Index: git/target-i386/translate.c 34255Index: qemu/target-i386/translate.c
34318=================================================================== 34256===================================================================
34319--- git.orig/target-i386/translate.c 2009-12-02 13:13:56.000000000 +0000 34257--- qemu.orig/target-i386/translate.c 2010-05-11 18:05:22.957804134 -0400
34320+++ git/target-i386/translate.c 2010-01-14 15:55:40.000000000 +0000 34258+++ qemu/target-i386/translate.c 2010-05-12 12:10:40.192781553 -0400
34321@@ -741,6 +741,8 @@ 34259@@ -743,6 +743,8 @@ static void gen_check_io(DisasContext *s
34322 int state_saved; 34260 int state_saved;
34323 target_ulong next_eip; 34261 target_ulong next_eip;
34324 34262
@@ -34327,7 +34265,7 @@ Index: git/target-i386/translate.c
34327 state_saved = 0; 34265 state_saved = 0;
34328 if (s->pe && (s->cpl > s->iopl || s->vm86)) { 34266 if (s->pe && (s->cpl > s->iopl || s->vm86)) {
34329 if (s->cc_op != CC_OP_DYNAMIC) 34267 if (s->cc_op != CC_OP_DYNAMIC)
34330@@ -2592,11 +2594,18 @@ 34268@@ -2676,11 +2678,18 @@ static void gen_exception(DisasContext *
34331 s->is_jmp = 3; 34269 s->is_jmp = 3;
34332 } 34270 }
34333 34271
@@ -34346,78 +34284,36 @@ Index: git/target-i386/translate.c
34346 if (s->cc_op != CC_OP_DYNAMIC) 34284 if (s->cc_op != CC_OP_DYNAMIC)
34347 gen_op_set_cc_op(s->cc_op); 34285 gen_op_set_cc_op(s->cc_op);
34348 gen_jmp_im(cur_eip); 34286 gen_jmp_im(cur_eip);
34349Index: git/vl.c 34287Index: qemu/vl.c
34350=================================================================== 34288===================================================================
34351--- git.orig/vl.c 2009-12-02 13:13:56.000000000 +0000 34289--- qemu.orig/vl.c 2010-05-11 18:05:22.959804376 -0400
34352+++ git/vl.c 2010-01-14 15:55:40.000000000 +0000 34290+++ qemu/vl.c 2010-05-12 17:10:46.174909450 -0400
34353@@ -245,6 +245,7 @@ 34291@@ -238,6 +238,7 @@ int semihosting_enabled = 0;
34354 #ifdef TARGET_ARM 34292 #ifdef TARGET_ARM
34355 int old_param = 0; 34293 int old_param = 0;
34356 #endif 34294 #endif
34357+int force_pointer = 0; 34295+int force_pointer = 0;
34358 const char *qemu_name; 34296 const char *qemu_name;
34359 int alt_grab = 0; 34297 int alt_grab = 0;
34360 #if defined(TARGET_SPARC) || defined(TARGET_PPC) 34298 int ctrl_grab = 0;
34361@@ -253,6 +254,7 @@ 34299@@ -246,6 +247,7 @@ unsigned int nb_prom_envs = 0;
34300 const char *prom_envs[MAX_PROM_ENVS];
34362 #endif 34301 #endif
34363 int nb_drives_opt; 34302 int boot_menu;
34364 struct drive_opt drives_opt[MAX_DRIVES];
34365+extern int enable_gl; 34303+extern int enable_gl;
34366 34304
34367 static CPUState *cur_cpu; 34305 int nb_numa_nodes;
34368 static CPUState *next_cpu; 34306 uint64_t node_mem[MAX_NODES];
34369@@ -4208,12 +4210,14 @@ 34307@@ -4418,6 +4420,8 @@ static void select_vgahw (const char *p)
34370 QEMU_OPTION_clock, 34308 } else if (strstart(p, "xenfb", &opts)) {
34371 QEMU_OPTION_localtime, 34309 vga_interface_type = VGA_XENFB;
34372 QEMU_OPTION_startdate, 34310 } else if (!strstart(p, "none", &opts)) {
34373+ QEMU_OPTION_enable_gl, 34311+ }
34374 QEMU_OPTION_icount, 34312+ else {
34375 QEMU_OPTION_echr,
34376 QEMU_OPTION_virtiocon,
34377 QEMU_OPTION_show_cursor,
34378 QEMU_OPTION_semihosting,
34379 QEMU_OPTION_old_param,
34380+ QEMU_OPTION_force_pointer,
34381 QEMU_OPTION_tb_size,
34382 QEMU_OPTION_incoming,
34383 QEMU_OPTION_chroot,
34384@@ -4344,6 +4348,8 @@
34385 #if defined(TARGET_ARM)
34386 { "old-param", 0, QEMU_OPTION_old_param },
34387 #endif
34388+ { "force-pointer", 0, QEMU_OPTION_force_pointer },
34389+ { "enable-gl", 0, QEMU_OPTION_enable_gl },
34390 { "tb-size", HAS_ARG, QEMU_OPTION_tb_size },
34391 { "incoming", HAS_ARG, QEMU_OPTION_incoming },
34392 { "chroot", HAS_ARG, QEMU_OPTION_chroot },
34393@@ -4496,22 +4502,17 @@
34394 {
34395 const char *opts;
34396
34397+ std_vga_enabled = 0;
34398+ cirrus_vga_enabled = 0;
34399+ vmsvga_enabled = 0;
34400+
34401 if (strstart(p, "std", &opts)) {
34402 std_vga_enabled = 1;
34403- cirrus_vga_enabled = 0;
34404- vmsvga_enabled = 0;
34405 } else if (strstart(p, "cirrus", &opts)) {
34406 cirrus_vga_enabled = 1;
34407- std_vga_enabled = 0;
34408- vmsvga_enabled = 0;
34409 } else if (strstart(p, "vmware", &opts)) {
34410- cirrus_vga_enabled = 0;
34411- std_vga_enabled = 0;
34412 vmsvga_enabled = 1;
34413 } else if (strstart(p, "none", &opts)) {
34414- cirrus_vga_enabled = 0;
34415- std_vga_enabled = 0;
34416- vmsvga_enabled = 0;
34417 } else {
34418 invalid_vga: 34313 invalid_vga:
34419 fprintf(stderr, "Unknown vga type: %s\n", p); 34314 fprintf(stderr, "Unknown vga type: %s\n", p);
34420@@ -5220,6 +5221,9 @@ 34315 exit(1);
34316@@ -5540,6 +5544,9 @@ int main(int argc, char **argv, char **e
34421 old_param = 1; 34317 old_param = 1;
34422 break; 34318 break;
34423 #endif 34319 #endif
@@ -34427,20 +34323,21 @@ Index: git/vl.c
34427 case QEMU_OPTION_clock: 34323 case QEMU_OPTION_clock:
34428 configure_alarms(optarg); 34324 configure_alarms(optarg);
34429 break; 34325 break;
34430@@ -5261,6 +5265,11 @@ 34326@@ -5554,6 +5561,12 @@ int main(int argc, char **argv, char **e
34431 }
34432 } 34327 }
34328 configure_rtc(opts);
34433 break; 34329 break;
34434+#ifdef TARGET_OPENGL_OK 34330+#ifdef TARGET_OPENGL_OK
34435+ case QEMU_OPTION_enable_gl: 34331+ case QEMU_OPTION_enable_gl:
34332+ fprintf(stderr, "Enabling opengl\n");
34436+ enable_gl = 1; 34333+ enable_gl = 1;
34437+ break; 34334+ break;
34438+#endif 34335+#endif
34439 case QEMU_OPTION_tb_size: 34336 case QEMU_OPTION_tb_size:
34440 tb_size = strtol(optarg, NULL, 0); 34337 tb_size = strtol(optarg, NULL, 0);
34441 if (tb_size < 0) 34338 if (tb_size < 0)
34442@@ -5545,6 +5554,17 @@ 34339@@ -5907,6 +5920,14 @@ int main(int argc, char **argv, char **e
34443 exit(1); 34340 }
34444 } 34341 }
34445 } 34342 }
34446+#ifdef TARGET_OPENGL_OK 34343+#ifdef TARGET_OPENGL_OK
@@ -34448,12 +34345,32 @@ Index: git/vl.c
34448+ /* Use second serial port */ 34345+ /* Use second serial port */
34449+ int opengl_serial = 1; 34346+ int opengl_serial = 1;
34450+ 34347+
34451+ if (serial_devices[opengl_serial]) 34348+ add_device_config(DEV_SERIAL, "opengl");
34452+ fprintf(stderr, "overriding second serial "
34453+ "port for OpenGL use\n");
34454+ serial_devices[opengl_serial] = "opengl";
34455+ } 34349+ }
34456+#endif 34350+#endif
34457 34351
34458 if (monitor_device) { 34352 if (foreach_device_config(DEV_SERIAL, serial_parse) < 0)
34459 monitor_hd = qemu_chr_open("monitor", monitor_device, NULL); 34353 exit(1);
34354Index: qemu/qemu-options.hx
34355===================================================================
34356--- qemu.orig/qemu-options.hx 2010-05-11 18:05:22.959804376 -0400
34357+++ qemu/qemu-options.hx 2010-05-12 17:18:10.420907903 -0400
34358@@ -1783,6 +1783,18 @@ many timer interrupts were not processed
34359 re-inject them.
34360 ETEXI
34361
34362+DEF("enable-gl", 0, QEMU_OPTION_enable_gl, \
34363+ "-enable-gl\n")
34364+STEXI
34365+@item -enable-gl
34366+ETEXI
34367+
34368+DEF("force-pointer", 0, QEMU_OPTION_force_pointer, \
34369+ "-force-pointer\n")
34370+STEXI
34371+@item -force-pointer
34372+ETEXI
34373+
34374 DEF("icount", HAS_ARG, QEMU_OPTION_icount, \
34375 "-icount [N|auto]\n" \
34376 " enable virtual instruction counter with 2^N clock ticks per\n" \
diff --git a/meta/packages/qemu/qemu-git/qemugl-allow-glxcontext-release.patch b/meta/packages/qemu/qemu-git/qemugl-allow-glxcontext-release.patch
index 979e8afc4c..43acc361a0 100644
--- a/meta/packages/qemu/qemu-git/qemugl-allow-glxcontext-release.patch
+++ b/meta/packages/qemu/qemu-git/qemugl-allow-glxcontext-release.patch
@@ -10,11 +10,11 @@ committer Andrzej Zaborowski <andrew.zaborowski@intel.com> Tue, 16 Jun 2009 22:2
10 target-i386/opengl_exec.c | 31 ++++++++++++++++--------------- 10 target-i386/opengl_exec.c | 31 ++++++++++++++++---------------
11 1 files changed, 16 insertions(+), 15 deletions(-) 11 1 files changed, 16 insertions(+), 15 deletions(-)
12 12
13diff --git a/target-i386/opengl_exec.c b/target-i386/opengl_exec.c 13Index: qemu/target-i386/opengl_exec.c
14index 4a69b9b..3d6fb21 100644 14===================================================================
15--- a/target-i386/opengl_exec.c 15--- qemu.orig/target-i386/opengl_exec.c 2010-05-10 18:46:43.175394992 -0400
16+++ b/target-i386/opengl_exec.c 16+++ qemu/target-i386/opengl_exec.c 2010-05-10 18:46:43.218419933 -0400
17@@ -1600,10 +1600,9 @@ int do_function_call(int func_number, arg_t *args, char *ret_string) 17@@ -1600,10 +1600,9 @@ int do_function_call(int func_number, ar
18 fprintf(stderr, "client_drawable=%p fake_ctx=%d\n", 18 fprintf(stderr, "client_drawable=%p fake_ctx=%d\n",
19 (void *) client_drawable, fake_ctxt); 19 (void *) client_drawable, fake_ctxt);
20 20
@@ -27,7 +27,7 @@ index 4a69b9b..3d6fb21 100644
27 get_association_fakepbuffer_pbuffer( 27 get_association_fakepbuffer_pbuffer(
28 process, client_drawable))) { 28 process, client_drawable))) {
29 GLXContext ctxt = get_association_fakecontext_glxcontext( 29 GLXContext ctxt = get_association_fakecontext_glxcontext(
30@@ -1651,19 +1650,21 @@ int do_function_call(int func_number, arg_t *args, char *ret_string) 30@@ -1651,19 +1650,21 @@ int do_function_call(int func_number, ar
31 } 31 }
32 32
33 if (ret_int) { 33 if (ret_int) {
diff --git a/meta/packages/qemu/qemu-git/workaround_bad_futex_headers.patch b/meta/packages/qemu/qemu-git/workaround_bad_futex_headers.patch
index b254b2410a..7727a39f37 100644
--- a/meta/packages/qemu/qemu-git/workaround_bad_futex_headers.patch
+++ b/meta/packages/qemu/qemu-git/workaround_bad_futex_headers.patch
@@ -2,11 +2,11 @@
2 linux-user/syscall.c | 10 +++++++++- 2 linux-user/syscall.c | 10 +++++++++-
3 1 file changed, 9 insertions(+), 1 deletion(-) 3 1 file changed, 9 insertions(+), 1 deletion(-)
4 4
5Index: trunk/linux-user/syscall.c 5Index: qemu/linux-user/syscall.c
6=================================================================== 6===================================================================
7--- trunk.orig/linux-user/syscall.c 2009-01-05 12:47:06.000000000 +0000 7--- qemu.orig/linux-user/syscall.c 2010-05-11 16:52:16.929785275 -0400
8+++ trunk/linux-user/syscall.c 2009-01-05 12:48:04.000000000 +0000 8+++ qemu/linux-user/syscall.c 2010-05-11 16:52:25.174783517 -0400
9@@ -87,6 +87,15 @@ 9@@ -94,6 +94,15 @@
10 #define CLONE_NPTL_FLAGS2 0 10 #define CLONE_NPTL_FLAGS2 0
11 #endif 11 #endif
12 12
@@ -21,4 +21,4 @@ Index: trunk/linux-user/syscall.c
21+ 21+
22 //#define DEBUG 22 //#define DEBUG
23 23
24 #if defined(TARGET_I386) || defined(TARGET_ARM) || defined(TARGET_SPARC) \ 24 //#include <linux/msdos_fs.h>
diff --git a/meta/packages/qemu/qemu-git/zlibsearch.patch b/meta/packages/qemu/qemu-git/zlibsearch.patch
deleted file mode 100644
index 6d7cf03055..0000000000
--- a/meta/packages/qemu/qemu-git/zlibsearch.patch
+++ /dev/null
@@ -1,13 +0,0 @@
1Index: git/configure
2===================================================================
3--- git.orig/configure 2009-05-24 11:12:34.000000000 +0100
4+++ git/configure 2009-05-24 11:12:55.000000000 +0100
5@@ -749,7 +749,7 @@
6 #include <zlib.h>
7 int main(void) { zlibVersion(); return 0; }
8 EOF
9-if $cc $ARCH_CFLAGS -o $TMPE ${OS_CFLAGS} $TMPC -lz > /dev/null 2> /dev/null ; then
10+if $cc $CFLAGS $LDFLAGS $ARCH_CFLAGS -o $TMPE ${OS_CFLAGS} $TMPC -lz > /dev/null 2> /dev/null ; then
11 :
12 else
13 echo
diff --git a/meta/packages/qemu/qemu_git.bb b/meta/packages/qemu/qemu_git.bb
index e9129649a8..0bba600038 100644
--- a/meta/packages/qemu/qemu_git.bb
+++ b/meta/packages/qemu/qemu_git.bb
@@ -1,7 +1,7 @@
1LICENSE = "GPL" 1LICENSE = "GPL"
2DEPENDS = "zlib" 2DEPENDS = "zlib"
3PV = "0.10.6+git${SRCREV}" 3PV = "0.12.0+git${SRCREV}"
4PR = "r3" 4PR = "r4"
5 5
6FILESPATH = "${FILE_DIRNAME}/qemu-${PV}/:${FILE_DIRNAME}/qemu-git/" 6FILESPATH = "${FILE_DIRNAME}/qemu-${PV}/:${FILE_DIRNAME}/qemu-git/"
7 7
@@ -12,13 +12,11 @@ SRC_URI = "\
12 file://no-strip.patch;patch=1 \ 12 file://no-strip.patch;patch=1 \
13 file://fix-dirent.patch;patch=1 \ 13 file://fix-dirent.patch;patch=1 \
14 file://fix-nogl.patch;patch=1 \ 14 file://fix-nogl.patch;patch=1 \
15 file://zlibsearch.patch;patch=1 \ 15 file://qemugl-allow-glxcontext-release.patch;patch=1"
16 file://qemugl-allow-glxcontext-release.patch;patch=1 \
17 file://2ca2078e287174522e3a6229618947d3d285b8c0.patch;patch=1"
18 16
19S = "${WORKDIR}/git" 17S = "${WORKDIR}/git"
20 18
21EXTRA_OECONF = "--target-list=arm-linux-user,arm-softmmu,i386-softmmu,x86_64-softmmu,mips-linux-user,mips-softmmu --disable-gfx-check" 19EXTRA_OECONF = "--target-list=arm-linux-user,arm-softmmu,i386-softmmu,x86_64-softmmu,mips-linux-user,mips-softmmu --disable-werror --disable-vnc-tls"
22#EXTRA_OECONF += "--disable-sdl" 20#EXTRA_OECONF += "--disable-sdl"
23 21
24inherit autotools 22inherit autotools