Skip to content

Commit f8a038c

Browse files
committed
helios4: workaround fancontrol for mvebu >=6.18 (no J17 timer patch)
J17 PWM on Helios4 depends on the out-of-tree timer-assignment patch, which is currently .disabled from mvebu-6.18 onwards while it's ported to the refactored pwm chip API. Without the patch, /dev/fan-j17/pwm1 does not appear and fancontrol.service aborts on start. Add a post_family_tweaks_bsp hook in the helios4 board config that comments out the J17 references in /etc/fancontrol when KERNEL_MAJOR_MINOR >= 6.18 (via linux-version compare), keeping the original line as a commented reference so the file also serves as documentation of the historical config. Drop this hook once the patch is ported.
1 parent fdb4b5c commit f8a038c

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

config/boards/helios4.conf

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,22 @@ function post_family_config__helios4_extra_packages() {
2020
add_packages_to_image "fancontrol"
2121
add_packages_to_image "ethtool"
2222
}
23+
24+
# J17 PWM on Helios4 depends on the out-of-tree timer-assignment patch, which
25+
# is currently .disabled from mvebu-6.18 onwards (needs porting to the
26+
# refactored pwm chip API). Comment out original J17 references in
27+
# /etc/fancontrol so the service starts with J10-only; drop this hook once
28+
# the patch is ported and re-enabled.
29+
function post_family_tweaks_bsp__helios4_j17_disable_until_patch_ported() {
30+
linux-version compare "${KERNEL_MAJOR_MINOR}" ge 6.18 || return 0
31+
display_alert "${BOARD}" "fancontrol: commenting out J17 (no >=6.18 timer patch)" "info"
32+
awk '
33+
BEGIN { print "# J17 PWM disabled: mvebu >=6.18 lacks the timer-assignment patch." }
34+
/\/dev\/fan-j17\/pwm1/ {
35+
print "# " $0
36+
gsub(/ \/dev\/fan-j17\/pwm1=[^ ]+/, "")
37+
}
38+
{ print }
39+
' "${destination}/etc/fancontrol" > "${destination}/etc/fancontrol.new"
40+
mv "${destination}/etc/fancontrol.new" "${destination}/etc/fancontrol"
41+
}

0 commit comments

Comments
 (0)