Skip to content

mvebu: helios4 edge → 6.18 LTS, restore orphaned patches#9694

Merged
igorpecovnik merged 2 commits intoarmbian:mainfrom
iav:helios4/edge-kernel-6.18
Apr 19, 2026
Merged

mvebu: helios4 edge → 6.18 LTS, restore orphaned patches#9694
igorpecovnik merged 2 commits intoarmbian:mainfrom
iav:helios4/edge-kernel-6.18

Conversation

@iav
Copy link
Copy Markdown
Contributor

@iav iav commented Apr 18, 2026

Description

Commit 2f852e6 bumped mvebu edge KERNEL_MAJOR_MINOR from 6.12 to 6.15 but did not rename patch/kernel/archive/mvebu-6.12/, so KERNELPATCHDIR pointed at a non-existent directory and all helios4-specific kernel patches (GPIO wake, Wake-on-LAN, Atheros regd, DMA, SPI-flash) were silently skipped.

6.15 is not an LTS kernel; 6.18 is. This PR bumps only helios4 to 6.18 (LTS, EOL 2028-12) and keeps the rest of the mvebu family at 6.15 — other maintainers can verify the upgrade on their own boards.

The archive directory is renamed to mvebu-6.18 so the patches apply again.

How Has This Been Tested?

  • Kernel built successfully against 6.18.23 (all patches apply).
  • Image flashed and booted on a Helios4 unit.
  • uname -r6.18.23-edge-mvebu.
  • SATA (ahci-mvebu, 2/2 ports), gigabit Ethernet on end1, Wake-on-LAN (ethtool end1Wake-on: g), thermal sensors and SD root on btrfs all operational.

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • My changes generate no new warnings
  • I have tested my code on real hardware

Summary by CodeRabbit

  • Chores
    • Helios4 devices on the Edge channel now use kernel 6.18; other Edge devices remain on 6.15.
  • Bug Fixes
    • On Helios4 with kernel ≥ 6.18, J17 PWM entries in the fan configuration are automatically neutralized at runtime while preserving other configuration content.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 18, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: df0d4522-d00c-4dbc-92bb-7dccad5fd0e9

📥 Commits

Reviewing files that changed from the base of the PR and between f8a038c and 94cd599.

📒 Files selected for processing (1)
  • config/boards/helios4.conf
🚧 Files skipped from review as they are similar to previous changes (1)
  • config/boards/helios4.conf

📝 Walkthrough

Walkthrough

Set KERNEL_MAJOR_MINOR=6.18 for BOARD == helios4 when BRANCH == edge; add a Helios4 post-family hook that, if kernel >= 6.18, comments out and strips J17 PWM assignments from ${destination}/etc/fancontrol.

Changes

Cohort / File(s) Summary
Board-Specific Kernel Version Override
config/sources/families/mvebu.conf
Make KERNEL_MAJOR_MINOR conditional in the edge branch: use 6.18 for BOARD == helios4, otherwise keep 6.15.
Helios4 fancontrol workaround
config/boards/helios4.conf
Add post_family_tweaks_bsp__helios4_j17_disable_until_patch_ported() which checks linux-version compare "${KERNEL_MAJOR_MINOR}" ge 6.18; if true and ${destination}/etc/fancontrol exists/non-empty, write ${destination}/etc/fancontrol.new commenting lines containing /dev/fan-j17/pwm1 and removing =/dev/fan-j17/pwm1=... assignments, then replace the original file.

Sequence Diagram(s)

sequenceDiagram
    participant Dev as Developer
    participant Build as BuildSystem
    participant Hook as Helios4_Hook
    participant Kernel as KernelVersionCheck
    participant FS as Destination_FS

    Dev->>Build: trigger build for helios4 on branch=edge
    Build->>Hook: invoke post_family_tweaks_bsp__helios4_j17_disable_until_patch_ported()
    Hook->>Kernel: linux-version compare KERNEL_MAJOR_MINOR ge 6.18
    Kernel-->>Hook: result (true/false)
    alt result is true
        Hook->>FS: check `${destination}/etc/fancontrol` exists & non-empty
        Hook->>FS: write `${destination}/etc/fancontrol.new` (comment J17 lines, strip pwm1 assignment)
        Hook->>FS: replace fancontrol with fancontrol.new
    else result is false
        Hook-->>Build: no-op
    end
    Build-->>Dev: build completes
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐰 I nibble configs beneath the moonlight,
For Helios4 I set six‑eighteen just right,
I hush the J17 PWM in fancontrol's song,
Other kernels hum their tune and move along,
A rabbit's small tweak—quiet, neat, and bright.

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately reflects the main changes: updating Helios4 edge kernel to 6.18 LTS and restoring previously orphaned patches that were silently skipped.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions bot added size/small PR with less then 50 lines 05 Milestone: Second quarter release Needs review Seeking for review Hardware Hardware related like kernel, U-Boot, ... Patches Patches related to kernel, U-Boot, ... labels Apr 18, 2026
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
config/sources/families/mvebu.conf (1)

32-38: Optional: collapse double assignment into if/else.

Minor readability nit — the initial 6.15 is always assigned and then overwritten for helios4. An if/else makes the board-specific split explicit and avoids the throwaway assignment.

♻️ Proposed refactor
 	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: bump to 6.18 LTS, restore orphaned mvebu patches
-		fi
+		if [[ $BOARD == helios4 ]]; then
+			declare -g KERNEL_MAJOR_MINOR="6.18" # helios4: bump to 6.18 LTS, restore orphaned mvebu patches
+		else
+			declare -g KERNEL_MAJOR_MINOR="6.15" # Major and minor versions of this kernel.
+		fi
 		;;

Otherwise, the change correctly routes helios4 edge builds to KERNELPATCHDIR=mvebu-6.18 so the restored patches apply, while leaving clearfog/other mvebu boards untouched at 6.15 per the PR description.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@config/sources/families/mvebu.conf` around lines 32 - 38, Replace the current
unconditional assign-then-overwrite pattern by making the board decision
explicit: use an if/else on BOARD to set KERNEL_MAJOR_MINOR directly (e.g. if [[
$BOARD == helios4 ]]; then declare -g KERNEL_MAJOR_MINOR="6.18" else declare -g
KERNEL_MAJOR_MINOR="6.15" fi), so the variable KERNEL_MAJOR_MINOR is assigned
once to the correct value rather than being assigned and immediately
overwritten.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@config/sources/families/mvebu.conf`:
- Around line 32-38: Replace the current unconditional assign-then-overwrite
pattern by making the board decision explicit: use an if/else on BOARD to set
KERNEL_MAJOR_MINOR directly (e.g. if [[ $BOARD == helios4 ]]; then declare -g
KERNEL_MAJOR_MINOR="6.18" else declare -g KERNEL_MAJOR_MINOR="6.15" fi), so the
variable KERNEL_MAJOR_MINOR is assigned once to the correct value rather than
being assigned and immediately overwritten.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 4ee76bad-568f-407d-8a47-23d9d6810595

📥 Commits

Reviewing files that changed from the base of the PR and between ef5966a and ad0f9ae.

📒 Files selected for processing (11)
  • config/sources/families/mvebu.conf
  • patch/kernel/archive/mvebu-6.18/09-pci-link-retraining.patch.disabled
  • patch/kernel/archive/mvebu-6.18/91-01-libata-add-ledtrig-support.patch.disabled
  • patch/kernel/archive/mvebu-6.18/91-02-Enable-ATA-port-LED-trigger.patch.disabled
  • patch/kernel/archive/mvebu-6.18/92-mvebu-gpio-add_wake_on_gpio_support.patch
  • patch/kernel/archive/mvebu-6.18/92-mvebu-gpio-remove-hardcoded-timer-assignment.patch.disabled
  • patch/kernel/archive/mvebu-6.18/94-helios4-dts-add-wake-on-lan-support.patch
  • patch/kernel/archive/mvebu-6.18/compile-dtb-with-symbol-support.patch.disabled
  • patch/kernel/archive/mvebu-6.18/dts-disable-spi-flash-on-a388-microsom.patch
  • patch/kernel/archive/mvebu-6.18/general-increasing_DMA_block_memory_allocation_to_2048.patch
  • patch/kernel/archive/mvebu-6.18/unlock_atheros_regulatory_restrictions.patch

Commit 2f852e6 bumped mvebu edge KERNEL_MAJOR_MINOR from 6.12 to 6.15
but did not rename patch/kernel/archive/mvebu-6.12/, so KERNELPATCHDIR
pointed to a non-existent directory and all helios4-specific kernel
patches (GPIO wake, Wake-on-LAN, atheros regd, DMA, SPI-flash) were
silently skipped.

6.15 is not an LTS kernel; 6.18 is. Bump only helios4 to 6.18 (LTS, EOL
2028-12), keeping the rest of the mvebu family at 6.15 until their
maintainers verify the upgrade on their own boards.

Rename the archive directory to mvebu-6.18 so the patches apply again,
verified by a full kernel build against 6.18.23.
@iav iav force-pushed the helios4/edge-kernel-6.18 branch 2 times, most recently from 7dffdce to f8a038c Compare April 19, 2026 00:40
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@config/boards/helios4.conf`:
- Around line 28-40: The hook
post_family_tweaks_bsp__helios4_j17_disable_until_patch_ported must first check
that "${destination}/etc/fancontrol" exists and is non-empty and return early if
not to avoid running awk and mv on a missing file; then adjust the awk gsub
pattern so it doesn't require a leading space (e.g., match a word boundary
before /dev/fan-j17/pwm1 or simply remove the leading-space from the regex) so
lines where the j17 entry appears at line start (like FCTEMPS=... ) are handled
correctly; keep the rest of the awk flow and the safe rename of fancontrol.new
to fancontrol.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: db5bcce1-acee-4a27-9250-e9cfca1e7969

📥 Commits

Reviewing files that changed from the base of the PR and between fdb4b5c and 7dffdce.

📒 Files selected for processing (1)
  • config/boards/helios4.conf

Comment thread config/boards/helios4.conf
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.
@iav iav force-pushed the helios4/edge-kernel-6.18 branch from f8a038c to 94cd599 Compare April 19, 2026 01:22
@iav iav requested review from aprayoga and prahal April 19, 2026 01:44
@github-actions github-actions bot added the Ready to merge Reviewed, tested and ready for merge label Apr 19, 2026
@github-actions
Copy link
Copy Markdown
Contributor

✅ This PR has been reviewed and approved — all set for merge!

@github-actions github-actions bot removed the Needs review Seeking for review label Apr 19, 2026
@github-actions
Copy link
Copy Markdown
Contributor

✅ This PR has been reviewed and approved — all set for merge!

@igorpecovnik igorpecovnik merged commit 69d856f into armbian:main Apr 19, 2026
16 checks passed
@iav iav deleted the helios4/edge-kernel-6.18 branch April 20, 2026 15:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

05 Milestone: Second quarter release Hardware Hardware related like kernel, U-Boot, ... Patches Patches related to kernel, U-Boot, ... Ready to merge Reviewed, tested and ready for merge size/small PR with less then 50 lines

Development

Successfully merging this pull request may close these issues.

3 participants