Skip to content

Conversation

@tabrisnet
Copy link
Contributor

@tabrisnet tabrisnet commented Oct 15, 2025

Description

Fixes for 6.16-rsslro kernel config, also update to 6.16.12.
Basically took the OpenWRT defconfig, fed it through rewrite-kernel-config, then manually added back as much stuff as I could find including copying the lines missing vs diff -pu linux-filogic-current.config linux-filogic-edge.config.
For review purposes, assume that most of the config/kernel/linux-filogic-edge.config changes are not interesting.
Yes, this means you: @coderabbitai.
This likely only deserves a tag of size/small.

How Has This Been Tested?

@github-actions github-actions bot added 11 Milestone: Fourth quarter release size/large PR with 250 lines or more Needs review Seeking for review Hardware Hardware related like kernel, U-Boot, ... labels Oct 15, 2025
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 15, 2025

Walkthrough

This PR replaces the filogic edge kernel config file (config/kernel/linux-filogic-edge.config) with a large reconfiguration: many CONFIG_* symbols are added or changed across CPUfreq, ARM64 errata/arch options, randomization/energy model, perf/cgroups, netfilter/nf_tables/xtables/IPv4/IPv6/IPVS, tunneling/IPSEC/MPTCP, extensive driver/PHY/USB/PCIe/MTK hardware entries, crypto algorithms and ARM64 crypto offloads, filesystems (NFS/CIFS/XFS/EXT4/UBIFS/SquashFS/ZRAM/overlayfs), module system options (module compression/unload), and various debug/hardening options. Separately, config/sources/families/filogic.conf gains only commented alternative kernel source/branch lines and a comment; no active kernel source or branch assignments were changed.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Possibly related PRs

Suggested reviewers

  • chainsx
  • chraac
  • krachlatte
  • EvilOlaf
  • igorpecovnik
  • rpardini

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Title Check ✅ Passed The pull request title "filogic/bpi-r4 - fix edge kernel config" clearly and concisely summarizes the main change in the changeset. The modifications are primarily focused on updating and fixing the kernel configuration for the filogic/bpi-r4 device on the edge branch, as evidenced by the substantial changes to config/kernel/linux-filogic-edge.config along with a minor update to config/sources/families/filogic.conf. The title accurately captures this core objective without unnecessary details or vague terms, making it clear to teammates scanning the history that this PR is about kernel configuration fixes for a specific hardware platform.
Description Check ✅ Passed The pull request description is clearly related to the changeset and provides meaningful context about the changes. It explains that the PR fixes the 6.16-rsslro kernel config and updates to 6.16.12, describes the process taken (conversion from OpenWRT defconfig through rewrite-kernel-config with manual additions), documents the testing performed (built/deployed with RSS/LRO benchmarking), and sets appropriate expectations for reviewers. The description is specific and informative rather than vague or generic, making it well-suited for the lenient evaluation criteria of this check.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Jira integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 094f00b and 5792470.

⛔ Files ignored due to path filters (4)
  • patch/kernel/archive/filogic-6.16/patches.armbian/0001-6.16.12.diff is excluded by !patch/**
  • patch/kernel/archive/filogic-6.16/patches.armbian/mt7988a-bananapi-bpi-r4-sd.patch is excluded by !patch/**
  • patch/kernel/archive/filogic-6.16/series.armbian is excluded by !patch/**
  • patch/kernel/archive/filogic-6.16/series.conf is excluded by !patch/**
📒 Files selected for processing (2)
  • config/kernel/linux-filogic-edge.config (15 hunks)
  • config/sources/families/filogic.conf (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • config/sources/families/filogic.conf
🧰 Additional context used
🧠 Learnings (1)
📓 Common learnings
Learnt from: tabrisnet
PR: armbian/build#0
File: :0-0
Timestamp: 2025-08-30T04:13:16.457Z
Learning: Armbian kernel configuration files like linux-filogic-current.config are autogenerated overlays on top of arch defconfig. Comments added manually will be lost during future updates by maintainers, and explicit "CONFIG_OPTION is not set" statements aren't needed for mutually exclusive options since these are overlay configs that only specify changes from the base configuration.
🔇 Additional comments (1)
config/kernel/linux-filogic-edge.config (1)

1-840: Kernel config structure and additions look sound; recommend build and functional verification.

The configuration file follows proper kernel config syntax throughout, and the additions span expected subsystems for an edge/router platform: CPUfreq governors, extensive netfilter/nftables, crypto algorithms with ARM64 acceleration, filesystems, wireless drivers, and Mediatek-specific hardware support. Security features like RANDOMIZE_BASE, HARDENED_USERCOPY, and FORTIFY_SOURCE are enabled.

However, kernel configuration correctness is difficult to validate statically without board-specific knowledge and runtime testing. The PR description notes the rewrite was based on OpenWRT defconfig, processed through rewrite-kernel-config, and manually corrected—a reasonable approach. Per the learnings, remember that manual comments in overlay configs will be lost during future auto-generation, so avoid relying on inline documentation for maintainability.

Please confirm:

  • The kernel builds successfully with this configuration.
  • The compiled kernel boots and functions on the target filogic hardware.
  • RSS/LRO benchmarking (mentioned in PR description) completes without regressions.

If possible, share a short build log snippet confirming successful compilation and any functional test results.


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.

@tabrisnet
Copy link
Contributor Author

@coderabbitai review

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 15, 2025

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@tabrisnet tabrisnet force-pushed the tabrisnet_filogic_edge_6.16-fix branch 7 times, most recently from 7292dea to 094f00b Compare October 22, 2025 14:34
@tabrisnet tabrisnet marked this pull request as ready for review October 22, 2025 14:35
Copy link
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: 0

🧹 Nitpick comments (3)
config/kernel/linux-filogic-edge.config (3)

99-99: Verify the userspace default CPU frequency governor choice.

Setting CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is unusual for an embedded router/gateway device. Typically, schedutil or ondemand would be more appropriate defaults as they provide automatic frequency scaling without requiring userspace configuration.

Note that CONFIG_CPU_FREQ_GOV_SCHEDUTIL=y is built-in, so consider changing line 99 to use schedutil as the default instead:

-CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE=y
+CONFIG_CPU_FREQ_DEFAULT_GOV_SCHEDUTIL=y

Or verify if there's a specific reason for requiring userspace governor management.


470-486: Extensive SCSI and enterprise RAID support added.

The addition of SCSI infrastructure and enterprise RAID controller drivers (MegaRAID, MPT3SAS, MPI3MR) is somewhat unusual for a router configuration. However, since the BPI-R4 has PCIe slots, users could add storage controllers, and the edge branch is intended for experimentation.

If these came from the OpenWRT defconfig base, consider whether they're needed for typical BPI-R4 use cases, though keeping them as modules has minimal impact.


724-732: Consider whether NFS v2 and legacy DNS support are needed.

The configuration enables comprehensive NFS support including:

  • CONFIG_NFS_V2=m - NFSv2 is deprecated and has known security limitations
  • CONFIG_NFS_USE_LEGACY_DNS=y - Uses legacy DNS resolution behavior

While both are implemented as modules (minimal impact), consider whether NFSv2 support is necessary for your use case, as most modern systems use NFSv3 or v4.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Jira integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between f145437 and 094f00b.

📒 Files selected for processing (2)
  • config/kernel/linux-filogic-edge.config (15 hunks)
  • config/sources/families/filogic.conf (1 hunks)
🧰 Additional context used
🧠 Learnings (5)
📓 Common learnings
Learnt from: tabrisnet
PR: armbian/build#8746
File: config/kernel/linux-filogic-edge.config:344-470
Timestamp: 2025-10-11T19:52:54.648Z
Learning: The chainsx/linux-filogic kernel (legacy branch) for BPI-R4 uses out-of-tree proprietary drivers (CONFIG_NET_DSA_AN8855, CONFIG_AIROHA_EN8801SC_PHY, CONFIG_AIR_AN8855_PHY, CONFIG_MDIO_AN8855, CONFIG_MFD_AIROHA_AN8855). The frank-w/BPI-Router-Linux kernel (current and edge branches) uses mainline kernel drivers instead: CONFIG_NET_DSA_MT7530 for the DSA switch and CONFIG_MEDIATEK_2P5GE_PHY for PHY support. These provide equivalent functionality for BPI-R4 networking.
Learnt from: tabrisnet
PR: armbian/build#0
File: :0-0
Timestamp: 2025-08-30T04:13:16.457Z
Learning: Armbian kernel configuration files like linux-filogic-current.config are autogenerated overlays on top of arch defconfig. Comments added manually will be lost during future updates by maintainers, and explicit "CONFIG_OPTION is not set" statements aren't needed for mutually exclusive options since these are overlay configs that only specify changes from the base configuration.
📚 Learning: 2025-09-11T06:12:54.213Z
Learnt from: SuperKali
PR: armbian/build#8609
File: config/boards/nanopi-r76s.conf:5-5
Timestamp: 2025-09-11T06:12:54.213Z
Learning: In the Armbian build system, board family configuration files (like config/sources/families/rk35xx.conf) can inherit kernel branch definitions from common include files (like config/sources/families/include/rockchip64_common.inc). Even if a branch like "edge" is not defined directly in the family conf file, it may be available through the sourced include file.

Applied to files:

  • config/sources/families/filogic.conf
📚 Learning: 2025-06-25T03:42:09.086Z
Learnt from: EvilOlaf
PR: armbian/build#8330
File: config/sources/families/sun55iw3.conf:32-36
Timestamp: 2025-06-25T03:42:09.086Z
Learning: In Armbian build system configuration files like config/sources/families/*.conf, KERNELSOURCE is explicitly declared when using unofficial or 3rd party kernel repositories (like the "dev" branch using https://github.com/apritzel/linux), but can be omitted when using the standard mainline kernel (like the "edge" branch) since it will fall back to the default mainline source.

Applied to files:

  • config/sources/families/filogic.conf
📚 Learning: 2025-10-13T02:26:18.249Z
Learnt from: tabrisnet
PR: armbian/build#8746
File: config/sources/families/filogic.conf:61-68
Timestamp: 2025-10-13T02:26:18.249Z
Learning: In the Armbian build system, the "edge" kernel branch is intended to be bleeding-edge and experimental. It does not require hardware testing or stability verification before merging, as it's expected to contain potentially unstable or untested code for early adopters and developers.

Applied to files:

  • config/sources/families/filogic.conf
📚 Learning: 2025-10-11T19:52:54.648Z
Learnt from: tabrisnet
PR: armbian/build#8746
File: config/kernel/linux-filogic-edge.config:344-470
Timestamp: 2025-10-11T19:52:54.648Z
Learning: The chainsx/linux-filogic kernel (legacy branch) for BPI-R4 uses out-of-tree proprietary drivers (CONFIG_NET_DSA_AN8855, CONFIG_AIROHA_EN8801SC_PHY, CONFIG_AIR_AN8855_PHY, CONFIG_MDIO_AN8855, CONFIG_MFD_AIROHA_AN8855). The frank-w/BPI-Router-Linux kernel (current and edge branches) uses mainline kernel drivers instead: CONFIG_NET_DSA_MT7530 for the DSA switch and CONFIG_MEDIATEK_2P5GE_PHY for PHY support. These provide equivalent functionality for BPI-R4 networking.

Applied to files:

  • config/sources/families/filogic.conf
🔇 Additional comments (5)
config/kernel/linux-filogic-edge.config (4)

118-411: Networking configuration expansion looks appropriate for router use case.

The extensive networking features (netfilter, nftables, iptables, conntrack helpers, TLS offload, tunneling protocols) align well with the BPI-R4's router/gateway functionality. The modular approach (most features as modules) allows flexibility without bloating the kernel image.


752-821: Security hardening and crypto configuration looks good.

The security features (FORTIFY_SOURCE, HARDENED_USERCOPY, RANDOMIZE_BASE) provide good baseline hardening. The extensive crypto algorithm support with ARM64 Crypto Extensions acceleration is appropriate for a router handling VPN, TLS, and encryption workloads.


836-837: Note: Aggressive panic settings for experimental edge branch.

The combination of CONFIG_PANIC_ON_OOPS=y and CONFIG_PANIC_TIMEOUT=10 means any kernel oops will trigger an automatic reboot after 10 seconds. While this provides automatic recovery for production systems, it can make debugging more difficult during development of an experimental edge kernel.

Since you've already tested and deployed this configuration, this is just an FYI. Consider whether you want to disable PANIC_ON_OOPS during active development to capture more debugging information.


532-569: Cellular modem support addition is appropriate for router use case.

The comprehensive WWAN/cellular modem support (USB and PCIe via MHI, QMI/MBIM protocols, MediaTek T7xx) enables BPI-R4 users to add cellular modems for WAN connectivity or failover scenarios. Implementing these as modules is the right approach.

config/sources/families/filogic.conf (1)

62-66: Consider pinning to a specific commit hash instead of a branch for reproducibility.

The personal fork exists and is accessible, but relying on a branch reference creates maintenance risk. Since frank-w/BPI-Router-Linux shows no recent activity on the 6.16-rsslro branch (last commit in July 2025, before the kernel.org 6.16.12 release on Oct 12, 2025) and there is no public plan to merge the 6.16.12 patch, this appears to be a long-term reliance on the tabrisnet fork rather than temporary.

To ensure reproducibility and avoid unexpected changes:

  • Use a specific commit hash (e.g., from the current head of 6.16.12-rsslro) instead of a branch reference
  • Document why the personal fork is necessary and when/if you plan to switch back to frank-w's repository

@EvilOlaf
Copy link
Member

You could also leave the kernel source as it is and add the incremental patch via patch folder?
https://cdn.kernel.org/pub/linux/kernel/v6.x/incr/patch-6.16.11-12.xz

@tabrisnet
Copy link
Contributor Author

You could also leave the kernel source as it is and add the incremental patch via patch folder? https://cdn.kernel.org/pub/linux/kernel/v6.x/incr/patch-6.16.11-12.xz

I couldn't find the incremental patch from -rc1 to .0, albeit I can just pull it from git.kernel.org

@tabrisnet
Copy link
Contributor Author

You could also leave the kernel source as it is and add the incremental patch via patch folder? https://cdn.kernel.org/pub/linux/kernel/v6.x/incr/patch-6.16.11-12.xz

I couldn't find the incremental patch from -rc1 to .0, albeit I can just pull it from git.kernel.org

seems that I have to edit some of the patches. working on it

@EvilOlaf
Copy link
Member

There should be incremental patches for every minor step there. These can be just applied after each other like here: https://github.com/armbian/build/tree/main/patch/kernel/archive/odroidxu4-6.6

@tabrisnet
Copy link
Contributor Author

There should be incremental patches for every minor step there. These can be just applied after each other like here: https://github.com/armbian/build/tree/main/patch/kernel/archive/odroidxu4-6.6

yeah, I tried that. there are some things backported into the stable tree from the same sources that frank-w used. so trying to apply the upstream patches over top of frank-w's tree has some glitches around drivers/net/phy/phylink.c & thermal/drivers/mediatek/lvts_thermal.c
the rebase was clean [unlike 6.12] though.
I don't know the right tools to clean that up.

@tabrisnet tabrisnet force-pushed the tabrisnet_filogic_edge_6.16-fix branch from 094f00b to bf29a41 Compare October 22, 2025 18:06
@github-actions github-actions bot added the Patches Patches related to kernel, U-Boot, ... label Oct 22, 2025
@tabrisnet
Copy link
Contributor Author

There should be incremental patches for every minor step there. These can be just applied after each other like here: https://github.com/armbian/build/tree/main/patch/kernel/archive/odroidxu4-6.6

and as noted, the kernel.org incr doesn't include the -rc patches
https://cdn.kernel.org/pub/linux/kernel/v6.x/incr/

@tabrisnet tabrisnet force-pushed the tabrisnet_filogic_edge_6.16-fix branch from bf29a41 to 5792470 Compare October 22, 2025 18:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

11 Milestone: Fourth quarter release Hardware Hardware related like kernel, U-Boot, ... Needs review Seeking for review Patches Patches related to kernel, U-Boot, ... size/large PR with 250 lines or more

Development

Successfully merging this pull request may close these issues.

2 participants