summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/qemu/qemu-0.15.0/qemugl-fix.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/qemu/qemu-0.15.0/qemugl-fix.patch')
-rw-r--r--meta/recipes-devtools/qemu/qemu-0.15.0/qemugl-fix.patch74
1 files changed, 74 insertions, 0 deletions
diff --git a/meta/recipes-devtools/qemu/qemu-0.15.0/qemugl-fix.patch b/meta/recipes-devtools/qemu/qemu-0.15.0/qemugl-fix.patch
new file mode 100644
index 0000000000..0858f76b52
--- /dev/null
+++ b/meta/recipes-devtools/qemu/qemu-0.15.0/qemugl-fix.patch
@@ -0,0 +1,74 @@
1This patch fix GL application start failure on qemu 0.14.0.
2
3Some turn-on macro/variable are re-arranged, buffer pointer is extended to
4support 32/64b combination of target/host.
5
6This is not perfect fix, and we need consider other GL alternatives in future.
7
8Upstream-Status: Inappropriate [other] - depends on qemu gl patch
9
10Signed-off-by: Zhai Edwin <edwin.zhai@intel.com>
11
12
13Index: qemu-0.14.0/target-i386/opengl_func.h
14===================================================================
15--- qemu-0.14.0.orig/target-i386/opengl_func.h 2011-04-08 16:43:46.000000000 +0800
16+++ qemu-0.14.0/target-i386/opengl_func.h 2011-04-08 16:45:55.000000000 +0800
17@@ -26,8 +26,9 @@
18 #include "mesa_glext.h"
19
20 /* Argument list are internally of a type that can hold a target pointer
21- * or a host pointer. */
22-typedef target_phys_addr_t arg_t;
23+ * or a host pointer. If 32b target runs on 64b host, it should be big enough
24+ * to hold host pointer */
25+typedef long unsigned int arg_t;
26
27 enum {
28 TYPE_NONE,
29Index: qemu-0.14.0/target-i386/translate.c
30===================================================================
31--- qemu-0.14.0.orig/target-i386/translate.c 2011-04-08 16:19:15.000000000 +0800
32+++ qemu-0.14.0/target-i386/translate.c 2011-04-08 16:22:03.000000000 +0800
33@@ -2652,17 +2652,19 @@
34 s->is_jmp = DISAS_TB_JUMP;
35 }
36
37-int enable_gl = 0;
38+extern int enable_gl;
39
40 /* an interrupt is different from an exception because of the
41 privilege checks */
42 static void gen_interrupt(DisasContext *s, int intno,
43 target_ulong cur_eip, target_ulong next_eip)
44 {
45+#if !defined(CONFIG_USER_ONLY)
46 if (enable_gl && intno == 0x99) {
47 gen_helper_opengl();
48 return;
49 }
50+#endif
51
52 if (s->cc_op != CC_OP_DYNAMIC)
53 gen_op_set_cc_op(s->cc_op);
54Index: qemu-0.14.0/vl.c
55===================================================================
56--- qemu-0.14.0.orig/vl.c 2011-04-08 16:11:43.000000000 +0800
57+++ qemu-0.14.0/vl.c 2011-04-08 16:20:05.000000000 +0800
58@@ -229,7 +229,7 @@
59 unsigned int nb_prom_envs = 0;
60 const char *prom_envs[MAX_PROM_ENVS];
61 int boot_menu;
62-extern int enable_gl;
63+int enable_gl = 0;
64
65 typedef struct FWBootEntry FWBootEntry;
66
67@@ -1909,6 +1909,7 @@
68 return popt;
69 }
70
71+#define TARGET_OPENGL_OK
72 int main(int argc, char **argv, char **envp)
73 {
74 const char *gdbstub_dev = NULL;