Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions net-wireless/rtl8851bu/Manifest
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
DIST rtl8851bu-1.19.10_p20260111.tar.gz 6785265 BLAKE2B b55e618b0e4f8b74ab2e9b98c554dc7cc7abe893ae247d77c7dd2ac3b84caf9a60cbc9f78270f377e231d79260088971c88b52823a701c22188d6dd0db09975e SHA512 cf1262b42aac7335525f3f8dea39907dc450b7efa4d350fd3792cbd2ff39cadf912b5b963fdd2b90638f2c5d97db28a05885eda5abae6d2736470da51cfd3ba5
13 changes: 13 additions & 0 deletions net-wireless/rtl8851bu/metadata.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
<email>mvidal.dp@gmail.com</email>
<name>mvidaldp</name>
</maintainer>

<upstream>
<bugs-to>https://github.com/fofajardo/rtl8851bu/issues</bugs-to>
<remote-id type="github">fofajardo/rtl8851bu</remote-id>
</upstream>
</pkgmetadata>
65 changes: 65 additions & 0 deletions net-wireless/rtl8851bu/rtl8851bu-1.19.10_p20260111.ebuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# Copyright 2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

inherit linux-mod-r1

DESCRIPTION="Realtek RTL8851BU USB Wi-Fi driver (out-of-tree kernel module)"
HOMEPAGE="https://github.com/fofajardo/rtl8851bu"

COMMIT="3e6c300f1117427572cb69d2eff8632535b2f86e"
SRC_URI="https://github.com/fofajardo/rtl8851bu/archive/${COMMIT}.tar.gz -> ${P}.tar.gz"

S="${WORKDIR}/${PN}-${COMMIT}"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64"
RESTRICT="test"

# Upstream claims support up to 6.13, but it is tested working on 6.18
MODULES_KERNEL_MAX="6.13"

# These are commonly required for mac80211 drivers.
CONFIG_CHECK="CFG80211 MAC80211"

# Kernel build tree is required to build external modules.
DEPEND="virtual/linux-sources"

DOCS=( README.md )

src_compile() {
local modlist=( 8851bu )
local modargs=(
KVER="${KV_FULL}"
KSRC="${KV_OUT_DIR}"
KDIR="${KV_OUT_DIR}"
KERNELDIR="${KV_OUT_DIR}"
)

linux-mod-r1_src_compile
}

src_install() {
local modlist=( 8851bu )
linux-mod-r1_src_install
}

pkg_postinst() {
linux-mod-r1_pkg_postinst

elog
elog "If the adapter initially shows up as a 'Driver CD-ROM' device,"
elog "install sys-apps/usb_modeswitch and replug it."
elog
elog "Known issue: this driver may operate in concurrent mode and create"
elog "a second interface (often 'ap0'). If you use NetworkManager, mark it"
elog "unmanaged to prevent crashes/disconnects. Example:"
elog " /etc/NetworkManager/NetworkManager.conf"
elog " [keyfile]"
elog " unmanaged-devices=interface-name:ap0"
elog
elog "Bluetooth on combo adapters is typically handled by the in-kernel 'btusb'"
elog "driver with firmware from sys-firmware/linux-firmware."
}