summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Vetter <daniel.vetter@ffwll.ch>2011-10-30 22:04:39 +0100
committerDaniel Vetter <daniel.vetter@ffwll.ch>2011-10-30 22:04:39 +0100
commit931aa17754bad046f9a1d870894468527cb10c17 (patch)
tree58c56e11d79b3de77b2cb5fca528d589151da12d
parent91b3c7f3338370538feeb080c79a1f506823dee5 (diff)
tools: script to gather bug report data
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
-rw-r--r--tools/Makefile.am5
-rwxr-xr-xtools/intel_gpu_abrt45
2 files changed, 50 insertions, 0 deletions
diff --git a/tools/Makefile.am b/tools/Makefile.am
index bc7fe3a4..0527aded 100644
--- a/tools/Makefile.am
+++ b/tools/Makefile.am
@@ -17,6 +17,9 @@ bin_PROGRAMS = \
forcewaked \
$(NULL)
+bin_SCRIPTS = intel_gpu_abrt \
+ $(NULL)
+
noinst_PROGRAMS = \
intel_dump_decode \
intel_lid \
@@ -36,6 +39,8 @@ intel_bios_reader_SOURCES = \
intel_bios_reader.c \
intel_bios.h
+EXTRA_DIST = $(bin_SCRIPTS)
+
LDADD = ../lib/libintel_tools.la $(DRM_LIBS) $(PCIACCESS_LIBS)
AM_CFLAGS = $(DRM_CFLAGS) $(PCIACCESS_CFLAGS) $(WARN_CFLAGS) \
diff --git a/tools/intel_gpu_abrt b/tools/intel_gpu_abrt
new file mode 100755
index 00000000..141a5246
--- /dev/null
+++ b/tools/intel_gpu_abrt
@@ -0,0 +1,45 @@
+#!/bin/sh
+
+if [ -d /debug/dri ] ; then
+ debugfs_path=/debug_dri
+fi
+
+if [ -d /sys/kernel/debug/dri ] ; then
+ debugfs_path=/sys/kernel/debug/dri
+fi
+
+i915_debugfs=x
+for dir in `ls $debugfs_path` ; do
+ if [ -f $debugfs_path/$dir/i915_error_state ] ; then
+ i915_debugfs=$debugfs_path/$dir
+ break
+ fi
+done
+
+if [ $i915_debugfs = "x" ] ; then
+ echo i915 debugfs path not found.
+ exit 1
+fi
+
+tmpdir=`mktemp -d`
+tardir=$tmpdir/intel_gpu_abrt
+mkdir $tardir
+
+mkdir $tardir/debugfs
+cp $i915_debugfs/* $tardir/debugfs
+
+mkdir $tardir/mod_opts
+cp /sys/module/i915/parameters/* $tardir/mod_opts
+
+mkdir $tardir/X
+cp /var/log/Xorg.*.log $tardir/X
+cp /etc/X11/xorg.conf $tardir/X
+
+dmesg > $tardir/dmesg
+lspci -nn > $tardir/lspci
+
+(cd $tmpdir; tar -c intel_gpu_abrt ) > intel_gpu_abrt.tar
+
+rm $tmpdir -Rf
+
+exit 0