[poky] [PATCH 1/1] qemu: Warnings of qemu segfault caused by nVidia's libGL
Zhai Edwin
edwin.zhai at intel.com
Thu Mar 17 22:23:41 PDT 2011
From: Zhai Edwin <edwin.zhai at intel.com>
Proprietary nVidia driver introduce its own libGL that precede mesa's.
qemu has segfault if linked with it. This fix give warnings and workaround
to end user.
[YOCTO #649]
[YOCTO #698]
Signed-off-by: Zhai Edwin <edwin.zhai at intel.com>
Signed-off-by: Darren Hart <dvhart at linux.intel.com>
Signed-off-by: Mark Hatle <mark.hatle at windriver.com>
---
scripts/poky-qemu-internal | 14 +++++++++++++-
1 files changed, 13 insertions(+), 1 deletions(-)
diff --git a/scripts/poky-qemu-internal b/scripts/poky-qemu-internal
index 3638a65..5f32447 100755
--- a/scripts/poky-qemu-internal
+++ b/scripts/poky-qemu-internal
@@ -436,10 +436,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
--
1.7.1
More information about the poky
mailing list