aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorDarren Hart <dvhart@linux.intel.com>2011-03-18 10:18:48 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-03-18 23:18:58 +0000
commit2247ffe954b5a71f82944d23141c836b38716654 (patch)
treeb80af7163398273e9b3caf0800ad76bbe4583c11 /scripts
parent4e592efe8c5ff918a77f7b7b2c17a6b698b1dd68 (diff)
downloadopenembedded-core-2247ffe954b5a71f82944d23141c836b38716654.tar.gz
qemu: warn user if nVidia libGL is detected (leads to qemu segfault)
nVidia's OpenGL libraries are known to have compatibility issues with qemu, resulting in a segfault. As different workarounds are required for the different distributions, just warn the user to explain the qemu segfault to follow, and suggest a workaround using LD_PRELOAD. [YOCTO #649] [YOCTO #698] (Original patch from Edwin, Darren modified warning and git commit wording) Signed-off-by: Darren Hart <dvhart@linux.intel.com> CC: Mark Hatle <mark.hatle@windriver.com> CC: Zhai Edwin <edwin.zhai@intel.com>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/poky-qemu-internal14
1 files changed, 13 insertions, 1 deletions
diff --git a/scripts/poky-qemu-internal b/scripts/poky-qemu-internal
index 046e2b6e04..0f0f799f50 100755
--- a/scripts/poky-qemu-internal
+++ b/scripts/poky-qemu-internal
@@ -442,10 +442,22 @@ else
echo "Warning: distccd not present, no distcc support loaded."
fi
+# qemu got segfault if linked with nVidia's libgl
+if ldd $QEMUBIN | grep -i nvidia &> /dev/null
+then
+ echo "************** !!!Warning!!! **************
+ nVidia's proprietary 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.
+ "
+fi
+
echo "Running $QEMU..."
# -no-reboot is a mandatory option - see bug #100
echo $QEMUBIN -kernel $KERNEL $QEMUOPTIONS $SERIALOPTS -no-reboot $SCRIPT_QEMU_OPT $SCRIPT_QEMU_EXTRA_OPT --append '"'$KERNCMDLINE $SCRIPT_KERNEL_OPT'"'
-$QEMUBIN -kernel $KERNEL $QEMUOPTIONS $SERIALOPTS -no-reboot $SCRIPT_QEMU_OPT $SCRIPT_QEMU_EXTRA_OPT --append "$KERNCMDLINE $SCRIPT_KERNEL_OPT" || /bin/true
+# If QEMU crashes, we need to run stty sane
+$QEMUBIN -kernel $KERNEL $QEMUOPTIONS $SERIALOPTS -no-reboot $SCRIPT_QEMU_OPT $SCRIPT_QEMU_EXTRA_OPT --append "$KERNCMDLINE $SCRIPT_KERNEL_OPT" || stty sane
+
cleanup