diff options
-rw-r--r-- | meta/classes/image-swab.bbclass | 1 | ||||
-rw-r--r-- | meta/conf/machine/qemux86-64.conf | 4 | ||||
-rw-r--r-- | meta/conf/machine/qemux86.conf | 4 | ||||
-rw-r--r-- | meta/recipes-graphics/mesa/qemugl/call_opengl_fix.patch | 94 | ||||
-rw-r--r-- | meta/recipes-graphics/mesa/qemugl/extensions_emulation.patch | 34 | ||||
-rw-r--r-- | meta/recipes-graphics/mesa/qemugl/remove-x11r6-lib-dir.patch | 21 | ||||
-rw-r--r-- | meta/recipes-graphics/mesa/qemugl/versionfix.patch | 32 | ||||
-rw-r--r-- | meta/recipes-graphics/mesa/qemugl_git.bb | 50 |
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 = "" PARALLEL_MAKE_pn-opkg = "" PARALLEL_MAKE_pn-pkgconfig = "" PARALLEL_MAKE_pn-prelink = "" -PARALLEL_MAKE_pn-qemugl = "" PARALLEL_MAKE_pn-rpm = "" PARALLEL_MAKE_pn-tcl = "" PARALLEL_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" SERIAL_CONSOLE = "115200 ttyS0" -# We bypass swrast but we need it to be present for X to load correctly XSERVER ?= "xserver-xorg \ mesa-dri-driver-swrast \ xf86-input-vmmouse \ xf86-input-keyboard \ xf86-input-evdev \ - xf86-video-vmware \ - qemugl" + xf86-video-vmware" require conf/machine/include/qemu.inc 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" SERIAL_CONSOLE = "115200 ttyS0" -# We bypass swrast but we need it to be present for X to load correctly XSERVER ?= "xserver-xorg \ mesa-dri-driver-swrast \ xf86-input-vmmouse \ xf86-input-keyboard \ xf86-input-evdev \ - xf86-video-vmware \ - qemugl" + xf86-video-vmware" require conf/machine/include/qemu.inc 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 @@ -Save registers via local variables instead of simple "push", so that gcc become -aware of this operation and avoid stack disorder. - -opengl calling (in call_opengl_qemu) includes 4 steps: -1. prepare opengl parameters on stack -2. save some "input" register by push -3. load "input" register with parameters on stack via same index as step 1 -4. issue "int 0x99" to trap into qemu, who will get parameter in the registers - -New gcc uses "%esp" rather than "%ebp" to index local variable in stack, which -leads wrong index in step 3, as push decrease "%esp" automatically. Saving -registers via local variables to fix it. - -Upstream-Status: Pending - -Signed-off-by: Zhai Edwin <edwin.zhai@intel.com> -Index: git/opengl_client.c -=================================================================== ---- git.orig/opengl_client.c 2012-02-28 15:26:28.000000000 +0800 -+++ git/opengl_client.c 2012-02-28 15:29:18.000000000 +0800 -@@ -1076,23 +1076,29 @@ - { - #if defined(__i386__) - int ret; -+ int bx, cx, dx, si; - #ifdef WIN32 - __asm__ ("pushl %0;pushl %%fs:0;movl %%esp,%%fs:0;" : : "g" (win32_sigsegv_handler)); - #endif -- __asm__ ("push %ebx"); -- __asm__ ("push %ecx"); -- __asm__ ("push %edx"); -- __asm__ ("push %esi"); -+ /* save registers before opengl call */ -+ __asm__ ("mov %%ebx, %0"::"m"(bx)); -+ __asm__ ("mov %%ecx, %0"::"m"(cx)); -+ __asm__ ("mov %%edx, %0"::"m"(dx)); -+ __asm__ ("mov %%esi, %0"::"m"(si)); -+ - __asm__ ("mov %0, %%eax"::"m"(func_number)); - __asm__ ("mov %0, %%ebx"::"m"(pid)); - __asm__ ("mov %0, %%ecx"::"m"(ret_string)); - __asm__ ("mov %0, %%edx"::"m"(args)); - __asm__ ("mov %0, %%esi"::"m"(args_size)); - __asm__ ("int $0x99"); -- __asm__ ("pop %esi"); -- __asm__ ("pop %edx"); -- __asm__ ("pop %ecx"); -- __asm__ ("pop %ebx"); -+ -+ /* restore registers */ -+ __asm__ ("mov %0, %%ebx"::"m"(bx)); -+ __asm__ ("mov %0, %%ecx"::"m"(cx)); -+ __asm__ ("mov %0, %%edx"::"m"(dx)); -+ __asm__ ("mov %0, %%esi"::"m"(si)); -+ - __asm__ ("mov %%eax, %0"::"m"(ret)); - #ifdef WIN32 - __asm__ ("movl (%%esp),%%ecx;movl %%ecx,%%fs:0;addl $8,%%esp;" : : : "%ecx"); -@@ -1100,20 +1106,27 @@ - return ret; - #elif defined(__x86_64__) - int ret; -- __asm__ ("push %rbx"); -- __asm__ ("push %rcx"); -- __asm__ ("push %rdx"); -- __asm__ ("push %rsi"); -+ long bx, cx, dx, si; -+ -+ /* save registers before opengl call */ -+ __asm__ ("mov %%rbx, %0"::"m"(bx)); -+ __asm__ ("mov %%rcx, %0"::"m"(cx)); -+ __asm__ ("mov %%rdx, %0"::"m"(dx)); -+ __asm__ ("mov %%rsi, %0"::"m"(si)); -+ - __asm__ ("mov %0, %%eax"::"m"(func_number)); - __asm__ ("mov %0, %%ebx"::"m"(pid)); - __asm__ ("mov %0, %%rcx"::"m"(ret_string)); - __asm__ ("mov %0, %%rdx"::"m"(args)); - __asm__ ("mov %0, %%rsi"::"m"(args_size)); - __asm__ ("int $0x99"); -- __asm__ ("pop %rsi"); -- __asm__ ("pop %rdx"); -- __asm__ ("pop %rcx"); -- __asm__ ("pop %rbx"); -+ -+ /* restore registers */ -+ __asm__ ("mov %0, %%rbx"::"m"(bx)); -+ __asm__ ("mov %0, %%rcx"::"m"(cx)); -+ __asm__ ("mov %0, %%rdx"::"m"(dx)); -+ __asm__ ("mov %0, %%rsi"::"m"(si)); -+ - __asm__ ("mov %%eax, %0"::"m"(ret)); - return ret; - #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 @@ -Hide some GLX extensions by default to avoid guest call missing GLX API. It's -hacky to implement these APIs, so hide these extensions as fix. - -Upstream-Status: Pending - -Signed-off-by: Zhai Edwin <edwin.zhai@intel.com> - -Index: git/opengl_client.c -=================================================================== ---- git.orig/opengl_client.c 2012-03-16 18:22:27.000000000 +0800 -+++ git/opengl_client.c 2012-03-16 18:52:06.000000000 +0800 -@@ -105,6 +105,12 @@ - "NO_MOVE", /* default : set if TCP/IP communication */ - }; - -+/* Hiding some GLX extensions from guest */ -+static const char* hiding_extensions = -+ "GLX_MESA_copy_sub_buffer,\ -+ GLX_MESA_multithread_makecurrent,\ -+ GLX_MESA_swap_control,\ -+ "; - - #ifdef WIN32 - -@@ -3516,7 +3522,8 @@ - static void removeUnwantedExtensions(char* ret) - { - char* toBeRemoved = getenv("GL_REMOVE_EXTENSIONS"); -- if (toBeRemoved == NULL) return; -+ if (toBeRemoved == NULL) -+ toBeRemoved = hiding_extensions; - toBeRemoved = strdup(toBeRemoved); - char* iterToBeRemoved = toBeRemoved; - 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 @@ -Remove X11R6 lib directory - -"-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. - -Upstream-Status: Pending - -Signed-off-by: Yu Ke <ke.yu@intel.com> - -diff --git a/Makefile b/Makefile -index 9e5a8ea..f3a082a 100644 ---- a/Makefile -+++ b/Makefile -@@ -3,7 +3,7 @@ GL_CFLAGS := -Wall -g -O2 -fno-strict-aliasing - all: libGL.so.1.2 - - 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 -- $(CC) -fPIC $(GL_CFLAGS) opengl_client.c -shared -o libGL.so.1.2 -lX11 -lXfixes -lm -L$(D)/usr/X11R6/lib -lpthread -I. -+ $(CC) -fPIC $(GL_CFLAGS) opengl_client.c -shared -o libGL.so.1.2 -lX11 -lXfixes -lm -lpthread -I. - - opengl_func.h: gl_func.h - 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 @@ -Upstream-Status: Pending - -Index: git/Makefile -=================================================================== ---- git.orig/Makefile 2009-01-19 23:37:36.000000000 +0000 -+++ git/Makefile 2009-06-09 20:30:37.000000000 +0100 -@@ -1,9 +1,9 @@ - GL_CFLAGS := -Wall -g -O2 -fno-strict-aliasing - --all: libGL.so -+all: libGL.so.1.2 - --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 -- $(CC) -fPIC $(GL_CFLAGS) opengl_client.c -shared -o libGL.so -lX11 -lXfixes -lm -L$(D)/usr/X11R6/lib -lpthread -I. -+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 -+ $(CC) -fPIC $(GL_CFLAGS) opengl_client.c -shared -o libGL.so.1.2 -lX11 -lXfixes -lm -L$(D)/usr/X11R6/lib -lpthread -I. - - opengl_func.h: gl_func.h - -Index: git/opengl_client.c -=================================================================== ---- git.orig/opengl_client.c 2009-06-09 21:07:15.000000000 +0100 -+++ git/opengl_client.c 2009-06-09 21:07:33.000000000 +0100 -@@ -11578,7 +11578,7 @@ - tab_assoc = calloc(tabSize, sizeof(AssocProcAdress)); - - #ifndef WIN32 -- handle = dlopen(getenv("REAL_LIBGL") ? getenv("REAL_LIBGL") : "libGL.so" ,RTLD_LAZY); -+ handle = dlopen(getenv("REAL_LIBGL") ? getenv("REAL_LIBGL") : "libGL.so.1.2" ,RTLD_LAZY); - if (!handle) { - log_gl("%s\n", dlerror()); - 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 @@ -DESCRIPTION = "QEMU i386 OpenGL passtrough" -HOMEPAGE = "http://savannah.nongnu.org/projects/qemugl" -SECTION = "x11/drivers" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://opengl_client.c;beginline=4;endline=23;md5=a7dbe915be5fb5df8fd496f348ed9a05 \ - file://parse_mesa_get_c.c;befinline=4;endline=23;md5=a55f258f32720c9565a425a3956bcb5e" - -DEPENDS = "virtual/libx11 xproto glproto libxfixes" - -COMPATIBLE_HOST = '(x86_64.*|i.86.*)-(linux|freebsd.*)' - -SRC_URI = "git://git.yoctoproject.org/qemugl;protocol=git \ - file://versionfix.patch \ - file://remove-x11r6-lib-dir.patch \ - file://call_opengl_fix.patch \ - file://extensions_emulation.patch" -S = "${WORKDIR}/git" - -SRCREV = "d888bbc723c00d197d34a39b5b7448660ec1b1c0" - -PV = "0.0+git${SRCPV}" -PR = "r11" - -DEFAULT_PREFERENCE = "-1" - -do_install () { - install -d ${D}${libdir}/ - if [ "${PN}" != "nativesdk-qemugl" ]; then - install -m 0755 ${S}/libGL.so.1.2 ${D}${libdir}/libGL-qemu.so.1.2 - else - install -m 0755 ${S}/libGL.so.1.2 ${D}${libdir}/libGL.so.1.2 - ln -s libGL.so.1.2 ${D}${libdir}/libGL.so.1 - ln -s libGL.so.1 ${D}${libdir}/libGL.so - fi -} - -# This cannot be converted to run at pacakge install time, because -# it depends on being run after the libgl1 package is installed, -# and RPM cannot guarantee the order of pacakge insallation. -pkg_postinst_${PN} () { -#!/bin/sh -e -if [ x"$D" = "x" ]; then - rm -f ${libdir}/libGL.so.1.2 - ln -s libGL-qemu.so.1.2 ${libdir}/libGL.so.1.2 -else - exit 1 -fi -} - -BBCLASSEXTEND = "nativesdk" |