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