-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
improve WiFi support for the sun50iw1 board family #8467
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
WalkthroughA new kernel module configuration option, Estimated code review effort🎯 2 (Simple) | ⏱️ ~7 minutes Suggested labels
Suggested reviewers
Note ⚡️ Unit Test Generation is now available in beta!Learn more here, or try it out under "Finishing Touches" below. 📜 Recent review detailsConfiguration used: CodeRabbit UI ⛔ Files ignored due to path filters (2)
📒 Files selected for processing (3)
🚧 Files skipped from review as they are similar to previous changes (3)
✨ Finishing Touches🧪 Generate 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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this 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
🧹 Nitpick comments (1)
config/kernel/linux-sunxi64-current.config (1)
900-907
: Verify RTW88_8723CS support and prevent RTL8723BS collisionI wasn’t able to locate the
RTW88_8723CS
Kconfig entry in the repo’s kernel sources (likely because sunxi64-current tracks 6.6-y), nor could I confirm the stagingRTL8723BS
symbol. Please manually verify and adjust as follows:
- config/kernel/linux-sunxi64-current.config
• Remove or wrapCONFIG_RTW88_8723CS=m
(upstream only in Linux ≥6.8).
• Disable or blacklistCONFIG_RTL8723BS
(line 2327) to avoid SDIO probe conflicts with the rtw88 driver.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (2)
packages/blobs/rtw8703b_fw/rtw8703b_fw.bin
is excluded by!**/*.bin
packages/blobs/rtw8703b_fw/rtw8703b_wow_fw.bin
is excluded by!**/*.bin
📒 Files selected for processing (3)
config/kernel/linux-sunxi64-current.config
(1 hunks)config/kernel/linux-sunxi64-edge.config
(1 hunks)config/sources/families/sun50iw1.conf
(1 hunks)
🧰 Additional context used
🧠 Learnings (17)
📓 Common learnings
Learnt from: EvilOlaf
PR: armbian/build#8428
File: config/boards/lckfb-taishanpi.csc:5-9
Timestamp: 2025-07-25T03:51:50.830Z
Learning: When reviewing PRs in the Armbian build system, U-Boot defconfig files and patches may be added as part of the PR changes but might not be visible in the current repository clone state during review. It's important to check the actual PR file changes directly via GitHub or the PR API to get the complete picture of what files are being added or modified.
Learnt from: EvilOlaf
PR: armbian/build#8428
File: config/boards/lckfb-taishanpi.csc:5-9
Timestamp: 2025-07-25T03:51:50.830Z
Learning: When reviewing PRs in the Armbian build system, U-Boot defconfig files and patches may be added as part of the PR changes but might not be visible in the current repository clone state during review. It's important to check the actual PR file changes directly via GitHub API (https://api.github.com/repos/armbian/build/pulls/{pr_number}/files) to get the complete picture of what files are being added or modified, especially for U-Boot patches that will be applied during the build process.
Learnt from: amazingfate
PR: armbian/build#8453
File: lib/functions/compilation/patch/drivers_network.sh:213-216
Timestamp: 2025-08-02T14:59:28.145Z
Learning: The wireless driver patches wireless-rtl8812au-Fix-6.16.patch, wireless-rtl8811cu-Fix-6.16.patch, and wireless-rtl88x2bu-Fix-6.16.patch in the Armbian build system are backward compatible and can be applied unconditionally without version checks, even though they're named for 6.16+ fixes.
Learnt from: igorpecovnik
PR: armbian/build#8408
File: lib/functions/compilation/patch/drivers_network.sh:258-260
Timestamp: 2025-07-22T07:02:58.863Z
Learning: In the Armbian build system, RTL8811CU/RTL8821C wireless driver deprecation starting with kernel 6.12+ is not due to build failures but because support is being integrated into the upstream RTW88 driver. The deprecated drivers still build and function correctly during the transition period.
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: pyavitz
PR: armbian/build#8421
File: config/kernel/linux-sunxi64-edge.config:2168-2173
Timestamp: 2025-07-27T15:54:35.119Z
Learning: In the Armbian build system, staging 802.11 drivers like CONFIG_RTLLIB, CONFIG_RTL8192E, CONFIG_R8712U are kept enabled alongside upstream rtw88 drivers because rtw88 is still under development and suffers from reliability issues. The staging drivers serve as necessary fallbacks when upstream drivers are unstable, prioritizing working hardware over avoiding technical conflicts.
Learnt from: igorpecovnik
PR: armbian/build#8408
File: lib/functions/compilation/patch/drivers_network.sh:303-305
Timestamp: 2025-07-22T07:03:01.165Z
Learning: RTL88x2bu driver support is being integrated into the mainline RTW88 driver, which is why the out-of-tree RTL88x2bu driver is being deprecated starting with kernel 6.12+. The external driver still builds and functions, but the deprecation is due to upstream mainline support becoming available.
Learnt from: pyavitz
PR: armbian/build#8388
File: config/boards/kickpik2b.conf:56-72
Timestamp: 2025-07-17T04:16:29.551Z
Learning: For AIC8800 Bluetooth devices in Armbian board configurations, systemd service configurations intentionally use Type=idle and boot delays because there is no compatibility to load AIC8800 bluetooth in mainline kernel. These delays and service timing are necessary workarounds for hardware limitations rather than performance issues.
Learnt from: pyavitz
PR: armbian/build#8455
File: config/sources/families/sun50iw1.conf:19-24
Timestamp: 2025-08-03T15:21:20.148Z
Learning: In the Armbian build system, when copying firmware files during family_tweaks_s(), use /lib/firmware/updates/ instead of /lib/firmware/ to avoid conflicts with the Armbian firmware package. The /lib/firmware/updates directory takes precedence in Linux firmware loading hierarchy and is the proper location for user-installed firmware files.
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: pyavitz
PR: armbian/build#8421
File: config/kernel/linux-sunxi64-edge.config:1058-1061
Timestamp: 2025-07-26T11:17:56.870Z
Learning: I2C_DESIGNWARE_SLAVE is a bool configuration option in Linux kernel Kconfig, not tristate. This means it can only be set to 'y' (enabled) or 'n' (disabled), never 'm' (module). When enabled, the slave functionality is compiled into the I2C_DESIGNWARE_CORE driver, regardless of whether the core driver is built-in or as a module.
Learnt from: lanefu
PR: armbian/build#8377
File: config/kernel/linux-uefi-arm64-cloud.config:165-170
Timestamp: 2025-07-19T00:03:42.995Z
Learning: CONFIG_NETKIT was introduced in Linux kernel 4.14.330 (November 2023) and enables BPF-programmable network devices that can operate in Layer 3 or Layer 2 mode. It's a valid configuration option in modern kernels including 6.12.
Learnt from: EvilOlaf
PR: armbian/build#0
File: :0-0
Timestamp: 2025-08-02T05:46:10.664Z
Learning: In the Armbian build system, the KERNEL_CONFIGURE=yes switch is deprecated. The recommended approach for kernel configuration is now to use the `kernel-config` build command, which provides a more structured way to configure kernel options.
📚 Learning: in the armbian build system, staging 802.11 drivers like config_rtllib, config_rtl8192e, config_r871...
Learnt from: pyavitz
PR: armbian/build#8421
File: config/kernel/linux-sunxi64-edge.config:2168-2173
Timestamp: 2025-07-27T15:54:35.119Z
Learning: In the Armbian build system, staging 802.11 drivers like CONFIG_RTLLIB, CONFIG_RTL8192E, CONFIG_R8712U are kept enabled alongside upstream rtw88 drivers because rtw88 is still under development and suffers from reliability issues. The staging drivers serve as necessary fallbacks when upstream drivers are unstable, prioritizing working hardware over avoiding technical conflicts.
Applied to files:
config/kernel/linux-sunxi64-edge.config
config/kernel/linux-sunxi64-current.config
config/sources/families/sun50iw1.conf
📚 Learning: in armbian board configuration files (.csc), the standard pattern is to have only one line as a comm...
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.
Applied to files:
config/kernel/linux-sunxi64-edge.config
config/kernel/linux-sunxi64-current.config
config/sources/families/sun50iw1.conf
📚 Learning: in the armbian build system, rtl8811cu/rtl8821c wireless driver deprecation starting with kernel 6.1...
Learnt from: igorpecovnik
PR: armbian/build#8408
File: lib/functions/compilation/patch/drivers_network.sh:258-260
Timestamp: 2025-07-22T07:02:58.863Z
Learning: In the Armbian build system, RTL8811CU/RTL8821C wireless driver deprecation starting with kernel 6.12+ is not due to build failures but because support is being integrated into the upstream RTW88 driver. The deprecated drivers still build and function correctly during the transition period.
Applied to files:
config/kernel/linux-sunxi64-edge.config
config/kernel/linux-sunxi64-current.config
config/sources/families/sun50iw1.conf
📚 Learning: in the armbian build system, the kernel_configure=yes switch is deprecated. the recommended approach...
Learnt from: EvilOlaf
PR: armbian/build#0
File: :0-0
Timestamp: 2025-08-02T05:46:10.664Z
Learning: In the Armbian build system, the KERNEL_CONFIGURE=yes switch is deprecated. The recommended approach for kernel configuration is now to use the `kernel-config` build command, which provides a more structured way to configure kernel options.
Applied to files:
config/kernel/linux-sunxi64-edge.config
config/kernel/linux-sunxi64-current.config
📚 Learning: in the armbian build system, kernel configurations prioritize broad hardware compatibility over opti...
Learnt from: pyavitz
PR: armbian/build#8421
File: config/kernel/linux-sunxi64-edge.config:805-825
Timestamp: 2025-07-27T15:53:30.629Z
Learning: In the Armbian build system, kernel configurations prioritize broad hardware compatibility over optimization concerns. Even when including numerous legacy/obsolete drivers causes technical issues like increased initramfs size and slower enumeration, the project philosophy is to "appease the masses" by ensuring maximum device compatibility rather than optimizing for specific use cases.
Applied to files:
config/kernel/linux-sunxi64-edge.config
config/kernel/linux-sunxi64-current.config
📚 Learning: for starfive2 platform kernel configurations, maintain alignment with vendor-provided configurations...
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.
Applied to files:
config/kernel/linux-sunxi64-edge.config
config/sources/families/sun50iw1.conf
📚 Learning: in armbian build system configuration files like config/sources/families/*.conf, kernelsource is exp...
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/kernel/linux-sunxi64-edge.config
config/sources/families/sun50iw1.conf
📚 Learning: in the armbian build system, the modern recommended approach for kernel configuration is to use the ...
Learnt from: EvilOlaf
PR: armbian/build#0
File: :0-0
Timestamp: 2025-08-02T05:46:10.664Z
Learning: In the Armbian build system, the modern recommended approach for kernel configuration is to use the kernel-config command via "./compile.sh BOARD=boardname BRANCH=branchname kernel-config" instead of the deprecated KERNEL_CONFIGURE=yes flag. This provides a two-step workflow: configure using menuconfig, then build, with better transparency and control over configuration changes.
Applied to files:
config/kernel/linux-sunxi64-edge.config
config/kernel/linux-sunxi64-current.config
📚 Learning: when reviewing kernel configuration files, it's important to verify the actual kconfig dependencies ...
Learnt from: pyavitz
PR: armbian/build#8421
File: config/kernel/linux-sunxi64-edge.config:1058-1061
Timestamp: 2025-07-26T10:43:10.130Z
Learning: When reviewing kernel configuration files, it's important to verify the actual Kconfig dependencies in the source code rather than making assumptions about configuration validity, especially for complex subsystems like I2C drivers where the dependency relationships may be more nuanced than initially apparent.
Applied to files:
config/kernel/linux-sunxi64-edge.config
📚 Learning: config_netkit is a valid kernel configuration option in linux kernel 6.12 and later versions, despit...
Learnt from: lanefu
PR: armbian/build#8377
File: config/kernel/linux-uefi-arm64-cloud.config:165-170
Timestamp: 2025-07-19T00:03:42.995Z
Learning: CONFIG_NETKIT is a valid kernel configuration option in Linux kernel 6.12 and later versions, despite not being present in earlier versions like 6.9/6.10-rc.
Applied to files:
config/kernel/linux-sunxi64-edge.config
config/kernel/linux-sunxi64-current.config
📚 Learning: rtl88x2bu driver support is being integrated into the mainline rtw88 driver, which is why the out-of...
Learnt from: igorpecovnik
PR: armbian/build#8408
File: lib/functions/compilation/patch/drivers_network.sh:303-305
Timestamp: 2025-07-22T07:03:01.165Z
Learning: RTL88x2bu driver support is being integrated into the mainline RTW88 driver, which is why the out-of-tree RTL88x2bu driver is being deprecated starting with kernel 6.12+. The external driver still builds and functions, but the deprecation is due to upstream mainline support becoming available.
Applied to files:
config/kernel/linux-sunxi64-edge.config
config/kernel/linux-sunxi64-current.config
📚 Learning: the wireless driver patches wireless-rtl8812au-fix-6.16.patch, wireless-rtl8811cu-fix-6.16.patch, an...
Learnt from: amazingfate
PR: armbian/build#8453
File: lib/functions/compilation/patch/drivers_network.sh:213-216
Timestamp: 2025-08-02T14:59:28.145Z
Learning: The wireless driver patches wireless-rtl8812au-Fix-6.16.patch, wireless-rtl8811cu-Fix-6.16.patch, and wireless-rtl88x2bu-Fix-6.16.patch in the Armbian build system are backward compatible and can be applied unconditionally without version checks, even though they're named for 6.16+ fixes.
Applied to files:
config/kernel/linux-sunxi64-edge.config
config/kernel/linux-sunxi64-current.config
📚 Learning: in the armbian build system, when copying firmware files during family_tweaks_s(), use /lib/firmware...
Learnt from: pyavitz
PR: armbian/build#8455
File: config/sources/families/sun50iw1.conf:19-24
Timestamp: 2025-08-03T15:21:20.148Z
Learning: In the Armbian build system, when copying firmware files during family_tweaks_s(), use /lib/firmware/updates/ instead of /lib/firmware/ to avoid conflicts with the Armbian firmware package. The /lib/firmware/updates directory takes precedence in Linux firmware loading hierarchy and is the proper location for user-installed firmware files.
Applied to files:
config/sources/families/sun50iw1.conf
📚 Learning: for aic8800 bluetooth devices in armbian board configurations, systemd service configurations intent...
Learnt from: pyavitz
PR: armbian/build#8388
File: config/boards/kickpik2b.conf:56-72
Timestamp: 2025-07-17T04:16:29.551Z
Learning: For AIC8800 Bluetooth devices in Armbian board configurations, systemd service configurations intentionally use Type=idle and boot delays because there is no compatibility to load AIC8800 bluetooth in mainline kernel. These delays and service timing are necessary workarounds for hardware limitations rather than performance issues.
Applied to files:
config/sources/families/sun50iw1.conf
📚 Learning: in armbian build system configuration files like config/sources/families/*.conf, when kernelsource i...
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.
Applied to files:
config/sources/families/sun50iw1.conf
📚 Learning: in the armbian build system, board configuration files (*.conf) follow a project standard of not inc...
Learnt from: pyavitz
PR: armbian/build#8388
File: config/boards/kickpik2b.conf:1-14
Timestamp: 2025-07-17T04:12:33.125Z
Learning: In the Armbian build system, board configuration files (*.conf) follow a project standard of not including shebang lines, even though they contain bash code and are sourced by the build system. This is an established Armbian convention that individual contributors are expected to follow, and changes to this standard would require broader project maintainer approval.
Applied to files:
config/sources/families/sun50iw1.conf
🔇 Additional comments (3)
config/kernel/linux-sunxi64-edge.config (1)
886-886
: LGTM! Properly enables RTW88 8723CS wireless driver support.The addition of
CONFIG_RTW88_8723CS=m
correctly enables the upstream RTW88 wireless driver for the 8723CS chipset as a loadable module, which aligns with the PR objective to improve WiFi support for the sun50iw1 board family. The placement within the existing RTW88 configuration section is appropriate.config/sources/families/sun50iw1.conf (2)
19-19
: LGTM! Clear documentation of RTW88 firmware purpose.The comment update properly clarifies that the 8723cs bluetooth firmware is specifically for the RTW88 driver implementation.
22-23
: LGTM! Proper firmware organization for RTW88 driver support.The firmware files are correctly separated into dedicated subdirectories (
rtl_bt
for Bluetooth andrtw88
for WiFi) and placed in/lib/firmware/updates/
which follows Linux firmware loading hierarchy and avoids conflicts with the Armbian firmware package. This structure aligns well with the kernel configuration changes enabling RTW88 8723CS support.
- compile the 8723cs kernel module for Sunxi64 current and edge kernel - run-tested on the Pine64 - source of the *.bin firmware blobs is the kernel git repository https://git.kernel.org/pub/scm/linux/kernel/git/ath/linux-firmware.git/tree/rtw88 hashes verified by Rolf Leggewie <[email protected]>
ea78a9a
to
75f5664
Compare
I have force-pushed the fix with the space as mentioned by code rabbit. What is needed to publish the firmware files in the firmware repo as suggested by @pyavitz ? |
It's done armbian/firmware#114 |
I assume that we do not need the firmware binaries anymore in this repo, as well as the modifications to put them in the /lib/firmware/updates, right? |
Yes, you can remove it. What happened to the BT firmware? I see it in the conf file, but not in the PR. ?
|
As I stated previously, the rtl_bt firmware was already there when I started to work on solving the wifi problems. I essentially matched the structure that was already in place, with putting the firmware in the files and then cp-ing it into the /lib/firmware/XXX. It has nothing to do with my work to begin with but I'd be happy to help make everything cleaner if anything |
While we're at it, it would be good to push those to the firmware repo as well. |
I see now, the firmware is already located @ Looks like special use case. |
This continues PR #8455. Original description:
Modifying kernel config for sunxi64 to compile the 8723cs kernel module, adding the correct firmware binaries from the kernel.org tree and modifying the sun50iw1 config file to move the new firmware files to /lib/firmware/rtw88
Description
This is the 1:1 reproduction of changes I have made on my personal pinebook-a64 to get the wifi to natively work.
I have "ticked" the correct kernel module to compile, added the firmware binaries to /lib/firmware/rtw88 and modified the sun50iw1.conf to cp the new firmware files to the correct place.
It only fixes the wifi issue for the current and edge kernels, not the legacy (which doesn't have a kernel module option for the realtek 8723cs.
There was no issue / ticket attached to this PR, all of this work has been independent from any feature request.
How Has This Been Tested?
I first made all those changes by hand on my machine + recompiled the kernel to get it working.
Then once everything was well, I did all the changes on the build repo, launched the compilation for my specific "BOARD" and tested a few different senarios.
Current kernel, edge kernel, on a minimal install, on a fully featured install, with different desktop environments etc..
About 7 different combinations have been tested briefly, only the last one being used for the longuest amount of time.
Edge, with environment (i3wm), no compositor and the default internet utilities.
I've been using that machine for about a month and half with 0 issue to report.
Checklist: