diff --git a/projects/ArchR/devices/RK3326/options b/projects/ArchR/devices/RK3326/options index 4831265998..f87b57ce9b 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="RTL8812AU RTL8814AU RTL8821AU RTL8821CU RTL88x2BU RTL8831 AIC8800 mali-bifrost" + ADDITIONAL_DRIVERS="RTL8188EUS RTL8812AU RTL8814AU RTL8821AU RTL8821CU RTL88x2BU RTL8831 AIC8800 mali-bifrost" # Additional Firmware to use ( ) # Space separated list is supported, diff --git a/projects/ArchR/packages/linux-drivers/RTL8188EUS/modprobe.d/00-rtl8188eus.conf b/projects/ArchR/packages/linux-drivers/RTL8188EUS/modprobe.d/00-rtl8188eus.conf new file mode 100644 index 0000000000..745253cc54 --- /dev/null +++ b/projects/ArchR/packages/linux-drivers/RTL8188EUS/modprobe.d/00-rtl8188eus.conf @@ -0,0 +1,10 @@ +# Prefer the out-of-tree r8188eu driver for RTL8188EUS chipset over +# the in-tree rtl8xxxu (which scans but can't complete WPA2 handshake +# reliably — see archr-linux/Arch-R#19). rtl8xxxu still binds to other +# Realtek USB chips (RTL8192EU, RTL8723BU, etc.), so a blanket +# blacklist of rtl8xxxu would break unrelated dongles. +# +# Default tunables for the out-of-tree driver — IWD does its own MAC +# randomization, power management belongs to mac80211, and we want LED +# blink on activity so users can see the dongle is alive. +options 8188eu rtw_drv_log_level=0 rtw_led_ctrl=1 rtw_power_mgnt=1 diff --git a/projects/ArchR/packages/linux-drivers/RTL8188EUS/package.mk b/projects/ArchR/packages/linux-drivers/RTL8188EUS/package.mk new file mode 100644 index 0000000000..7eb076cc1c --- /dev/null +++ b/projects/ArchR/packages/linux-drivers/RTL8188EUS/package.mk @@ -0,0 +1,35 @@ +# SPDX-License-Identifier: GPL-2.0-or-later +# Copyright (C) 2026-present ArchR (https://github.com/archr-linux/Arch-R) + +PKG_NAME="RTL8188EUS" +PKG_VERSION="ec90af2b3f2f7d2956c7c25d0bbeb536e9ed5f9d" +PKG_LICENSE="GPL" +PKG_SITE="https://github.com/aircrack-ng/rtl8188eus" +PKG_URL="${PKG_SITE}.git" +PKG_LONGDESC="Realtek RTL8188EUS USB WiFi driver (out-of-tree). The +in-tree rtl8xxxu claims this chip but fails the WPA2 4-way handshake +on RTL8188EUS dongles (scan ok, auth times out — issue #19). The +aircrack-ng fork is the maintained driver that completes the +handshake with iwd/wpa_supplicant; the shipped udev rule unbinds +rtl8xxxu from the specific USB IDs at hotplug and lets 8188eu take +over." +PKG_TOOLCHAIN="make" +PKG_IS_KERNEL_PKG="yes" +GET_HANDLER_SUPPORT="git" + +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/realtek/r8188eu + cp 8188eu.ko ${INSTALL}/$(get_full_module_dir)/kernel/drivers/net/wireless/realtek/r8188eu/ +} diff --git a/projects/ArchR/packages/linux-drivers/RTL8188EUS/udev.d/99-rtl8188eus.rules b/projects/ArchR/packages/linux-drivers/RTL8188EUS/udev.d/99-rtl8188eus.rules new file mode 100644 index 0000000000..b1ffa5715d --- /dev/null +++ b/projects/ArchR/packages/linux-drivers/RTL8188EUS/udev.d/99-rtl8188eus.rules @@ -0,0 +1,36 @@ +# Force the out-of-tree r8188eu driver for RTL8188EUS dongles, instead +# of the in-tree rtl8xxxu (which scans but can't complete WPA2 4-way +# handshake on this chip — see archr-linux/Arch-R#19). +# +# rtl8xxxu is loaded for many other RTL chips and we don't want to +# blacklist it globally. Instead, this rule catches the 8188EUS USB +# IDs at hotplug time, unbinds rtl8xxxu from the interface, and +# (re)loads 8188eu. +# +# Known RTL8188EUS USB IDs (vendor:product): +# 0bda:0179 Realtek RTL8188EUS Wireless Adapter +# 0bda:8179 Realtek RTL8188EUS Wireless Adapter (most common) +# 0bda:8189 Realtek RTL8188EUS / "TP-Link TL-WN722N v3" +# 7392:7811 Edimax EW-7811Un (RTL8188EUS rebadge) +# 056e:4008 Elecom WDC-150SU2M (RTL8188EUS rebadge) + +ACTION!="add", GOTO="rtl8188eus_end" +SUBSYSTEM!="usb", GOTO="rtl8188eus_end" +ENV{DEVTYPE}!="usb_device", GOTO="rtl8188eus_end" + +ATTR{idVendor}=="0bda", ATTR{idProduct}=="0179", GOTO="rtl8188eus_swap" +ATTR{idVendor}=="0bda", ATTR{idProduct}=="8179", GOTO="rtl8188eus_swap" +ATTR{idVendor}=="0bda", ATTR{idProduct}=="8189", GOTO="rtl8188eus_swap" +ATTR{idVendor}=="7392", ATTR{idProduct}=="7811", GOTO="rtl8188eus_swap" +ATTR{idVendor}=="056e", ATTR{idProduct}=="4008", GOTO="rtl8188eus_swap" +GOTO="rtl8188eus_end" + +LABEL="rtl8188eus_swap" +# Unbind apenas a interface USB específica do rtl8xxxu (não tira o +# módulo do kernel — outros dongles RTL podem estar conectados ao +# mesmo tempo); depois carrega 8188eu, que vai bindar pela alias +# table. ${BUSNUM} e ${DEVNUM} são fornecidos por udev e identificam +# o device USB sem ambiguidade. +RUN+="/usr/bin/sh -c 'busid=$(basename %p); for drv in /sys/bus/usb/drivers/rtl8xxxu; do [ -e \"$drv/$busid\" ] && echo \"$busid\" > \"$drv/unbind\" 2>/dev/null; done; modprobe 8188eu 2>/dev/null'" + +LABEL="rtl8188eus_end"