diff options
-rw-r--r-- | tools/Makefile.am | 5 | ||||
-rwxr-xr-x | tools/intel_gpu_abrt | 45 |
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 |