From 503476d0d152f272d8d4168a8016217904289c5b Mon Sep 17 00:00:00 2001 From: Jannis <52237708+heisath@users.noreply.github.com> Date: Sun, 20 Jun 2021 10:42:23 +0200 Subject: [PATCH 1/3] Update 90-helios64-hwmon.rules Proposal of a way to fix the udev problems described here https://forum.armbian.com/topic/18238-armbian-21052-focal-with-linux-51035-rockchip64-fancontrol-die-in-error-fans-not-spinning/?tab=comments#comment-125963 It just combines legacy and current lines so hopefully will work correctly on both. --- packages/bsp/helios64/90-helios64-hwmon.rules | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/bsp/helios64/90-helios64-hwmon.rules b/packages/bsp/helios64/90-helios64-hwmon.rules index 59288d3577..d04937f247 100755 --- a/packages/bsp/helios64/90-helios64-hwmon.rules +++ b/packages/bsp/helios64/90-helios64-hwmon.rules @@ -6,11 +6,13 @@ ACTION=="remove", GOTO="helios64_hwmon_end" KERNELS=="p6-fan", SUBSYSTEMS=="platform", ENV{_HELIOS64_FAN_}="p6", ENV{_IS_HELIOS64_FAN_}="1", ENV{IS_HELIOS64_HWMON}="1" KERNELS=="p7-fan", SUBSYSTEMS=="platform", ENV{_HELIOS64_FAN_}="p7", ENV{_IS_HELIOS64_FAN_}="1", ENV{IS_HELIOS64_HWMON}="1" KERNELS=="2-004c", SUBSYSTEMS=="i2c", DRIVERS=="lm75", ENV{IS_HELIOS64_HWMON}="1" +KERNELS=="thermal_zone0", SUBSYSTEMS=="thermal", ENV{IS_HELIOS64_HWMON}="1" -SUBSYSTEM!="hwmon", GOTO="helios64_hwmon_end" +SUBSYSTEM!="hwmon|thermal", GOTO="helios64_hwmon_end" ENV{HWMON_PATH}="/sys%p" # +ATTR{type}=="soc-thermal", ENV{HWMON_PATH}="/sys%p/temp", ENV{HELIOS64_SYMLINK}="/dev/thermal-cpu/temp1_input", RUN+="/usr/bin/mkdir /dev/thermal-cpu/" ATTR{name}=="cpu", ENV{IS_HELIOS64_HWMON}="1", ENV{HELIOS64_SYMLINK}="/dev/thermal-cpu" # ENV{IS_HELIOS64_HWMON}=="1", ATTR{name}=="lm75", ENV{HELIOS64_SYMLINK}="/dev/thermal-board" From c43b31fe7cc92e82314145965576d025b7114462 Mon Sep 17 00:00:00 2001 From: Jannis <52237708+heisath@users.noreply.github.com> Date: Sun, 20 Jun 2021 10:43:59 +0200 Subject: [PATCH 2/3] Delete 90-helios64-hwmon-legacy.rules --- .../helios64/90-helios64-hwmon-legacy.rules | 24 ------------------- 1 file changed, 24 deletions(-) delete mode 100755 packages/bsp/helios64/90-helios64-hwmon-legacy.rules diff --git a/packages/bsp/helios64/90-helios64-hwmon-legacy.rules b/packages/bsp/helios64/90-helios64-hwmon-legacy.rules deleted file mode 100755 index 5b1d6ebb12..0000000000 --- a/packages/bsp/helios64/90-helios64-hwmon-legacy.rules +++ /dev/null @@ -1,24 +0,0 @@ -# Helios64 persistent hwmon - -ACTION=="remove", GOTO="helios64_hwmon_end" - -# -KERNELS=="p6-fan", SUBSYSTEMS=="platform", ENV{_HELIOS64_FAN_}="p6", ENV{_IS_HELIOS64_FAN_}="1", ENV{IS_HELIOS64_HWMON}="1" -KERNELS=="p7-fan", SUBSYSTEMS=="platform", ENV{_HELIOS64_FAN_}="p7", ENV{_IS_HELIOS64_FAN_}="1", ENV{IS_HELIOS64_HWMON}="1" -KERNELS=="2-004c", SUBSYSTEMS=="i2c", DRIVERS=="lm75", ENV{IS_HELIOS64_HWMON}="1" -KERNELS=="thermal_zone0", SUBSYSTEMS=="thermal", ENV{IS_HELIOS64_HWMON}="1" - -SUBSYSTEM!="hwmon|thermal", GOTO="helios64_hwmon_end" - -ENV{HWMON_PATH}="/sys%p" -# -ATTR{type}=="soc-thermal", ENV{HWMON_PATH}="/sys%p/temp", ENV{HELIOS64_SYMLINK}="/dev/thermal-cpu/temp1_input", RUN+="/usr/bin/mkdir /dev/thermal-cpu/" -# -ENV{IS_HELIOS64_HWMON}=="1", ATTR{name}=="lm75", ENV{HELIOS64_SYMLINK}="/dev/thermal-board" -ENV{_IS_HELIOS64_FAN_}=="1", ENV{HELIOS64_SYMLINK}="/dev/fan-$env{_HELIOS64_FAN_}" - -# -ENV{IS_HELIOS64_HWMON}=="1", RUN+="/bin/ln -sf $env{HWMON_PATH} $env{HELIOS64_SYMLINK}" - -LABEL="helios64_hwmon_end" - From 5104458d7aa75c5a21dabcfa624177cbaa5b5bf7 Mon Sep 17 00:00:00 2001 From: Jannis <52237708+heisath@users.noreply.github.com> Date: Sun, 20 Jun 2021 10:46:10 +0200 Subject: [PATCH 3/3] Update rockchip64_common.inc Update helios64 bsp to only use one set of hwmon rules --- config/sources/families/include/rockchip64_common.inc | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/config/sources/families/include/rockchip64_common.inc b/config/sources/families/include/rockchip64_common.inc index ee8d89a5c3..5d3584b566 100644 --- a/config/sources/families/include/rockchip64_common.inc +++ b/config/sources/families/include/rockchip64_common.inc @@ -408,12 +408,9 @@ family_tweaks_bsp() ### Fancontrol tweaks # copy hwmon rules to fix device mapping - if [[ $BRANCH == legacy ]]; then - install -m 644 $SRC/packages/bsp/helios64/90-helios64-hwmon-legacy.rules $destination/etc/udev/rules.d/ - else - install -m 644 $SRC/packages/bsp/helios64/90-helios64-hwmon.rules $destination/etc/udev/rules.d/ - fi - + # changed to only use one file regardless of branch + install -m 644 $SRC/packages/bsp/helios64/90-helios64-hwmon.rules $destination/etc/udev/rules.d/ + install -m 644 $SRC/packages/bsp/helios64/fancontrol.service.pid-override $destination/etc/systemd/system/fancontrol.service.d/pid.conf # copy fancontrol config