lm-sensors: use standard location for custom conf

Slight modification to package to provide /etc/sensors.d/custom.conf
where users can set hardware-specific configurations. Changed behavior
of package to no longer provide a specific configuration for i386 since
it has so many potential configurations.

Signed-off-by: John Audia <therealgraysky@proton.me>
This commit is contained in:
John Audia
2025-03-26 07:52:49 -04:00
committed by Josef Schlehofer
parent 76530e620b
commit a987403f97
3 changed files with 6 additions and 122 deletions

View File

@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=lm-sensors
PKG_VERSION:=3.6.2
PKG_RELEASE:=1
PKG_RELEASE:=2
PKG_VERSION_SUBST=$(subst .,-,$(PKG_VERSION))
PKG_SOURCE_URL:=https://codeload.github.com/hramrach/lm-sensors/tar.gz/V$(PKG_VERSION_SUBST)?
@@ -74,6 +74,7 @@ endef
define Package/lm-sensors/conffiles
/etc/sensors.conf
/etc/sensors3.conf
/etc/sensors.d
endef
define Build/Compile
@@ -105,10 +106,8 @@ endef
define Package/lm-sensors/install
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/prog/sensors/sensors $(1)/usr/sbin
ifeq ($(ARCH),i386)
$(INSTALL_DIR) $(1)/etc
$(INSTALL_CONF) ./files/sensors.conf $(1)/etc/sensors.conf
endif
$(INSTALL_DIR) $(1)/etc/sensors.d
$(INSTALL_CONF) ./files/custom.conf $(1)/etc/sensors.d/custom.conf
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_BIN) ./files/lm-sensors.init $(1)/etc/init.d/lm-sensors
endef

View File

@@ -0,0 +1,2 @@
# customizations for hardware-specific configurations go in this file
# which will be included by sysupgrade when creating backup tarballs

View File

@@ -1,117 +0,0 @@
chip "pc87366-*"
# Soekris net4801 configuration
# Written by Henrik Brix Andersen <henrik@brixandersen.dk>
# Latest version can be found at http://www.brixandersen.dk/
# The configuration is partly based on the PC87366 datasheet and
# partly borrowed from the env4801 utility by Poul-Henning
# Kamp <phk@phk.freebsd.dk>
# Datasheet: http://www.winbond.com/PDF/APCsheet/PC87366.pdf
# env4801: http://phk.freebsd.dk/soekris/env4801/
# Voltage inputs
ignore vid
# Unknown
# label in0 "avi0"
ignore in0
# Core Voltage, +2.0V
label in1 "VCORE"
set in1_min 1.9
set in1_max 2.1
# VCC, +5.0V
label in2 "VCC"
compute in2 @*2, @/2
# Power Supply Input, +6.0V - +28.0V
label in3 "VPWR"
compute in3 @*20.1, @/20.1
set in3_min 6.0
set in3_max 28.0
# +12V
label in4 "+12V"
compute in4 @*4.83, @/4.83
set in4_min 11
set in4_max 13
# -12V
label in5 "-12V"
# If in10 on your net4801 doesn't have the 3.3V reference, use this
# compute line instead:
# compute in5 (@-3.3)*19.2+3.3, (@-3.3)/19.2+3.3
compute in5 (@-in10)*19.2+in10, (@-in10)/19.2+in10
set in5_min -13
set in5_max -11
# GND, 0V
label in6 "GND"
set in6_min 0
set in6_max 0
# Standby Voltage, +3.3V
# Internally divided by 2
label in7 "Vsb"
compute in7 @*2, @/2
set in7_min 3.0
set in7_max 3.6
# Supply Voltage, +3.3V
# Internally divided by 2
label in8 "Vdd"
compute in8 @*2, @/2
set in8_min 3.0
set in8_max 3.6
# Battery Backup Supply Voltage, +3.0V
label in9 "Vbat"
set in9_min 2.4
set in9_max 3.6
# Analog Supply Voltage, +3.3V
# Internally divided by 2
label in10 "AVdd"
compute in10 @*2, @/2
set in10_min 3.0
set in10_max 3.6
# Temperature inputs
ignore temp1
ignore temp2
# PC87366 Internal Temperature
# PC87366 Recommended Operating Conditions: 0 - 70C
# SC1100 Recommended Operating Conditions: 0 - 85C
label temp3 "Temp"
label temp3_crit "Critical"
set temp3_min 0
set temp3_max 70
set temp3_crit 85
ignore temp4
ignore temp5
ignore temp6
# Fan inputs
ignore fan1
ignore fan2
ignore fan3