Skip to content

Conversation

pyavitz
Copy link
Collaborator

@pyavitz pyavitz commented Jul 6, 2025

NOTE: This PR may or may not break RTC functionality on other units.

On the M4-Zero I use the following in the wifi-pwrseq node.

		clocks = <&rtc CLK_OSC32K_FANOUT>;
		clock-names = "ext_clock";
		pinctrl-0 = <&x32clk_fanout_pin>;
		pinctrl-names = "default";

I've noticed others using:

		clocks = <&rtc 1>;

Disable Allwinner H616 RTC support patches:
The two patches break RTC and muddle up Bluetooth.

Defconfigs: General update:
Allows for the wifi-pwrseq and bluetooth to come up properly. Basically set more to y instead of m and tick on other misc bits.

Install upstream wireless-regdb:
Prevent dmesg spam: brcmf_set_channel set chanspec xxxxxxx fail

    _             _    _                             __  __ _    _      _ 
   /_\  _ _ _ __ | |__(_)__ _ _ _ ___ _  _ _ _  ___ / _|/ _(_)__(_)__ _| |
  / _ \| '_| '  \| '_ \ / _` | ' \___| || | ' \/ _ \  _|  _| / _| / _` | |
 /_/ \_\_| |_|_|_|_.__/_\__,_|_||_|   \_,_|_||_\___/_| |_| |_\__|_\__,_|_|
                                                                          
 v25.08 rolling for BananaPi BPI-M4-Zero running Armbian Linux 6.12.35-current-sunxi64

 Packages:     Debian rolling (trixie)
 Updates:      Kernel upgrade enabled and 15 packages available for upgrade 
 Support:      DIY (custom image)
 IPv4:         (LAN) 10.0.0.88 (WAN) 73.179.134.125 
 IPv6:         2601:586:4f7f:a200:ae6a:a3ff:fe3b:d9d5 (WAN) 2601:586:4f7f:a200::d656 

 Performance:  

 Load:         2%           	 Uptime:       33 min	
 Memory usage: 4% of 3.83G  	
 CPU temp:     50°C           	 Usage of /:   7% of 29G    	
 RX today:     528 KiB        	
 Commands: 

 Configuration : armbian-config
 Upgrade       : armbian-upgrade
 Monitoring    : htop

root@bananapim4zero:~# bluetoothctl
hci0 new_settings: powered bondable ssp br/edr le secure-conn 
Agent registered
[CHG] Controller AC:6A:A3:3B:D9:D6 Pairable: yes
[bluetoothctl]> exit
root@bananapim4zero:~# dmesg | grep hci0
[    8.420062] Bluetooth: hci0: BCM: chip id 107
[    8.422459] Bluetooth: hci0: BCM: features 0x2f
[    8.445696] Bluetooth: hci0: BCM4345C0
[    8.445728] Bluetooth: hci0: BCM4345C0 (003.001.025) build 0000
[    8.462837] Bluetooth: hci0: BCM4345C0 'brcm/BCM4345C0.sinovoip,bpi-m4-zero.hcd' Patch
[   15.243426] Bluetooth: hci0: BCM: features 0x2f
[   15.246257] Bluetooth: hci0: BCM4345C0 Murata Type-1MW UART 37.4 MHz BT 5.0-0187
[   15.246276] Bluetooth: hci0: BCM4345C0 (003.001.025) build 0366
root@bananapim4zero:~# rfkill
ID TYPE      DEVICE      SOFT      HARD
 0 bluetooth hci0   unblocked unblocked
 1 wlan      phy0   unblocked unblocked
root@bananapim4zero:~# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host noprefixroute 
       valid_lft forever preferred_lft forever
2: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether ac:6a:a3:3b:d9:d5 brd ff:ff:ff:ff:ff:ff
    altname wlxac6aa33bd9d5
    inet 10.0.0.88/24 brd 10.0.0.255 scope global dynamic noprefixroute wlan0
       valid_lft 170850sec preferred_lft 170850sec
    inet6 2601:586:4f7f:a200::d656/128 scope global dynamic noprefixroute 
       valid_lft 5252sec preferred_lft 5252sec
    inet6 2601:586:4f7f:a200:ae6a:a3ff:fe3b:d9d5/64 scope global dynamic noprefixroute 
       valid_lft 7199sec preferred_lft 7199sec
    inet6 fe80::ae6a:a3ff:fe3b:d9d5/64 scope link noprefixroute 
       valid_lft forever preferred_lft forever

https://forum.armbian.com/topic/53113-bluetooth-support-missing-for-rev-2/

pyavitz added 4 commits July 6, 2025 11:29
 These two patches break RTC and don't allow for Bluetooth to
 come up properly.

Signed-off-by: Patrick Yavitz <pyavitz@gmail.com>
Allows for the wifi-pwrseq and bluetooth to come up properly.

Signed-off-by: Patrick Yavitz <pyavitz@gmail.com>
Prevent dmesg spam: brcmf_set_channel set chanspec xxxxxxx fail

Signed-off-by: Patrick Yavitz <pyavitz@gmail.com>
Fails on Edge builds.

Signed-off-by: Patrick Yavitz <pyavitz@gmail.com>
Copy link
Contributor

coderabbitai bot commented Jul 6, 2025

Walkthrough

A new function post_family_tweaks_bsp__bananapi_wireless_regdb was added to the Banana Pi M4 Zero board configuration. This function checks kernel.org availability, clones the wireless-regdb repository, verifies regulatory database files, and installs them into the firmware updates directory. Extensive kernel configuration updates for the sunxi64-current and sunxi64-edge platforms enable numerous kernel features, drivers, and subsystems. These changes include enabling virtualization, advanced partitioning, networking, Bluetooth, PCI/PCIe, power management, media support, input devices, and various hardware drivers, frequently converting options from modules to built-in and adding new support.

Suggested labels

Ready to merge

Suggested reviewers

  • igorpecovnik
  • joekhoobyar
  • rpardini
  • PanderMusubi

Warning

Review ran into problems

🔥 Problems

GitHub checks timed out after 90 seconds. Some checks were still in progress when the timeout was reached. Consider increasing the GitHub Checks - Timeout Ms value in your CodeRabbit configuration to allow more time for checks to complete.


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 0d9740a and 6adf9f7.

📒 Files selected for processing (1)
  • config/boards/bananapim4zero.conf (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • config/boards/bananapim4zero.conf
⏰ Context from checks skipped due to timeout of 90000ms (2)
  • GitHub Check: Shell script analysis
  • GitHub Check: Check kernel security options
✨ Finishing Touches
🧪 Generate Unit Tests
  • Create PR with Unit Tests
  • Post Copyable Unit Tests in a Comment

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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai auto-generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@github-actions github-actions bot added size/large PR with 250 lines or more 08 Milestone: Third quarter release Needs review Seeking for review Hardware Hardware related like kernel, U-Boot, ... Patches Patches related to kernel, U-Boot, ... labels Jul 6, 2025
@coderabbitai coderabbitai bot requested review from joekhoobyar and rpardini July 6, 2025 16:04
@coderabbitai coderabbitai bot added 05 Milestone: Second quarter release BSP Board Support Packages Ready to merge Reviewed, tested and ready for merge labels Jul 6, 2025
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: 3

🧹 Nitpick comments (7)
config/kernel/linux-sunxi64-edge.config (7)

330-341: IP_NF_FILTER/IP_NF_SECURITY built-in – watch kernel image size

Perfectly fine functionally, just note the cumulative +≈200 KiB that each built-in networking feature adds.


560-563: Ceph + NFC compiled-in: heavyweight for an SBC image

Both subsystems pull in sizable code & crypto deps (≈1.5 MiB). If they aren’t part of the default Armbian user story, consider keeping them as modules to keep RAM-constrained boards happy.


638-644: All ZRAM back-ends enabled – harmless but redundant

Only one backend is selectable at runtime; carrying five compressors just inflates .text. You can trim to the two you realistically use (LZ4 & ZSTD?).


1479-1494: Extra regulator drivers built-in – OK, but watch boot-time probing noise

These parts aren’t present on BPI-M4-Zero; they’ll probe-fail at boot, adding ~40 ms. If boot time is critical, leave them as modules.


1533-1533: MEDIA_SUPPORT=y turns the kernel into a “multimedia kitchen sink”

Adds ~4 MiB. If v4l2 isn’t required before modules can load, keep it as m.


2436-2440: REMOTEPROC{, _CDEV}=y without a remote MCU

Adds dead code paths unless you plan to expose ARISC or RISC-V co-processors later. Safe, but consider m.


2691-2692: SRF04 ultrasonic sensor driver built-in is odd

Unlikely to exist on the board; propose reverting to module to keep base image lean.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 0cc8ccf and 3e0bfa7.

⛔ Files ignored due to path filters (4)
  • patch/kernel/archive/sunxi-6.12/series.armbian is excluded by !patch/**
  • patch/kernel/archive/sunxi-6.12/series.conf is excluded by !patch/**
  • patch/kernel/archive/sunxi-6.15/series.armbian is excluded by !patch/**
  • patch/kernel/archive/sunxi-6.15/series.conf is excluded by !patch/**
📒 Files selected for processing (3)
  • config/boards/bananapim4zero.conf (1 hunks)
  • config/kernel/linux-sunxi64-current.config (38 hunks)
  • config/kernel/linux-sunxi64-edge.config (38 hunks)
🧰 Additional context used
🧠 Learnings (4)
📓 Common learnings
Learnt from: EvilOlaf
PR: armbian/build#8328
File: lib/functions/compilation/patch/drivers_network.sh:542-545
Timestamp: 2025-06-24T10:08:40.313Z
Learning: In the Armbian build system, when a PR removes build support for a specific kernel version, version check issues for that removed version become practically irrelevant even if they appear incorrect in isolation. Context about which kernel versions are being deprecated/removed is important for understanding the impact of version-related code changes.
Learnt from: rpardini
PR: armbian/build#8044
File: patch/u-boot/v2025.04/cmd-fileenv-read-string-from-file-into-env.patch:76-86
Timestamp: 2025-03-31T22:20:48.475Z
Learning: For the Armbian build project, maintaining consistency with existing patches across U-Boot versions (such as between 2025.01 and 2025.04) is prioritized over refactoring individual patches for code improvements.
Learnt from: EvilOlaf
PR: armbian/build#0
File: :0-0
Timestamp: 2025-06-16T03:24:00.458Z
Learning: In Armbian board configuration files (.csc), the standard pattern is to have only one line as a comment describing the board hardware specifications. This single-line description typically includes the SoC model, core count, RAM options, and key features like connectivity options, storage interfaces, and special features.
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.
Learnt from: EvilOlaf
PR: armbian/build#8330
File: config/sources/families/sun55iw3.conf:32-36
Timestamp: 2025-06-25T03:40:52.109Z
Learning: In Armbian build system configuration files like config/sources/families/*.conf, when KERNELSOURCE is not explicitly declared in a case branch, the system falls back to a default KERNELSOURCE value, so missing KERNELSOURCE declarations are not critical issues.
Learnt from: EvilOlaf
PR: armbian/build#8298
File: extensions/https_proxy.sh:1-9
Timestamp: 2025-06-14T05:53:10.627Z
Learning: Armbian build framework extensions are NOT designed to run standalone but are called by the supervisor. The framework provides environment variables like USERPATCHES_PATH and SDCARD, and commands are executed with protection via run_host_command_logged and chroot_sdcard functions that use bash -e -o pipefail.
Learnt from: libiunc
PR: armbian/build#8033
File: config/kernel/linux-starfive2-vendor.config:43-43
Timestamp: 2025-03-31T12:57:13.880Z
Learning: For StarFive2 platform kernel configurations, maintain alignment with vendor-provided configurations rather than modifying security settings like SECCOMP. This ensures hardware compatibility as intended by the manufacturer.
Learnt from: The-going
PR: armbian/build#8147
File: config/sources/families/include/sunxi64_common.inc:38-39
Timestamp: 2025-04-30T16:16:47.150Z
Learning: The Armbian build system references Linux kernel versions in the form "tag:v6.14.4" in the KERNELBRANCH variable, even when point release tags might not be directly visible in the upstream repository in the same form.
Learnt from: Grippy98
PR: armbian/build#8152
File: lib/functions/configuration/interactive.sh:209-266
Timestamp: 2025-05-05T12:35:07.143Z
Learning: For the interactive kernel selection in Armbian, KERNEL_MAJOR_MINOR and KERNEL_DESCRIPTION are parsed from family.conf but deliberately not set as environment variables to avoid potential interference with other parts of the build system.
Learnt from: djurny
PR: armbian/build#8287
File: config/bootscripts/boot-sunxi.cmd:38-44
Timestamp: 2025-06-12T21:14:36.024Z
Learning: In config/bootscripts/boot-sunxi.cmd the unconditional "+1" increment in func_align_addr_next (when align_overlap_oboe_avoidance="on") is intentional. It compensates for a known off-by-one error in U-Boot where the end address is calculated as start+size instead of start+size-1, so the extra page prevents overlap. This behavior should not be “optimized away”.
config/boards/bananapim4zero.conf (2)
Learnt from: Grippy98
PR: armbian/build#8202
File: config/desktop/trixie/environments/gnome/armbian/create_desktop_package.sh:2-3
Timestamp: 2025-05-16T15:34:34.672Z
Learning: The shell scripts in the Armbian build system's desktop configuration files, such as config/desktop/trixie/environments/gnome/armbian/create_desktop_package.sh, rely on environment variables like $SRC and $destination that are expected to be set externally before the script is executed.
Learnt from: djurny
PR: armbian/build#8315
File: lib/functions/rootfs/distro-agnostic.sh:54-68
Timestamp: 2025-06-22T00:45:26.182Z
Learning: In Armbian build system, external command dependencies like envsubst are handled by adding the required packages (e.g., gettext for envsubst) to host_dependencies in adaptative_prepare_host_dependencies function in lib/functions/host/prepare-host.sh, rather than checking command availability at runtime.
config/kernel/linux-sunxi64-current.config (9)
Learnt from: libiunc
PR: armbian/build#8033
File: config/kernel/linux-starfive2-vendor.config:43-43
Timestamp: 2025-03-31T12:57:13.880Z
Learning: For StarFive2 platform kernel configurations, maintain alignment with vendor-provided configurations rather than modifying security settings like SECCOMP. This ensures hardware compatibility as intended by the manufacturer.
Learnt from: EvilOlaf
PR: armbian/build#8330
File: config/sources/families/sun55iw3.conf:32-36
Timestamp: 2025-06-25T03:40:52.109Z
Learning: In Armbian build system configuration files like config/sources/families/*.conf, when KERNELSOURCE is not explicitly declared in a case branch, the system falls back to a default KERNELSOURCE value, so missing KERNELSOURCE declarations are not critical issues.
Learnt from: EvilOlaf
PR: armbian/build#0
File: :0-0
Timestamp: 2025-06-16T03:24:00.458Z
Learning: In Armbian board configuration files (.csc), the standard pattern is to have only one line as a comment describing the board hardware specifications. This single-line description typically includes the SoC model, core count, RAM options, and key features like connectivity options, storage interfaces, and special features.
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.
Learnt from: EvilOlaf
PR: armbian/build#8328
File: lib/functions/compilation/patch/drivers_network.sh:542-545
Timestamp: 2025-06-24T10:08:40.313Z
Learning: In the Armbian build system, when a PR removes build support for a specific kernel version, version check issues for that removed version become practically irrelevant even if they appear incorrect in isolation. Context about which kernel versions are being deprecated/removed is important for understanding the impact of version-related code changes.
Learnt from: Grippy98
PR: armbian/build#8152
File: lib/functions/configuration/interactive.sh:209-266
Timestamp: 2025-05-05T12:35:07.143Z
Learning: For the interactive kernel selection in Armbian, KERNEL_MAJOR_MINOR and KERNEL_DESCRIPTION are parsed from family.conf but deliberately not set as environment variables to avoid potential interference with other parts of the build system.
Learnt from: rpardini
PR: armbian/build#8044
File: patch/u-boot/v2025.04/cmd-fileenv-read-string-from-file-into-env.patch:76-86
Timestamp: 2025-03-31T22:20:48.475Z
Learning: For the Armbian build project, maintaining consistency with existing patches across U-Boot versions (such as between 2025.01 and 2025.04) is prioritized over refactoring individual patches for code improvements.
Learnt from: djurny
PR: armbian/build#8287
File: config/bootscripts/boot-sunxi.cmd:38-44
Timestamp: 2025-06-12T21:14:36.024Z
Learning: In config/bootscripts/boot-sunxi.cmd the unconditional "+1" increment in func_align_addr_next (when align_overlap_oboe_avoidance="on") is intentional. It compensates for a known off-by-one error in U-Boot where the end address is calculated as start+size instead of start+size-1, so the extra page prevents overlap. This behavior should not be “optimized away”.
Learnt from: djurny
PR: armbian/build#8287
File: config/bootscripts/boot-sunxi.cmd:148-161
Timestamp: 2025-06-12T21:03:39.686Z
Learning: In Armbian U-Boot bootscripts, the `${cpu}` environment variable is always pre-set by U-Boot (or defaults to a valid value), so additional guards against it being unset are unnecessary.
config/kernel/linux-sunxi64-edge.config (6)
Learnt from: libiunc
PR: armbian/build#8033
File: config/kernel/linux-starfive2-vendor.config:43-43
Timestamp: 2025-03-31T12:57:13.880Z
Learning: For StarFive2 platform kernel configurations, maintain alignment with vendor-provided configurations rather than modifying security settings like SECCOMP. This ensures hardware compatibility as intended by the manufacturer.
Learnt from: EvilOlaf
PR: armbian/build#0
File: :0-0
Timestamp: 2025-06-16T03:24:00.458Z
Learning: In Armbian board configuration files (.csc), the standard pattern is to have only one line as a comment describing the board hardware specifications. This single-line description typically includes the SoC model, core count, RAM options, and key features like connectivity options, storage interfaces, and special features.
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.
Learnt from: EvilOlaf
PR: armbian/build#8330
File: config/sources/families/sun55iw3.conf:32-36
Timestamp: 2025-06-25T03:40:52.109Z
Learning: In Armbian build system configuration files like config/sources/families/*.conf, when KERNELSOURCE is not explicitly declared in a case branch, the system falls back to a default KERNELSOURCE value, so missing KERNELSOURCE declarations are not critical issues.
Learnt from: djurny
PR: armbian/build#8287
File: config/bootscripts/boot-sunxi.cmd:38-44
Timestamp: 2025-06-12T21:14:36.024Z
Learning: In config/bootscripts/boot-sunxi.cmd the unconditional "+1" increment in func_align_addr_next (when align_overlap_oboe_avoidance="on") is intentional. It compensates for a known off-by-one error in U-Boot where the end address is calculated as start+size instead of start+size-1, so the extra page prevents overlap. This behavior should not be “optimized away”.
Learnt from: djurny
PR: armbian/build#8287
File: config/bootscripts/boot-sunxi.cmd:148-161
Timestamp: 2025-06-12T21:03:39.686Z
Learning: In Armbian U-Boot bootscripts, the `${cpu}` environment variable is always pre-set by U-Boot (or defaults to a valid value), so additional guards against it being unset are unnecessary.
🔇 Additional comments (20)
config/kernel/linux-sunxi64-current.config (9)

70-71: LGTM: Virtualization support enabled.

Enabling KVM virtualization support as built-in is appropriate for this platform and aligns with modern ARM64 capabilities.


83-85: Advanced partitioning support enabled.

Good addition of advanced partitioning options including BSD disklabel and command line partition support, which enhances flexibility for various storage configurations.


166-341: Comprehensive netfilter and networking stack built-in.

The extensive networking and firewall configuration changes from modules to built-in are appropriate for embedded systems where network functionality is critical during early boot.


515-547: Bluetooth subsystem properly configured.

Enabling Bluetooth core and various drivers as built-in, including MTK USB and NXPUART support, aligns well with the PR objective to improve Bluetooth functionality on the BananaPi M4 Zero.


594-597: PCI/PCIe host support enabled.

Adding PCI subsystem support with Cadence and DesignWare platform host controllers is appropriate for this ARM64 platform.


638-644: ZRAM compression backends enabled.

Good comprehensive enabling of ZRAM compression algorithms and memory tracking, which will benefit memory-constrained embedded systems.


1126-1143: Comprehensive Sunxi pin control drivers enabled.

Enabling all Allwinner/Sunxi pin control drivers as built-in ensures proper GPIO and pin multiplexing support across different SoC variants in the family.


2301-2301: AC100 RTC driver enabled as built-in.

This change aligns with the PR objective to fix RTC functionality. The AC100 is commonly used with Allwinner SoCs for RTC functionality.


2514-2515: AXP and Sunxi ADC drivers enabled.

Enabling AXP20X/288 and Sun4I/20I GPADC as built-in provides proper power management and analog-to-digital conversion support for the platform.

Also applies to: 2536-2537

config/kernel/linux-sunxi64-edge.config (11)

83-85: 👍 Advanced partition support is a sensible default
The switch to CONFIG_PARTITION_ADVANCED, CONFIG_BSD_DISKLABEL and CONFIG_CMDLINE_PARTITION makes sense for board-agnostic images and won’t bloat the kernel.


91-91: Verify the new default ZSWAP pool (ZBUD) fits your memory/CPU trade-off

ZBUD halves memory waste but compresses slower than the previous ZS… pools. On 4-core H616 boards the compression CPU cost may show up under memory pressure. Double-check with stress-ng or similar before shipping.


166-187: Netfilter core now built-in – good for early-boot networking

Embedding NF_CONNTRACK/NF_TABLES avoids init-order races seen with early userspace (e.g. iptables-restore in initramfs). No objections.


515-547: Bluetooth stack moved to y; make sure firmware is in the initramfs

With BT core and the MediaTek/​NXP UART drivers now built-in the HCI devices appear early, but firmware blobs must be available before root-fs hand-off. Confirm armbian-next-initrd packs *.hcd for BCM4345C0; otherwise BT will silently fail.


554-557: RFKill as built-in is 👍

Early-boot radio toggling is required for regulatory db load – good call.


652-655: NVME_MULTIPATH=y + DUMMY_IRQ=m + ENCLOSURE_SERVICES=m

Fine for generic kernels; no functional issues spotted.


738-739: CONFIG_NETKIT=y appears experimental

netkit is still marked “staging” upstream; if you don’t ship userspace that consumes it, better keep it as m to avoid exposing an un-hardened interface.


1126-1143: Large batch of sunxi pinctrl drivers set to y

Makes sense for a single edge kernel supporting many boards; compile-time impact only.


2370-2372: UIO core now built-in – 👍 for user-space drivers

No concerns.


2710-2714: Good call making PWM core + Sunxi drivers built-in

Required very early by panel back-light and eMMC regulators; LGTM.


2763-2764: XFS_QUOTA=y – fine

Matches the existing XFS_FS=m; no issues.

Comment on lines +70 to 76
CONFIG_VIRTUALIZATION=y
CONFIG_KVM=y
CONFIG_KPROBES=y
CONFIG_JUMP_LABEL=y
CONFIG_MODULES=y
CONFIG_MODULE_FORCE_LOAD=y
CONFIG_MODULE_UNLOAD=y
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue

Re-consider CONFIG_MODULE_FORCE_LOAD=y; it weakens module version safety

Forcing a load even on vermagic / version mismatches can mask ABI breakage and crash the kernel at boot. Nothing in this PR appears to justify relaxing that guard. Strongly advise reverting to n (default) unless you have a very specific, documented use-case.

-CONFIG_MODULE_FORCE_LOAD=y
+# CONFIG_MODULE_FORCE_LOAD is not set
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
CONFIG_VIRTUALIZATION=y
CONFIG_KVM=y
CONFIG_KPROBES=y
CONFIG_JUMP_LABEL=y
CONFIG_MODULES=y
CONFIG_MODULE_FORCE_LOAD=y
CONFIG_MODULE_UNLOAD=y
CONFIG_VIRTUALIZATION=y
CONFIG_KVM=y
CONFIG_KPROBES=y
CONFIG_JUMP_LABEL=y
CONFIG_MODULES=y
# CONFIG_MODULE_FORCE_LOAD is not set
CONFIG_MODULE_UNLOAD=y
🤖 Prompt for AI Agents
In config/kernel/linux-sunxi64-edge.config lines 70 to 76, the
CONFIG_MODULE_FORCE_LOAD option is set to 'y', which disables module version
safety and can cause kernel crashes due to ABI mismatches. To fix this, change
CONFIG_MODULE_FORCE_LOAD from 'y' to 'n' to enforce version checks and maintain
kernel stability unless there is a documented, specific reason to override this
behavior.

Check connection with curl before cloning wireless-regdb.
Check for the regulatory.db && regulatory.db.p7s files before
adding them the img.

Signed-off-by: Patrick Yavitz <pyavitz@gmail.com>
@github-actions github-actions bot removed the Ready to merge Reviewed, tested and ready for merge label Jul 6, 2025
Signed-off-by: Patrick Yavitz <pyavitz@gmail.com>
@coderabbitai coderabbitai bot added the Ready to merge Reviewed, tested and ready for merge label Jul 6, 2025
@pyavitz pyavitz added the Work in progress Unfinished / work in progress label Jul 6, 2025
@pyavitz
Copy link
Collaborator Author

pyavitz commented Jul 6, 2025

I propose that the defconfig(s) need to be re-done either from scratch or a cleaner base. I will re-open or re-submit when I have the time to work on this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
05 Milestone: Second quarter release 08 Milestone: Third quarter release BSP Board Support Packages Hardware Hardware related like kernel, U-Boot, ... Needs review Seeking for review Patches Patches related to kernel, U-Boot, ... Ready to merge Reviewed, tested and ready for merge size/large PR with 250 lines or more Work in progress Unfinished / work in progress
Development

Successfully merging this pull request may close these issues.

1 participant