summaryrefslogtreecommitdiffstats
path: root/scripts/runqemu-internal
diff options
context:
space:
mode:
authorZhai Edwin <edwin.zhai@intel.com>2012-04-01 02:24:28 (GMT)
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-04-02 03:31:47 (GMT)
commit84b7541abc2d7e59c22891219fce97d320d3bb33 (patch)
treea61a25389d59161495a2df9ccc324149e0393c07 /scripts/runqemu-internal
parent2592a11bde92bb39ca7d2273758e25b73ab5f54d (diff)
downloadpoky-84b7541abc2d7e59c22891219fce97d320d3bb33.tar.gz
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. (From OE-Core rev: b3ccc630e6c12a75111b1f7ca877e17d8d4e1dc7) Signed-off-by: Zhai Edwin <edwin.zhai@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/runqemu-internal')
-rwxr-xr-xscripts/runqemu-internal11
1 files changed, 8 insertions, 3 deletions
diff --git a/scripts/runqemu-internal b/scripts/runqemu-internal
index 73b8b41..92f245a 100755
--- a/scripts/runqemu-internal
+++ b/scripts/runqemu-internal
@@ -467,11 +467,15 @@ cat << EOM
467WARNING: nVidia proprietary OpenGL libraries detected. 467WARNING: nVidia proprietary OpenGL libraries detected.
468nVidia's OpenGL libraries are known to have compatibility issues with qemu, 468nVidia's OpenGL libraries are known to have compatibility issues with qemu,
469resulting in a segfault. Please uninstall these drivers or ensure the mesa libGL 469resulting in a segfault. Please uninstall these drivers or ensure the mesa libGL
470libraries precede nvidia's via LD_PRELOAD(Already do it on Ubuntu). 470libraries precede nvidia's via LD_PRELOAD(Already do it on Ubuntu 10).
471EOM 471EOM
472 472
473# Automatically use Ubuntu system's mesa libGL, other distro can add its own path 473# Automatically use Ubuntu system's mesa libGL, other distro can add its own path
474 if grep -i ubuntu /etc/lsb-release &> /dev/null 474if grep -i ubuntu /etc/lsb-release &> /dev/null
475then
476 # precede nvidia's driver on Ubuntu 10
477 UBUNTU_MAIN_VERSION=`cat /etc/lsb-release |grep DISTRIB_RELEASE |cut -d= -f 2| cut -d. -f 1`
478 if [ $UBUNTU_MAIN_VERSION -eq 10 ];
475 then 479 then
476 GL_PATH="" 480 GL_PATH=""
477 if test -e /usr/lib/libGL.so 481 if test -e /usr/lib/libGL.so
@@ -482,10 +486,11 @@ EOM
482 GL_PATH="/usr/lib/x86_64-linux-gnu/libGL.so" 486 GL_PATH="/usr/lib/x86_64-linux-gnu/libGL.so"
483 fi 487 fi
484 488
485 echo "Skip nVidia's libGL on Ubuntu!" 489 echo "Skip nVidia's libGL on Ubuntu 10!"
486 GL_LD_PRELOAD="$GL_PATH $LD_PRELOAD" 490 GL_LD_PRELOAD="$GL_PATH $LD_PRELOAD"
487 fi 491 fi
488fi 492fi
493fi
489 494
490echo "Running $QEMU..." 495echo "Running $QEMU..."
491# -no-reboot is a mandatory option - see bug #100 496# -no-reboot is a mandatory option - see bug #100