diff --git a/config/boards/helios4.conf b/config/boards/helios4.conf index 4580b7a05d42..efc958a48721 100644 --- a/config/boards/helios4.conf +++ b/config/boards/helios4.conf @@ -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" +} diff --git a/config/sources/families/mvebu.conf b/config/sources/families/mvebu.conf index 33e959c94fae..6248d784e455 100644 --- a/config/sources/families/mvebu.conf +++ b/config/sources/families/mvebu.conf @@ -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 diff --git a/patch/kernel/archive/mvebu-6.12/09-pci-link-retraining.patch.disabled b/patch/kernel/archive/mvebu-6.18/09-pci-link-retraining.patch.disabled similarity index 100% rename from patch/kernel/archive/mvebu-6.12/09-pci-link-retraining.patch.disabled rename to patch/kernel/archive/mvebu-6.18/09-pci-link-retraining.patch.disabled diff --git a/patch/kernel/archive/mvebu-6.12/91-01-libata-add-ledtrig-support.patch.disabled b/patch/kernel/archive/mvebu-6.18/91-01-libata-add-ledtrig-support.patch.disabled similarity index 100% rename from patch/kernel/archive/mvebu-6.12/91-01-libata-add-ledtrig-support.patch.disabled rename to patch/kernel/archive/mvebu-6.18/91-01-libata-add-ledtrig-support.patch.disabled diff --git a/patch/kernel/archive/mvebu-6.12/91-02-Enable-ATA-port-LED-trigger.patch.disabled b/patch/kernel/archive/mvebu-6.18/91-02-Enable-ATA-port-LED-trigger.patch.disabled similarity index 100% rename from patch/kernel/archive/mvebu-6.12/91-02-Enable-ATA-port-LED-trigger.patch.disabled rename to patch/kernel/archive/mvebu-6.18/91-02-Enable-ATA-port-LED-trigger.patch.disabled diff --git a/patch/kernel/archive/mvebu-6.12/92-mvebu-gpio-add_wake_on_gpio_support.patch b/patch/kernel/archive/mvebu-6.18/92-mvebu-gpio-add_wake_on_gpio_support.patch similarity index 100% rename from patch/kernel/archive/mvebu-6.12/92-mvebu-gpio-add_wake_on_gpio_support.patch rename to patch/kernel/archive/mvebu-6.18/92-mvebu-gpio-add_wake_on_gpio_support.patch diff --git a/patch/kernel/archive/mvebu-6.12/92-mvebu-gpio-remove-hardcoded-timer-assignment.patch.disabled b/patch/kernel/archive/mvebu-6.18/92-mvebu-gpio-remove-hardcoded-timer-assignment.patch.disabled similarity index 100% rename from patch/kernel/archive/mvebu-6.12/92-mvebu-gpio-remove-hardcoded-timer-assignment.patch.disabled rename to patch/kernel/archive/mvebu-6.18/92-mvebu-gpio-remove-hardcoded-timer-assignment.patch.disabled diff --git a/patch/kernel/archive/mvebu-6.12/94-helios4-dts-add-wake-on-lan-support.patch b/patch/kernel/archive/mvebu-6.18/94-helios4-dts-add-wake-on-lan-support.patch similarity index 100% rename from patch/kernel/archive/mvebu-6.12/94-helios4-dts-add-wake-on-lan-support.patch rename to patch/kernel/archive/mvebu-6.18/94-helios4-dts-add-wake-on-lan-support.patch diff --git a/patch/kernel/archive/mvebu-6.12/compile-dtb-with-symbol-support.patch.disabled b/patch/kernel/archive/mvebu-6.18/compile-dtb-with-symbol-support.patch.disabled similarity index 100% rename from patch/kernel/archive/mvebu-6.12/compile-dtb-with-symbol-support.patch.disabled rename to patch/kernel/archive/mvebu-6.18/compile-dtb-with-symbol-support.patch.disabled diff --git a/patch/kernel/archive/mvebu-6.12/dts-disable-spi-flash-on-a388-microsom.patch b/patch/kernel/archive/mvebu-6.18/dts-disable-spi-flash-on-a388-microsom.patch similarity index 100% rename from patch/kernel/archive/mvebu-6.12/dts-disable-spi-flash-on-a388-microsom.patch rename to patch/kernel/archive/mvebu-6.18/dts-disable-spi-flash-on-a388-microsom.patch diff --git a/patch/kernel/archive/mvebu-6.12/general-increasing_DMA_block_memory_allocation_to_2048.patch b/patch/kernel/archive/mvebu-6.18/general-increasing_DMA_block_memory_allocation_to_2048.patch similarity index 100% rename from patch/kernel/archive/mvebu-6.12/general-increasing_DMA_block_memory_allocation_to_2048.patch rename to patch/kernel/archive/mvebu-6.18/general-increasing_DMA_block_memory_allocation_to_2048.patch diff --git a/patch/kernel/archive/mvebu-6.12/unlock_atheros_regulatory_restrictions.patch b/patch/kernel/archive/mvebu-6.18/unlock_atheros_regulatory_restrictions.patch similarity index 100% rename from patch/kernel/archive/mvebu-6.12/unlock_atheros_regulatory_restrictions.patch rename to patch/kernel/archive/mvebu-6.18/unlock_atheros_regulatory_restrictions.patch