summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2012-10-24 12:30:53 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-10-24 12:50:44 +0100
commitfa471acc0030c77152c9b72e8f31f6c49f706f01 (patch)
treeccb5ac9be21e5b865ac292e44029294de26971dc
parent952b879de5ffdb04a706fc4e2824696b25c4bf11 (diff)
downloadpoky-fa471acc0030c77152c9b72e8f31f6c49f706f01.tar.gz
qemugl: Remove since support for it was removed from qemu
(From OE-Core rev: 0195a08f77fe0e01b2d7548ccffeaf89d2d780e1) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/classes/image-swab.bbclass1
-rw-r--r--meta/conf/machine/qemux86-64.conf4
-rw-r--r--meta/conf/machine/qemux86.conf4
-rw-r--r--meta/recipes-graphics/mesa/qemugl/call_opengl_fix.patch94
-rw-r--r--meta/recipes-graphics/mesa/qemugl/extensions_emulation.patch34
-rw-r--r--meta/recipes-graphics/mesa/qemugl/remove-x11r6-lib-dir.patch21
-rw-r--r--meta/recipes-graphics/mesa/qemugl/versionfix.patch32
-rw-r--r--meta/recipes-graphics/mesa/qemugl_git.bb50
8 files changed, 2 insertions, 238 deletions
diff --git a/meta/classes/image-swab.bbclass b/meta/classes/image-swab.bbclass
index 37d75355bf..ba30f0166c 100644
--- a/meta/classes/image-swab.bbclass
+++ b/meta/classes/image-swab.bbclass
@@ -26,7 +26,6 @@ PARALLEL_MAKE_pn-m4 = ""
26PARALLEL_MAKE_pn-opkg = "" 26PARALLEL_MAKE_pn-opkg = ""
27PARALLEL_MAKE_pn-pkgconfig = "" 27PARALLEL_MAKE_pn-pkgconfig = ""
28PARALLEL_MAKE_pn-prelink = "" 28PARALLEL_MAKE_pn-prelink = ""
29PARALLEL_MAKE_pn-qemugl = ""
30PARALLEL_MAKE_pn-rpm = "" 29PARALLEL_MAKE_pn-rpm = ""
31PARALLEL_MAKE_pn-tcl = "" 30PARALLEL_MAKE_pn-tcl = ""
32PARALLEL_MAKE_pn-beecrypt = "" 31PARALLEL_MAKE_pn-beecrypt = ""
diff --git a/meta/conf/machine/qemux86-64.conf b/meta/conf/machine/qemux86-64.conf
index 8d4bd6f487..3852b89932 100644
--- a/meta/conf/machine/qemux86-64.conf
+++ b/meta/conf/machine/qemux86-64.conf
@@ -13,14 +13,12 @@ KERNEL_IMAGETYPE = "bzImage"
13 13
14SERIAL_CONSOLE = "115200 ttyS0" 14SERIAL_CONSOLE = "115200 ttyS0"
15 15
16# We bypass swrast but we need it to be present for X to load correctly
17XSERVER ?= "xserver-xorg \ 16XSERVER ?= "xserver-xorg \
18 mesa-dri-driver-swrast \ 17 mesa-dri-driver-swrast \
19 xf86-input-vmmouse \ 18 xf86-input-vmmouse \
20 xf86-input-keyboard \ 19 xf86-input-keyboard \
21 xf86-input-evdev \ 20 xf86-input-evdev \
22 xf86-video-vmware \ 21 xf86-video-vmware"
23 qemugl"
24 22
25require conf/machine/include/qemu.inc 23require conf/machine/include/qemu.inc
26 24
diff --git a/meta/conf/machine/qemux86.conf b/meta/conf/machine/qemux86.conf
index 6edf386d0e..ee14bec974 100644
--- a/meta/conf/machine/qemux86.conf
+++ b/meta/conf/machine/qemux86.conf
@@ -13,14 +13,12 @@ KERNEL_IMAGETYPE = "bzImage"
13 13
14SERIAL_CONSOLE = "115200 ttyS0" 14SERIAL_CONSOLE = "115200 ttyS0"
15 15
16# We bypass swrast but we need it to be present for X to load correctly
17XSERVER ?= "xserver-xorg \ 16XSERVER ?= "xserver-xorg \
18 mesa-dri-driver-swrast \ 17 mesa-dri-driver-swrast \
19 xf86-input-vmmouse \ 18 xf86-input-vmmouse \
20 xf86-input-keyboard \ 19 xf86-input-keyboard \
21 xf86-input-evdev \ 20 xf86-input-evdev \
22 xf86-video-vmware \ 21 xf86-video-vmware"
23 qemugl"
24 22
25require conf/machine/include/qemu.inc 23require conf/machine/include/qemu.inc
26 24
diff --git a/meta/recipes-graphics/mesa/qemugl/call_opengl_fix.patch b/meta/recipes-graphics/mesa/qemugl/call_opengl_fix.patch
deleted file mode 100644
index 342f49b717..0000000000
--- a/meta/recipes-graphics/mesa/qemugl/call_opengl_fix.patch
+++ /dev/null
@@ -1,94 +0,0 @@
1Save registers via local variables instead of simple "push", so that gcc become
2aware of this operation and avoid stack disorder.
3
4opengl calling (in call_opengl_qemu) includes 4 steps:
51. prepare opengl parameters on stack
62. save some "input" register by push
73. load "input" register with parameters on stack via same index as step 1
84. issue "int 0x99" to trap into qemu, who will get parameter in the registers
9
10New gcc uses "%esp" rather than "%ebp" to index local variable in stack, which
11leads wrong index in step 3, as push decrease "%esp" automatically. Saving
12registers via local variables to fix it.
13
14Upstream-Status: Pending
15
16Signed-off-by: Zhai Edwin <edwin.zhai@intel.com>
17Index: git/opengl_client.c
18===================================================================
19--- git.orig/opengl_client.c 2012-02-28 15:26:28.000000000 +0800
20+++ git/opengl_client.c 2012-02-28 15:29:18.000000000 +0800
21@@ -1076,23 +1076,29 @@
22 {
23 #if defined(__i386__)
24 int ret;
25+ int bx, cx, dx, si;
26 #ifdef WIN32
27 __asm__ ("pushl %0;pushl %%fs:0;movl %%esp,%%fs:0;" : : "g" (win32_sigsegv_handler));
28 #endif
29- __asm__ ("push %ebx");
30- __asm__ ("push %ecx");
31- __asm__ ("push %edx");
32- __asm__ ("push %esi");
33+ /* save registers before opengl call */
34+ __asm__ ("mov %%ebx, %0"::"m"(bx));
35+ __asm__ ("mov %%ecx, %0"::"m"(cx));
36+ __asm__ ("mov %%edx, %0"::"m"(dx));
37+ __asm__ ("mov %%esi, %0"::"m"(si));
38+
39 __asm__ ("mov %0, %%eax"::"m"(func_number));
40 __asm__ ("mov %0, %%ebx"::"m"(pid));
41 __asm__ ("mov %0, %%ecx"::"m"(ret_string));
42 __asm__ ("mov %0, %%edx"::"m"(args));
43 __asm__ ("mov %0, %%esi"::"m"(args_size));
44 __asm__ ("int $0x99");
45- __asm__ ("pop %esi");
46- __asm__ ("pop %edx");
47- __asm__ ("pop %ecx");
48- __asm__ ("pop %ebx");
49+
50+ /* restore registers */
51+ __asm__ ("mov %0, %%ebx"::"m"(bx));
52+ __asm__ ("mov %0, %%ecx"::"m"(cx));
53+ __asm__ ("mov %0, %%edx"::"m"(dx));
54+ __asm__ ("mov %0, %%esi"::"m"(si));
55+
56 __asm__ ("mov %%eax, %0"::"m"(ret));
57 #ifdef WIN32
58 __asm__ ("movl (%%esp),%%ecx;movl %%ecx,%%fs:0;addl $8,%%esp;" : : : "%ecx");
59@@ -1100,20 +1106,27 @@
60 return ret;
61 #elif defined(__x86_64__)
62 int ret;
63- __asm__ ("push %rbx");
64- __asm__ ("push %rcx");
65- __asm__ ("push %rdx");
66- __asm__ ("push %rsi");
67+ long bx, cx, dx, si;
68+
69+ /* save registers before opengl call */
70+ __asm__ ("mov %%rbx, %0"::"m"(bx));
71+ __asm__ ("mov %%rcx, %0"::"m"(cx));
72+ __asm__ ("mov %%rdx, %0"::"m"(dx));
73+ __asm__ ("mov %%rsi, %0"::"m"(si));
74+
75 __asm__ ("mov %0, %%eax"::"m"(func_number));
76 __asm__ ("mov %0, %%ebx"::"m"(pid));
77 __asm__ ("mov %0, %%rcx"::"m"(ret_string));
78 __asm__ ("mov %0, %%rdx"::"m"(args));
79 __asm__ ("mov %0, %%rsi"::"m"(args_size));
80 __asm__ ("int $0x99");
81- __asm__ ("pop %rsi");
82- __asm__ ("pop %rdx");
83- __asm__ ("pop %rcx");
84- __asm__ ("pop %rbx");
85+
86+ /* restore registers */
87+ __asm__ ("mov %0, %%rbx"::"m"(bx));
88+ __asm__ ("mov %0, %%rcx"::"m"(cx));
89+ __asm__ ("mov %0, %%rdx"::"m"(dx));
90+ __asm__ ("mov %0, %%rsi"::"m"(si));
91+
92 __asm__ ("mov %%eax, %0"::"m"(ret));
93 return ret;
94 #else
diff --git a/meta/recipes-graphics/mesa/qemugl/extensions_emulation.patch b/meta/recipes-graphics/mesa/qemugl/extensions_emulation.patch
deleted file mode 100644
index 08418c2f4b..0000000000
--- a/meta/recipes-graphics/mesa/qemugl/extensions_emulation.patch
+++ /dev/null
@@ -1,34 +0,0 @@
1Hide some GLX extensions by default to avoid guest call missing GLX API. It's
2hacky to implement these APIs, so hide these extensions as fix.
3
4Upstream-Status: Pending
5
6Signed-off-by: Zhai Edwin <edwin.zhai@intel.com>
7
8Index: git/opengl_client.c
9===================================================================
10--- git.orig/opengl_client.c 2012-03-16 18:22:27.000000000 +0800
11+++ git/opengl_client.c 2012-03-16 18:52:06.000000000 +0800
12@@ -105,6 +105,12 @@
13 "NO_MOVE", /* default : set if TCP/IP communication */
14 };
15
16+/* Hiding some GLX extensions from guest */
17+static const char* hiding_extensions =
18+ "GLX_MESA_copy_sub_buffer,\
19+ GLX_MESA_multithread_makecurrent,\
20+ GLX_MESA_swap_control,\
21+ ";
22
23 #ifdef WIN32
24
25@@ -3516,7 +3522,8 @@
26 static void removeUnwantedExtensions(char* ret)
27 {
28 char* toBeRemoved = getenv("GL_REMOVE_EXTENSIONS");
29- if (toBeRemoved == NULL) return;
30+ if (toBeRemoved == NULL)
31+ toBeRemoved = hiding_extensions;
32 toBeRemoved = strdup(toBeRemoved);
33 char* iterToBeRemoved = toBeRemoved;
34 while(*iterToBeRemoved)
diff --git a/meta/recipes-graphics/mesa/qemugl/remove-x11r6-lib-dir.patch b/meta/recipes-graphics/mesa/qemugl/remove-x11r6-lib-dir.patch
deleted file mode 100644
index d24d0455d9..0000000000
--- a/meta/recipes-graphics/mesa/qemugl/remove-x11r6-lib-dir.patch
+++ /dev/null
@@ -1,21 +0,0 @@
1Remove X11R6 lib directory
2
3"-L/usr/X11R6/lib" is obsolate in poky. Poky currently use Xserver from X.org (X11R7.x), which puts lib in standard /usr/lib, so no need to specify the extra -L/usr/X11R6/lib. Meanwhile, the -L/usr/X11R6/lib will cause warning: library search path "/usr/X11R6/lib" is unsafe for cross-compilation. so better to remove it.
4
5Upstream-Status: Pending
6
7Signed-off-by: Yu Ke <ke.yu@intel.com>
8
9diff --git a/Makefile b/Makefile
10index 9e5a8ea..f3a082a 100644
11--- a/Makefile
12+++ b/Makefile
13@@ -3,7 +3,7 @@ GL_CFLAGS := -Wall -g -O2 -fno-strict-aliasing
14 all: libGL.so.1.2
15
16 libGL.so.1.2: client_stub.c opengl_client.c glgetv_cst.h opengl_func.h opengl_utils.h opengl_client_xfonts.c mesa_gl.h mesa_glext.h mesa_glx.h mesa_glxext.h
17- $(CC) -fPIC $(GL_CFLAGS) opengl_client.c -shared -o libGL.so.1.2 -lX11 -lXfixes -lm -L$(D)/usr/X11R6/lib -lpthread -I.
18+ $(CC) -fPIC $(GL_CFLAGS) opengl_client.c -shared -o libGL.so.1.2 -lX11 -lXfixes -lm -lpthread -I.
19
20 opengl_func.h: gl_func.h
21
diff --git a/meta/recipes-graphics/mesa/qemugl/versionfix.patch b/meta/recipes-graphics/mesa/qemugl/versionfix.patch
deleted file mode 100644
index 614b816d14..0000000000
--- a/meta/recipes-graphics/mesa/qemugl/versionfix.patch
+++ /dev/null
@@ -1,32 +0,0 @@
1Upstream-Status: Pending
2
3Index: git/Makefile
4===================================================================
5--- git.orig/Makefile 2009-01-19 23:37:36.000000000 +0000
6+++ git/Makefile 2009-06-09 20:30:37.000000000 +0100
7@@ -1,9 +1,9 @@
8 GL_CFLAGS := -Wall -g -O2 -fno-strict-aliasing
9
10-all: libGL.so
11+all: libGL.so.1.2
12
13-libGL.so: client_stub.c opengl_client.c glgetv_cst.h opengl_func.h opengl_utils.h opengl_client_xfonts.c mesa_gl.h mesa_glext.h mesa_glx.h mesa_glxext.h
14- $(CC) -fPIC $(GL_CFLAGS) opengl_client.c -shared -o libGL.so -lX11 -lXfixes -lm -L$(D)/usr/X11R6/lib -lpthread -I.
15+libGL.so.1.2: client_stub.c opengl_client.c glgetv_cst.h opengl_func.h opengl_utils.h opengl_client_xfonts.c mesa_gl.h mesa_glext.h mesa_glx.h mesa_glxext.h
16+ $(CC) -fPIC $(GL_CFLAGS) opengl_client.c -shared -o libGL.so.1.2 -lX11 -lXfixes -lm -L$(D)/usr/X11R6/lib -lpthread -I.
17
18 opengl_func.h: gl_func.h
19
20Index: git/opengl_client.c
21===================================================================
22--- git.orig/opengl_client.c 2009-06-09 21:07:15.000000000 +0100
23+++ git/opengl_client.c 2009-06-09 21:07:33.000000000 +0100
24@@ -11578,7 +11578,7 @@
25 tab_assoc = calloc(tabSize, sizeof(AssocProcAdress));
26
27 #ifndef WIN32
28- handle = dlopen(getenv("REAL_LIBGL") ? getenv("REAL_LIBGL") : "libGL.so" ,RTLD_LAZY);
29+ handle = dlopen(getenv("REAL_LIBGL") ? getenv("REAL_LIBGL") : "libGL.so.1.2" ,RTLD_LAZY);
30 if (!handle) {
31 log_gl("%s\n", dlerror());
32 exit(1);
diff --git a/meta/recipes-graphics/mesa/qemugl_git.bb b/meta/recipes-graphics/mesa/qemugl_git.bb
deleted file mode 100644
index 9cf04364ac..0000000000
--- a/meta/recipes-graphics/mesa/qemugl_git.bb
+++ /dev/null
@@ -1,50 +0,0 @@
1DESCRIPTION = "QEMU i386 OpenGL passtrough"
2HOMEPAGE = "http://savannah.nongnu.org/projects/qemugl"
3SECTION = "x11/drivers"
4LICENSE = "MIT"
5LIC_FILES_CHKSUM = "file://opengl_client.c;beginline=4;endline=23;md5=a7dbe915be5fb5df8fd496f348ed9a05 \
6 file://parse_mesa_get_c.c;befinline=4;endline=23;md5=a55f258f32720c9565a425a3956bcb5e"
7
8DEPENDS = "virtual/libx11 xproto glproto libxfixes"
9
10COMPATIBLE_HOST = '(x86_64.*|i.86.*)-(linux|freebsd.*)'
11
12SRC_URI = "git://git.yoctoproject.org/qemugl;protocol=git \
13 file://versionfix.patch \
14 file://remove-x11r6-lib-dir.patch \
15 file://call_opengl_fix.patch \
16 file://extensions_emulation.patch"
17S = "${WORKDIR}/git"
18
19SRCREV = "d888bbc723c00d197d34a39b5b7448660ec1b1c0"
20
21PV = "0.0+git${SRCPV}"
22PR = "r11"
23
24DEFAULT_PREFERENCE = "-1"
25
26do_install () {
27 install -d ${D}${libdir}/
28 if [ "${PN}" != "nativesdk-qemugl" ]; then
29 install -m 0755 ${S}/libGL.so.1.2 ${D}${libdir}/libGL-qemu.so.1.2
30 else
31 install -m 0755 ${S}/libGL.so.1.2 ${D}${libdir}/libGL.so.1.2
32 ln -s libGL.so.1.2 ${D}${libdir}/libGL.so.1
33 ln -s libGL.so.1 ${D}${libdir}/libGL.so
34 fi
35}
36
37# This cannot be converted to run at pacakge install time, because
38# it depends on being run after the libgl1 package is installed,
39# and RPM cannot guarantee the order of pacakge insallation.
40pkg_postinst_${PN} () {
41#!/bin/sh -e
42if [ x"$D" = "x" ]; then
43 rm -f ${libdir}/libGL.so.1.2
44 ln -s libGL-qemu.so.1.2 ${libdir}/libGL.so.1.2
45else
46 exit 1
47fi
48}
49
50BBCLASSEXTEND = "nativesdk"