3 # Check for ath10k (and maybe other) bugs, package them up,
4 # and let user know what to do with them.
7 CRASHDIR
=$TMPLOC/bugcheck
14 echo "LEDE crashlog report" > $CRASHDIR/info.txt
15 date >> $CRASHDIR/info.txt
16 echo >> $CRASHDIR/info.txt
17 echo "uname" >> $CRASHDIR/info.txt
18 uname
-a >> $CRASHDIR/info.txt
19 echo >> $CRASHDIR/info.txt
20 echo "os-release" >> $CRASHDIR/info.txt
21 cat /etc
/os-release
>> $CRASHDIR/info.txt
22 echo >> $CRASHDIR/info.txt
23 echo "os-release" >> $CRASHDIR/info.txt
24 cat /etc
/os-release
>> $CRASHDIR/info.txt
25 echo >> $CRASHDIR/info.txt
26 echo "dmesg output" >> $CRASHDIR/info.txt
27 dmesg
>> $CRASHDIR/info.txt
28 if [ -x /usr
/bin
/lspci
]
30 echo >> $CRASHDIR/info.txt
31 echo "lspci" >> $CRASHDIR/info.txt
32 lspci
>> $CRASHDIR/info.txt
34 echo >> $CRASHDIR/info.txt
35 echo "cpuinfo" >> $CRASHDIR/info.txt
36 cat /proc
/cpuinfo
>> $CRASHDIR/info.txt
37 echo >> $CRASHDIR/info.txt
38 echo "meminfo" >> $CRASHDIR/info.txt
39 cat /proc
/cpuinfo
>> $CRASHDIR/info.txt
40 echo >> $CRASHDIR/info.txt
41 echo "cmdline" >> $CRASHDIR/info.txt
42 cat /proc
/cmdline
>> $CRASHDIR/info.txt
43 echo >> $CRASHDIR/info.txt
44 echo "lsmod" >> $CRASHDIR/info.txt
45 lsmod
>> $CRASHDIR/info.txt
50 # Roll any existing crashes
57 mv $CRASHDIR $CRASHDIR.1
64 # ath10k, check debugfs entries.
65 for i
in /sys
/kernel
/debug
/ieee80211
/*/ath10k
/fw_crash_dump
68 if cat $i > $TMPLOC/ath10k_crash.bin
2>&1
72 #echo "Found ath10k crash data in $i"
75 ADIR
=${i/fw_crash_dump/}
78 if grep -- -ct- $TMPLOC/ath10k_crash.bin
> /dev
/null
2>&1
83 echo "Send bug reports to:" > $CRASHDIR/report_to.txt
84 if [ -f $ADIR/ct_special
-o $CTFW == "1" ]
86 # Looks like this is CT firmware or driver...
87 echo "greearb@candelatech.com" >> $CRASHDIR/report_to.txt
88 echo "and/or report or check for duplicates here:" >> $CRASHDIR/report_to.txt
89 echo "https://github.com/greearb/ath10k-ct/issues" >> $CRASHDIR/report_to.txt
91 # Not sure who would want these bug reports for upstream...
92 echo "https://www.lede-project.org/" >> $CRASHDIR/report_to.txt
94 echo >> $CRASHDIR/report_to.txt
95 echo "Please attach all files in this directory to bug reports." >> $CRASHDIR/report_to.txt
97 mv $TMPLOC/ath10k_crash.bin
$CRASHDIR
99 # Add any more ath10k specific stuff here.
101 # And call generic bug reporting logic
106 if [ $FOUND_BUG == "1" ]
108 # Notify LUCI somehow?
109 echo "bugcheck.sh found an issue to be reported" > /dev
/kmsg
110 echo "See $CRASHDIR for details on how to report this" > /dev
/kmsg
111 # Let calling code know something was wrong.