Skip to content

Commit 7dffdce

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 against mvebu-6.18 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, 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 7dffdce

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

config/boards/helios4.conf

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,21 @@ 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 against mvebu-6.18 (needs porting to the refactored
26+
# pwm chip API). Comment out original J17 references in /etc/fancontrol so the
27+
# service starts with J10-only; drop this hook once the patch is ported.
28+
function post_family_tweaks_bsp__helios4_j17_disable_until_patch_ported() {
29+
[[ "${KERNEL_MAJOR_MINOR}" != "6.18" ]] && return 0
30+
display_alert "${BOARD}" "fancontrol: commenting out J17 (no 6.18 timer patch)" "info"
31+
awk '
32+
BEGIN { print "# J17 PWM disabled: mvebu-6.18 lacks the timer-assignment patch." }
33+
/\/dev\/fan-j17\/pwm1/ {
34+
print "# " $0
35+
gsub(/ \/dev\/fan-j17\/pwm1=[^ ]+/, "")
36+
}
37+
{ print }
38+
' "${destination}/etc/fancontrol" > "${destination}/etc/fancontrol.new"
39+
mv "${destination}/etc/fancontrol.new" "${destination}/etc/fancontrol"
40+
}

0 commit comments

Comments
 (0)