Skip to content

Conversation

amazingfate
Copy link
Contributor

Description

There is a dtb in mainline source tree, and it is usable now. Also add some patches to enable the sdio wifi, and I also update rtl8852bs for mainline kernel.
The PR of rtl8852bs is not yet merged, so I use the commit from my fork.

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Please also note any relevant details for your test configuration.

  • ./compile.sh kernel BOARD=armsom-sige5 BRANCH=edge KERNEL_CONFIGURE=no DEB_COMPRESS=xz KERNEL_BTF=yes KERNEL_GIT=shallow
  • Armsom-sige5 boots fine

Checklist:

Please delete options that are not relevant.

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • My changes generate no new warnings
  • Any dependent changes have been merged and published in downstream modules

@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 Sep 7, 2025
@github-actions github-actions bot added Framework Framework components Patches Patches related to kernel, U-Boot, ... labels Sep 7, 2025
@HeyMeco
Copy link
Collaborator

HeyMeco commented Sep 7, 2025

Personal opinion: We shouldn’t add device tree's via patches. Rather let the autopatcher add the devicetree file from the patchfolder/dt/ with the PR just stating where it comes from. Makes it easier to modify in the future too

Copy link
Contributor

coderabbitai bot commented Sep 7, 2025

Walkthrough

  • config/boards/armsom-sige5.csc: KERNEL_TARGET updated from "vendor" to "vendor|edge".
  • config/kernel/linux-rockchip64-edge.config: Adds CONFIG_RTL8852BS=m.
  • lib/functions/compilation/patch/drivers_network.sh: Extends RTL8852BS patching to rockchip64 (kernel >= 6.1), updates rtl8852bs_ver to commit 8fa9401084686a645e0a6da359610cc8fce22dc5, and adjusts Makefile platform case from rk35xx to rk35xx|rockchip64.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested labels

BSP, size/medium

Suggested reviewers

  • rpardini
  • EvilOlaf
  • igorpecovnik
  • pyavitz
  • krachlatte
  • brentr
✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 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

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

@coderabbitai coderabbitai bot requested a review from EvilOlaf September 7, 2025 16:55
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: 1

🧹 Nitpick comments (2)
config/boards/armsom-sige5.csc (1)

5-5: Edge target enabled: OK. Please source DT via autopatcher, not patching DTS/DTB directly.

Use the dt autopatcher (patchfolder/dt/) and note the upstream DTS location in the PR for easier future updates.

I can add the autopatcher entry and doc snippet if you want.

lib/functions/compilation/patch/drivers_network.sh (1)

398-402: Replace inline sed hack with a tracked patch.

Move the RTW_WARN_LMT workaround into patch/misc to keep driver modifications reproducible and hashed with the kernel drivers set.

-		# Bugfix/workaround: Comment undefined RTW_WARN_LMT
-		# @TODO Check on update if this fix is still needed (added 2024-July-10)
-		sed -i "s/RTW_WARN_LMT(/\/\/RTW_WARN_LMT(/g" \
-			"$kerneldir/drivers/net/wireless/realtek/rtl8852bs/core/rtw_xmit.c"
+		# Bugfix/workaround tracked via patch (see patch/misc/wireless-rtl8852bs-Fix-RTW_WARN_LMT-undefined.patch)
+		process_patch_file "${SRC}/patch/misc/wireless-rtl8852bs-Fix-RTW_WARN_LMT-undefined.patch" "applying"
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • 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 8a4c119 and afe160b.

⛔ Files ignored due to path filters (3)
  • patch/kernel/archive/rockchip64-6.16/rk3576-0001-sige5-wifi.patch is excluded by !patch/**
  • patch/kernel/archive/rockchip64-6.16/rk3576-0002-sige5-usb.patch is excluded by !patch/**
  • patch/kernel/archive/rockchip64-6.16/rk3576-0003-rk3576-sdio.patch is excluded by !patch/**
📒 Files selected for processing (3)
  • config/boards/armsom-sige5.csc (1 hunks)
  • config/kernel/linux-rockchip64-edge.config (1 hunks)
  • lib/functions/compilation/patch/drivers_network.sh (2 hunks)
🧰 Additional context used
🧠 Learnings (10)
📓 Common learnings
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.
📚 Learning: 2025-08-30T04:13:16.457Z
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.

Applied to files:

  • config/kernel/linux-rockchip64-edge.config
📚 Learning: 2025-07-27T15:54:35.119Z
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-rockchip64-edge.config
  • lib/functions/compilation/patch/drivers_network.sh
📚 Learning: 2025-08-21T08:10:59.502Z
Learnt from: leggewie
PR: armbian/build#8524
File: config/boards/orangepi2.csc:6-6
Timestamp: 2025-08-21T08:10:59.502Z
Learning: Not all Armbian boards support all kernel versions (legacy, current, edge). Some boards may only support specific kernel versions due to hardware limitations or lack of mainline support, which is why their KERNEL_TARGET contains only the supported options (e.g., just "legacy").

Applied to files:

  • config/boards/armsom-sige5.csc
📚 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/boards/armsom-sige5.csc
📚 Learning: 2025-08-02T05:46:10.664Z
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/boards/armsom-sige5.csc
📚 Learning: 2025-06-25T03:40:52.109Z
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/boards/armsom-sige5.csc
📚 Learning: 2025-08-02T14:59:28.145Z
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:

  • lib/functions/compilation/patch/drivers_network.sh
📚 Learning: 2025-07-22T07:02:58.863Z
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:

  • lib/functions/compilation/patch/drivers_network.sh
📚 Learning: 2025-08-11T22:00:13.411Z
Learnt from: rafayahmed317
PR: armbian/build#8484
File: config/kernel/linux-rk35xx-vendor.config:904-906
Timestamp: 2025-08-11T22:00:13.411Z
Learning: In the linux-rk35xx-vendor kernel, the LTE driver options (CONFIG_LTE, CONFIG_LTE_RM310, CONFIG_LTE_EM05) are defined as boolean in drivers/net/lte/Kconfig and cannot be built as modules - they must be either built-in (=y) or disabled.

Applied to files:

  • lib/functions/compilation/patch/drivers_network.sh
🧬 Code graph analysis (1)
config/kernel/linux-rockchip64-edge.config (1)
lib/functions/compilation/armbian-kernel.sh (1)
  • armbian_kernel_config__extrawifi_enable_wifi_opts_80211 (24-36)
🔇 Additional comments (2)
lib/functions/compilation/patch/drivers_network.sh (2)

366-422: Extend gating to rockchip64: LGTM.

Including rockchip64 in both the version gate and Makefile platform toggle is correct and consistent.


368-374: Verified commit 8fa9401084686a645e0a6da359610cc8fce22dc5 exists in armbian/wifi-rtl8852bs – no changes needed.

@amazingfate
Copy link
Contributor Author

Personal opinion: We shouldn’t add device tree's via patches. Rather let the autopatcher add the devicetree file from the patchfolder/dt/ with the PR just stating where it comes from. Makes it easier to modify in the future too

There is no dts added in this pr.

@igorpecovnik igorpecovnik merged commit e2f274e into armbian:main Sep 8, 2025
10 of 14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
11 Milestone: Fourth quarter release Framework Framework components 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.

5 participants