Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions config/boards/helios4.conf
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,23 @@ function post_family_config__helios4_extra_packages() {
add_packages_to_image "fancontrol"
add_packages_to_image "ethtool"
}

# J17 PWM on Helios4 depends on the out-of-tree timer-assignment patch, which
# is currently .disabled from mvebu-6.18 onwards (needs porting to the
# refactored pwm chip API). Comment out original J17 references in
# /etc/fancontrol so the service starts with J10-only; drop this hook once
# the patch is ported and re-enabled.
function post_family_tweaks_bsp__helios4_j17_disable_until_patch_ported() {
linux-version compare "${KERNEL_MAJOR_MINOR}" ge 6.18 || return 0
[[ -s "${destination}/etc/fancontrol" ]] || return 0
display_alert "${BOARD}" "fancontrol: commenting out J17 (no >=6.18 timer patch)" "info"
awk '
BEGIN { print "# J17 PWM disabled: mvebu >=6.18 lacks the timer-assignment patch." }
/\/dev\/fan-j17\/pwm1/ {
print "# " $0
gsub(/ ?\/dev\/fan-j17\/pwm1=[^ ]+/, "")
}
{ print }
' "${destination}/etc/fancontrol" > "${destination}/etc/fancontrol.new"
mv "${destination}/etc/fancontrol.new" "${destination}/etc/fancontrol"
}
Comment thread
coderabbitai[bot] marked this conversation as resolved.
6 changes: 5 additions & 1 deletion config/sources/families/mvebu.conf
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,11 @@ case $BRANCH in

edge)

declare -g KERNEL_MAJOR_MINOR="6.15" # Major and minor versions of this kernel.
if [[ $BOARD == helios4 ]]; then
declare -g KERNEL_MAJOR_MINOR="6.18" # helios4: 6.18 LTS, restore orphaned mvebu patches
else
declare -g KERNEL_MAJOR_MINOR="6.15" # Major and minor versions of this kernel.
fi
;;

esac
Expand Down
Loading