Accepting request 1061124 from home:jirislaby
An utility to dump iwl firmware states on errors. OBS-URL: https://build.opensuse.org/request/show/1061124 OBS-URL: https://build.opensuse.org/package/show/hardware/iwlfwdump?expand=0&rev=1
This commit is contained in:
commit
6ed00cc2bf
23
.gitattributes
vendored
Normal file
23
.gitattributes
vendored
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
## Default LFS
|
||||||
|
*.7z filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.bsp filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.gem filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.gz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.jar filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.lz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.lzma filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.obscpio filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.oxt filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.pdf filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.png filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.rpm filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.tbz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.tbz2 filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.tgz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.ttf filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.txz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.whl filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.xz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.zip filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.zst filter=lfs diff=lfs merge=lfs -text
|
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
.osc
|
1
50-iwlfwdump.rules
Normal file
1
50-iwlfwdump.rules
Normal file
@ -0,0 +1 @@
|
|||||||
|
SUBSYSTEM=="devcoredump", ACTION=="add", RUN+="/sbin/iwlfwdump"
|
12
iwlfwdump
Normal file
12
iwlfwdump
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
FAILDRV=$(readlink "/sys/${DEVPATH}/failing_device/driver")
|
||||||
|
FAILDRV=$(basename "$FAILDRV")
|
||||||
|
|
||||||
|
test "$FAILDRV" = 'iwlwifi' || exit 0
|
||||||
|
|
||||||
|
TIMESTAMP=$(date +%Y%m%d-%H%M%S)
|
||||||
|
OUT="/var/log/iwl-fw-error-${TIMESTAMP}.dump"
|
||||||
|
umask 0077
|
||||||
|
cat "/sys/${DEVPATH}/data" > "${OUT}"
|
||||||
|
echo 1 > "/sys/${DEVPATH}/data"
|
4
iwlfwdump.changes
Normal file
4
iwlfwdump.changes
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Jan 26 06:39:14 UTC 2023 - Jiri Slaby <jslaby@suse.cz>
|
||||||
|
|
||||||
|
- initial package
|
52
iwlfwdump.spec
Normal file
52
iwlfwdump.spec
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
#
|
||||||
|
# spec file for package iwlfwdump
|
||||||
|
#
|
||||||
|
# Copyright (c) 2023 SUSE LLC
|
||||||
|
#
|
||||||
|
# All modifications and additions to the file contributed by third parties
|
||||||
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
|
# upon. The license for this file, and modifications and additions to the
|
||||||
|
# file, is the same license as for the pristine package itself (unless the
|
||||||
|
# license for the pristine package is not an Open Source License, in which
|
||||||
|
# case the license is the MIT License). An "Open Source License" is a
|
||||||
|
# license that conforms to the Open Source Definition (Version 1.9)
|
||||||
|
# published by the Open Source Initiative.
|
||||||
|
|
||||||
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
||||||
|
#
|
||||||
|
|
||||||
|
%if ! %{defined _distconfdir}
|
||||||
|
%define _distconfdir %{_sysconfdir}
|
||||||
|
%endif
|
||||||
|
|
||||||
|
Name: iwlfwdump
|
||||||
|
Version: 1
|
||||||
|
Release: 0
|
||||||
|
Summary: Firmware dump utility
|
||||||
|
License: GPL-2.0-only
|
||||||
|
URL: https://wireless.wiki.kernel.org/en/users/drivers/iwlwifi/debugging
|
||||||
|
Source0: 50-iwlfwdump.rules
|
||||||
|
Source1: iwlfwdump
|
||||||
|
Source2: logrotate
|
||||||
|
Recommends: logrotate
|
||||||
|
Buildarch: noarch
|
||||||
|
|
||||||
|
%description
|
||||||
|
An utility to automatically dump firmware dumps to /var/log/.
|
||||||
|
|
||||||
|
%prep
|
||||||
|
|
||||||
|
%build
|
||||||
|
|
||||||
|
%install
|
||||||
|
install -d %{buildroot}%{_sbindir}/ %{buildroot}%_udevrulesdir/ %{buildroot}%{_distconfdir}/logrotate.d/
|
||||||
|
install -m 644 %SOURCE0 %{buildroot}/%{_udevrulesdir}/
|
||||||
|
install -m 755 %SOURCE1 %{buildroot}/%{_sbindir}/
|
||||||
|
install -m 644 %SOURCE2 %{buildroot}/%{_distconfdir}/logrotate.d/%{name}
|
||||||
|
|
||||||
|
%files
|
||||||
|
%_udevrulesdir/50-iwlfwdump.rules
|
||||||
|
%{_sbindir}/iwlfwdump
|
||||||
|
%{_distconfdir}/logrotate.d/%{name}
|
||||||
|
|
||||||
|
%changelog
|
Loading…
x
Reference in New Issue
Block a user