ct-bugcheck: Add tools to poll for and report ath10k firmware crashes.
[openwrt/openwrt.git] / package / utils / ct-bugcheck / Makefile
1 #
2 # Copyright (C) 2016 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9 include $(INCLUDE_DIR)/kernel.mk
10
11 PKG_NAME:=ct-bugcheck
12 PKG_RELEASE:=2016-07-21
13
14 include $(INCLUDE_DIR)/package.mk
15
16 define Package/ct-bugcheck
17 SECTION:=utils
18 CATEGORY:=Utilities
19 TITLE:=Bug checking and reporting utility
20 VERSION:=$(PKG_RELEASE)
21 MAINTAINER:=Ben Greear <greearb@candelatech.com>
22 endef
23
24 define Package/ct-bugcheck/description
25 Scripts to check for bugs (like firmware crashes) and package them for reporting.
26 Currently this script only checks for ath10k firmware crashes.
27 Once installed, you can enable this tool by creating a file called
28 /etc/config/bugcheck with the following contents:
29 DO_BUGCHECK=1
30 export DO_BUGCHECK
31
32 endef
33
34 define Build/Prepare
35 $(CP) src/bugcheck.sh $(PKG_BUILD_DIR)/
36 $(CP) src/bugchecker.sh $(PKG_BUILD_DIR)/
37 $(CP) src/bugcheck.initd $(PKG_BUILD_DIR)/
38 endef
39
40 define Build/Compile
41 true
42 endef
43
44 define Package/ct-bugcheck/install
45 $(INSTALL_DIR) $(1)/usr/bin
46 $(INSTALL_DIR) $(1)/etc/init.d
47 $(INSTALL_BIN) $(PKG_BUILD_DIR)/bugcheck.sh $(1)/usr/bin/
48 $(INSTALL_BIN) $(PKG_BUILD_DIR)/bugchecker.sh $(1)/usr/bin/
49 $(INSTALL_BIN) $(PKG_BUILD_DIR)/bugcheck.initd $(1)/etc/init.d/bugcheck
50 endef
51
52 $(eval $(call BuildPackage,ct-bugcheck))