diff options
author | Florian Eckert <fe@dev.tdt.de> | 2023-08-07 11:15:28 +0200 |
---|---|---|
committer | Florian Eckert <fe@dev.tdt.de> | 2023-12-05 13:38:41 +0100 |
commit | fd9d1e90b49cdcb1ebd53a0b4e1eaa4353a974f7 (patch) | |
tree | 55d9e0febc6a66d8c2bf1f139df848a79b3d74f1 /package | |
parent | 5fec4d6cd52a8848d13b29df1f8a679bd59b98e5 (diff) | |
download | openwrt-fd9d1e90b49cdcb1ebd53a0b4e1eaa4353a974f7.tar.gz openwrt-fd9d1e90b49cdcb1ebd53a0b4e1eaa4353a974f7.tar.bz2 openwrt-fd9d1e90b49cdcb1ebd53a0b4e1eaa4353a974f7.zip |
tools: add tmon package
Add the 'tmon' packages. This is as a tool to help visualize,
tune, and test the complex thermal subsystem.
We get a compile warning for the tool that the printf format does not
fit. This commit contains a patch that fixes this warning. This patch
has also been sent upstream to the Linux kernel [1].
Links:
[1] https://lore.kernel.org/all/20231204141335.2798194-1-fe@dev.tdt.de/
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
Diffstat (limited to 'package')
-rw-r--r-- | package/devel/tmon/Makefile | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/package/devel/tmon/Makefile b/package/devel/tmon/Makefile new file mode 100644 index 0000000000..6f9182ce9a --- /dev/null +++ b/package/devel/tmon/Makefile @@ -0,0 +1,53 @@ +include $(TOPDIR)/rules.mk +include $(INCLUDE_DIR)/kernel.mk + +PKG_NAME:=tmon +PKG_VERSION:=$(LINUX_VERSION) +PKG_RELEASE:=1 + +PKG_MAINTAINER:=Florian Eckert <fe@dev.tdt.de> +PKG_LICENSE:=GPL-2.0-only + +include $(INCLUDE_DIR)/package.mk + +define Package/tmon + SECTION:=devel + CATEGORY:=Development + TITLE:=Thermal monitoring and testing tool + VERSION:=$(LINUX_VERSION)-$(PKG_RELEASE) + URL:=http://www.kernel.org + DEPENDS:=+libncursesw +endef + +define Package/tmon/description + As hardware vendors cope with the thermal constraints on their products, + more and more sensors are added, new cooling capabilities are introduced. + To expose such relationship to the userspace, Linux generic thermal layer + introduced sysfs entry at /sys/class/thermal with a matrix of symbolic + links, trip point bindings, and device instances. To traverse such + matrix by hand is not a trivial task. + 'TMON' is conceived as a tool to help visualize, tune, and test the + complex thermal subsystem. +endef + +MAKE_FLAGS = \ + ARCH="$(LINUX_KARCH)" \ + CROSS_COMPILE="$(TARGET_CROSS)" \ + CC="$(TARGET_CC)" \ + CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS)" \ + LDFLAGS="$(TARGET_LDFLAGS)" + +define Build/Compile + -$(MAKE) clean \ + -C $(LINUX_DIR)/tools/thermal/tmon + +$(MAKE_FLAGS) $(MAKE) \ + -C $(LINUX_DIR)/tools/thermal/tmon +endef + +define Package/tmon/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(LINUX_DIR)/tools/thermal/tmon/tmon \ + $(1)/usr/bin/ +endef + +$(eval $(call BuildPackage,tmon)) |