mirror of
https://github.com/void-linux/void-packages.git
synced 2025-06-05 06:33:50 +02:00
New package: rtl8821au-dkms-20210708
This commit is contained in:
parent
51745ee58f
commit
29e47dd596
2 changed files with 83 additions and 0 deletions
30
srcpkgs/rtl8821au-dkms/patches/endianess.patch
Normal file
30
srcpkgs/rtl8821au-dkms/patches/endianess.patch
Normal file
|
@ -0,0 +1,30 @@
|
||||||
|
--- a/Makefile
|
||||||
|
+++ b/Makefile
|
||||||
|
@@ -152,7 +152,8 @@ CONFIG_LAYER2_ROAMING = y
|
||||||
|
#bit0: ROAM_ON_EXPIRED, #bit1: ROAM_ON_RESUME, #bit2: ROAM_ACTIVE
|
||||||
|
CONFIG_ROAMING_FLAG = 0x3
|
||||||
|
###################### Platform Related #######################
|
||||||
|
-CONFIG_PLATFORM_AUTODETECT = y
|
||||||
|
+CONFIG_PLATFORM_AUTODETECT = n
|
||||||
|
+CONFIG_PLATFORM_VENDOR_DKMS = y
|
||||||
|
CONFIG_PLATFORM_I386_PC = n
|
||||||
|
CONFIG_PLATFORM_ANDROID_X86 = n
|
||||||
|
CONFIG_PLATFORM_ANDROID_INTEL_X86 = n
|
||||||
|
@@ -1381,6 +1382,17 @@ STAGINGMODDIR := /lib/modules/$(KVER)/ke
|
||||||
|
endif
|
||||||
|
# *** End AUTODETECT ***
|
||||||
|
|
||||||
|
+ifeq ($(CONFIG_PLATFORM_VENDOR_DKMS), y)
|
||||||
|
+EXTRA_CFLAGS += -DCONFIG_@@VOID_ENDIAN@@_ENDIAN
|
||||||
|
+EXTRA_CFLAGS += -DCONFIG_IOCTL_CFG80211 -DRTW_USE_CFG80211_STA_EVENT
|
||||||
|
+ARCH := @@VOID_ARCH@@
|
||||||
|
+KVER ?= $(shell uname -r)
|
||||||
|
+KSRC ?= /usr/lib/modules/$(KVER)/build
|
||||||
|
+MODDESTDIR := /usr/lib/modules/$(KVER)/kernel/drivers/net/wireless/
|
||||||
|
+INSTALL_PREFIX :=
|
||||||
|
+STAGINGMODDIR := /usr/lib/modules/$(KVER)/kernel/drivers/staging
|
||||||
|
+endif
|
||||||
|
+
|
||||||
|
ifeq ($(CONFIG_PLATFORM_I386_PC), y)
|
||||||
|
EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN
|
||||||
|
EXTRA_CFLAGS += -DCONFIG_IOCTL_CFG80211 -DRTW_USE_CFG80211_STA_EVENT
|
53
srcpkgs/rtl8821au-dkms/template
Normal file
53
srcpkgs/rtl8821au-dkms/template
Normal file
|
@ -0,0 +1,53 @@
|
||||||
|
# Template file for 'rtl8821au-dkms'
|
||||||
|
pkgname=rtl8821au-dkms
|
||||||
|
version=20210708
|
||||||
|
revision=1
|
||||||
|
_modver=5.12.5.2
|
||||||
|
_gitrev=19660ee3f67125d2ef31b626f9fff946bd3e8d01
|
||||||
|
depends="dkms"
|
||||||
|
short_desc="Realtek 8811AU/8821AU USB WiFi driver (DKMS)"
|
||||||
|
maintainer="Orphaned <orphan@voidlinux.org>"
|
||||||
|
license="GPL-2.0-only"
|
||||||
|
homepage="https://github.com/morrownr/8821au"
|
||||||
|
distfiles="https://github.com/morrownr/8821au-${version}/archive/${_gitrev}.tar.gz"
|
||||||
|
checksum=81a1b25e1e9d83f88ae11eabec4a55df22717f3d6f23417aea495d17a3d6f970
|
||||||
|
dkms_modules="rtl8821au ${_modver}"
|
||||||
|
|
||||||
|
case "$XBPS_TARGET_MACHINE" in
|
||||||
|
x86_64*) _karch="x86_64";;
|
||||||
|
i686*) _karch="i386";;
|
||||||
|
aarch64*) _karch="arm64";;
|
||||||
|
arm*) _karch="arm";;
|
||||||
|
ppc*) _karch="powerpc";;
|
||||||
|
mips*) _karch="mips";;
|
||||||
|
*) broken="kernel arch not defined";;
|
||||||
|
esac
|
||||||
|
|
||||||
|
post_patch() {
|
||||||
|
if [ "$XBPS_TARGET_ENDIAN" = "be" ]; then
|
||||||
|
vsed -i 's,@@VOID_ENDIAN@@,BIG,g' Makefile
|
||||||
|
else
|
||||||
|
vsed -i 's,@@VOID_ENDIAN@@,LITTLE,g' Makefile
|
||||||
|
fi
|
||||||
|
vsed -i "s,@@VOID_ARCH@@,${_karch},g" Makefile
|
||||||
|
rm -f *.patch
|
||||||
|
}
|
||||||
|
|
||||||
|
do_install() {
|
||||||
|
local dest=/usr/src/rtl8821au-${_modver}
|
||||||
|
|
||||||
|
cat <<-EOF >dkms.conf
|
||||||
|
PACKAGE_NAME="rtl8821au"
|
||||||
|
PACKAGE_VERSION="${_modver}"
|
||||||
|
MAKE="'make' KVER=\${kernelver}"
|
||||||
|
BUILT_MODULE_NAME[0]="8821au"
|
||||||
|
DEST_MODULE_LOCATION[0]="/kernel/drivers/net/wireless"
|
||||||
|
EOF
|
||||||
|
vmkdir ${dest}
|
||||||
|
cp -r dkms.conf Kconfig Makefile platform core hal include os_dep ${DESTDIR}/${dest}
|
||||||
|
|
||||||
|
# modules-load.d(5) file.
|
||||||
|
vmkdir usr/lib/modules-load.d
|
||||||
|
echo "8821au" > ${DESTDIR}/usr/lib/modules-load.d/${pkgname}.conf
|
||||||
|
chmod 644 ${DESTDIR}/usr/lib/modules-load.d/${pkgname}.conf
|
||||||
|
}
|
Loading…
Add table
Reference in a new issue