From c1b9f27838617c9aa7120109483f0f118e587a7d Mon Sep 17 00:00:00 2001 From: Douglas Teles Date: Wed, 8 Jul 2026 17:53:51 -0300 Subject: [PATCH] RK3326: add out-of-tree drivers for the RTL8852 USB WiFi 6 family The four-distro dongle census left the RTL8852AU/BU/CU chips as the remaining orphans: common WiFi 6 dongles with no mainline USB support on 6.12 (the in-kernel rtw89 only starts covering them in 6.17). Package the maintained vendor drivers (morrownr for BU and CU, both declaring kernels 5.15 to 6.14; lwfinger for AU, with version guards up to 6.9 and strscpy fallbacks in place) pinned to current HEADs, modeled on the sibling morrownr packages. No udev hand-off rules: the USB IDs bind by modalias since nothing else claims them. RTL8831 and AIC8800 stay untouched; they serve validated hardware. --- projects/ArchR/devices/RK3326/options | 2 +- .../linux-drivers/RTL8852AU/package.mk | 28 +++++++++++++++++++ .../linux-drivers/RTL8852BU/package.mk | 28 +++++++++++++++++++ .../linux-drivers/RTL8852CU/package.mk | 28 +++++++++++++++++++ 4 files changed, 85 insertions(+), 1 deletion(-) create mode 100644 projects/ArchR/packages/linux-drivers/RTL8852AU/package.mk create mode 100644 projects/ArchR/packages/linux-drivers/RTL8852BU/package.mk create mode 100644 projects/ArchR/packages/linux-drivers/RTL8852CU/package.mk diff --git a/projects/ArchR/devices/RK3326/options b/projects/ArchR/devices/RK3326/options index 76eadd9713..b06f061d24 100644 --- a/projects/ArchR/devices/RK3326/options +++ b/projects/ArchR/devices/RK3326/options @@ -61,7 +61,7 @@ # for a list of additional drivers see packages/linux-drivers # Space separated list is supported, # e.g. ADDITIONAL_DRIVERS="DRIVER1 DRIVER2" - ADDITIONAL_DRIVERS="rk915 RTL8188EUS RTL8812AU RTL8814AU RTL8821AU RTL8821CU RTL88x2BU RTL8831 AIC8800 mali-bifrost" + ADDITIONAL_DRIVERS="rk915 RTL8188EUS RTL8812AU RTL8814AU RTL8821AU RTL8821CU RTL88x2BU RTL8831 RTL8852AU RTL8852BU RTL8852CU AIC8800 mali-bifrost" # Additional Firmware to use ( ) # Space separated list is supported, diff --git a/projects/ArchR/packages/linux-drivers/RTL8852AU/package.mk b/projects/ArchR/packages/linux-drivers/RTL8852AU/package.mk new file mode 100644 index 0000000000..9cdfc952bf --- /dev/null +++ b/projects/ArchR/packages/linux-drivers/RTL8852AU/package.mk @@ -0,0 +1,28 @@ +# SPDX-License-Identifier: GPL-2.0 +# Copyright (C) 2026-present ArchR (https://github.com/archr-linux/Arch-R) + +PKG_NAME="RTL8852AU" +PKG_VERSION="865ab0fa91471d595c283d2f3db323f7f15455f5" +PKG_LICENSE="GPL" +PKG_SITE="https://github.com/lwfinger/rtl8852au" +PKG_URL="${PKG_SITE}.git" +PKG_LONGDESC="Realtek RTL8852AU USB WiFi 6 driver. Out of tree because mainline has no USB glue for this chip on 6.12; the in-kernel rtw89 only gains 8852AU USB support past 6.17." +PKG_TOOLCHAIN="make" +PKG_IS_KERNEL_PKG="yes" + +pre_make_target() { + unset LDFLAGS +} + +make_target() { + make V=1 \ + ARCH=${TARGET_KERNEL_ARCH} \ + KSRC=$(kernel_path) \ + CROSS_COMPILE=${TARGET_KERNEL_PREFIX} \ + CONFIG_POWER_SAVING=y +} + +makeinstall_target() { + mkdir -p ${INSTALL}/$(get_full_module_dir)/kernel/drivers/net/wireless/ + cp *.ko ${INSTALL}/$(get_full_module_dir)/kernel/drivers/net/wireless/ +} diff --git a/projects/ArchR/packages/linux-drivers/RTL8852BU/package.mk b/projects/ArchR/packages/linux-drivers/RTL8852BU/package.mk new file mode 100644 index 0000000000..89b228be72 --- /dev/null +++ b/projects/ArchR/packages/linux-drivers/RTL8852BU/package.mk @@ -0,0 +1,28 @@ +# SPDX-License-Identifier: GPL-2.0 +# Copyright (C) 2026-present ArchR (https://github.com/archr-linux/Arch-R) + +PKG_NAME="RTL8852BU" +PKG_VERSION="59a5918e3dc188bb9055e9ba4690623c434e0e11" +PKG_LICENSE="GPL" +PKG_SITE="https://github.com/morrownr/rtl8852bu-20250826" +PKG_URL="${PKG_SITE}.git" +PKG_LONGDESC="Realtek RTL8852BU USB WiFi 6 driver. Out of tree because mainline has no USB glue for this chip on 6.12; the in-kernel rtw89 only gains 8852BU USB support in 6.17." +PKG_TOOLCHAIN="make" +PKG_IS_KERNEL_PKG="yes" + +pre_make_target() { + unset LDFLAGS +} + +make_target() { + make V=1 \ + ARCH=${TARGET_KERNEL_ARCH} \ + KSRC=$(kernel_path) \ + CROSS_COMPILE=${TARGET_KERNEL_PREFIX} \ + CONFIG_POWER_SAVING=y +} + +makeinstall_target() { + mkdir -p ${INSTALL}/$(get_full_module_dir)/kernel/drivers/net/wireless/ + cp *.ko ${INSTALL}/$(get_full_module_dir)/kernel/drivers/net/wireless/ +} diff --git a/projects/ArchR/packages/linux-drivers/RTL8852CU/package.mk b/projects/ArchR/packages/linux-drivers/RTL8852CU/package.mk new file mode 100644 index 0000000000..a5d818734b --- /dev/null +++ b/projects/ArchR/packages/linux-drivers/RTL8852CU/package.mk @@ -0,0 +1,28 @@ +# SPDX-License-Identifier: GPL-2.0 +# Copyright (C) 2026-present ArchR (https://github.com/archr-linux/Arch-R) + +PKG_NAME="RTL8852CU" +PKG_VERSION="1530c38e5b1be6d1e96a31cf4f3602a9c23f2465" +PKG_LICENSE="GPL" +PKG_SITE="https://github.com/morrownr/rtl8852cu-20251113" +PKG_URL="${PKG_SITE}.git" +PKG_LONGDESC="Realtek RTL8852CU USB WiFi 6 driver. Out of tree because mainline has no USB glue for this chip on 6.12; the in-kernel rtw89 only gains 8852CU USB support past 6.17." +PKG_TOOLCHAIN="make" +PKG_IS_KERNEL_PKG="yes" + +pre_make_target() { + unset LDFLAGS +} + +make_target() { + make V=1 \ + ARCH=${TARGET_KERNEL_ARCH} \ + KSRC=$(kernel_path) \ + CROSS_COMPILE=${TARGET_KERNEL_PREFIX} \ + CONFIG_POWER_SAVING=y +} + +makeinstall_target() { + mkdir -p ${INSTALL}/$(get_full_module_dir)/kernel/drivers/net/wireless/ + cp *.ko ${INSTALL}/$(get_full_module_dir)/kernel/drivers/net/wireless/ +}