summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZhai Edwin <edwin.zhai@intel.com>2012-04-01 10:24:28 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-04-02 04:26:09 +0100
commitb3ccc630e6c12a75111b1f7ca877e17d8d4e1dc7 (patch)
treee265808f98b8b2bcee1ef00685881d795442cea3
parentfba198ac7efe476a25c5761878ef2fcee97bf9f1 (diff)
downloadopenembedded-core-b3ccc630e6c12a75111b1f7ca877e17d8d4e1dc7.tar.gz
openembedded-core-b3ccc630e6c12a75111b1f7ca877e17d8d4e1dc7.tar.bz2
openembedded-core-b3ccc630e6c12a75111b1f7ca877e17d8d4e1dc7.tar.xz
openembedded-core-b3ccc630e6c12a75111b1f7ca877e17d8d4e1dc7.zip
qemugl: Fix GL apps failure on Ubuntu 11 host with nVidia GLX driver
Previous version of nVidia GLX driver in Ubuntu 10 cause qemu segfault, so we fall back to Mesa GLX driver if detecting nVidia driver installed. From Ubuntu 11, nVidia GLX driver works well, while previous work around cause GL apps failure. So this work around is limited in Ubuntu 10 only, and will be removed in future. [YOCTO #1886] got fixed. Signed-off-by: Zhai Edwin <edwin.zhai@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rwxr-xr-xscripts/runqemu-internal11
1 files changed, 8 insertions, 3 deletions
diff --git a/scripts/runqemu-internal b/scripts/runqemu-internal
index 73b8b41ec..92f245a11 100755
--- a/scripts/runqemu-internal
+++ b/scripts/runqemu-internal
@@ -467,11 +467,15 @@ cat << EOM
WARNING: nVidia proprietary OpenGL libraries detected.
nVidia's OpenGL libraries are known to have compatibility issues with qemu,
resulting in a segfault. Please uninstall these drivers or ensure the mesa libGL
-libraries precede nvidia's via LD_PRELOAD(Already do it on Ubuntu).
+libraries precede nvidia's via LD_PRELOAD(Already do it on Ubuntu 10).
EOM
# Automatically use Ubuntu system's mesa libGL, other distro can add its own path
- if grep -i ubuntu /etc/lsb-release &> /dev/null
+if grep -i ubuntu /etc/lsb-release &> /dev/null
+then
+ # precede nvidia's driver on Ubuntu 10
+ UBUNTU_MAIN_VERSION=`cat /etc/lsb-release |grep DISTRIB_RELEASE |cut -d= -f 2| cut -d. -f 1`
+ if [ $UBUNTU_MAIN_VERSION -eq 10 ];
then
GL_PATH=""
if test -e /usr/lib/libGL.so
@@ -482,10 +486,11 @@ EOM
GL_PATH="/usr/lib/x86_64-linux-gnu/libGL.so"
fi
- echo "Skip nVidia's libGL on Ubuntu!"
+ echo "Skip nVidia's libGL on Ubuntu 10!"
GL_LD_PRELOAD="$GL_PATH $LD_PRELOAD"
fi
fi
+fi
echo "Running $QEMU..."
# -no-reboot is a mandatory option - see bug #100