All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/1] V3: fix qemu segfault with nVidia proprietary driver
@ 2011-03-18  5:23 Zhai Edwin
  2011-03-18  5:23 ` [PATCH 1/1] qemu: Warnings of qemu segfault caused by nVidia's libGL Zhai Edwin
  0 siblings, 1 reply; 3+ messages in thread
From: Zhai Edwin @ 2011-03-18  5:23 UTC (permalink / raw)
  To: poky

From: Zhai Edwin <edwin.zhai@intel.com>

After discussion with Mark, we decide that only give warnings to ender user as
different host os need differnt fix. 

Thanks,
edwin

Pull URL: git://git.pokylinux.org/poky-contrib.git
  Branch: gzhai/fix3
  Browse: http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=gzhai/fix3

Thanks,
    Zhai Edwin <edwin.zhai@intel.com>
---


Zhai Edwin (1):
  qemu: Warnings of qemu segfault caused by nVidia's libGL

 scripts/poky-qemu-internal |   14 +++++++++++++-
 1 files changed, 13 insertions(+), 1 deletions(-)



^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH 1/1] qemu: Warnings of qemu segfault caused by nVidia's libGL
  2011-03-18  5:23 [PATCH 0/1] V3: fix qemu segfault with nVidia proprietary driver Zhai Edwin
@ 2011-03-18  5:23 ` Zhai Edwin
  2011-03-18 16:53   ` Darren Hart
  0 siblings, 1 reply; 3+ messages in thread
From: Zhai Edwin @ 2011-03-18  5:23 UTC (permalink / raw)
  To: poky

From: Zhai Edwin <edwin.zhai@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@intel.com>
Signed-off-by: Darren Hart <dvhart@linux.intel.com>
Signed-off-by: Mark Hatle <mark.hatle@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



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH 1/1] qemu: Warnings of qemu segfault caused by nVidia's libGL
  2011-03-18  5:23 ` [PATCH 1/1] qemu: Warnings of qemu segfault caused by nVidia's libGL Zhai Edwin
@ 2011-03-18 16:53   ` Darren Hart
  0 siblings, 0 replies; 3+ messages in thread
From: Darren Hart @ 2011-03-18 16:53 UTC (permalink / raw)
  To: Zhai Edwin; +Cc: poky



On 03/17/2011 10:23 PM, Zhai Edwin wrote:
> From: Zhai Edwin<edwin.zhai@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@intel.com>
> Signed-off-by: Darren Hart<dvhart@linux.intel.com>
> Signed-off-by: Mark Hatle<mark.hatle@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.
> +    "

Please don't wrap lines with echo, it comes out like this:

************** !!!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.
    
This is why my suggestion used

cat <<EOM
verbatim message
EOM

Also, this doesn't include the comment about the script trying to use LD_PRELOAD.
So this is not the patch I proposed, as such, please do not add my Signed-off-by.

Thanks,

Darren

> +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
> 

-- 
Darren Hart
Intel Open Source Technology Center
Yocto Project - Linux Kernel


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-03-18 16:53 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-18  5:23 [PATCH 0/1] V3: fix qemu segfault with nVidia proprietary driver Zhai Edwin
2011-03-18  5:23 ` [PATCH 1/1] qemu: Warnings of qemu segfault caused by nVidia's libGL Zhai Edwin
2011-03-18 16:53   ` Darren Hart

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.