rtl8812au-dkms: fix for arch-generic dkms build

This commit is contained in:
q66 2020-12-12 05:27:49 +01:00
parent 4f3807da1c
commit 37e50b7637
2 changed files with 64 additions and 1 deletions

View File

@ -0,0 +1,44 @@
From 9da77ae1fbfd3f3918e1ee76b84c6519b53ab9e7 Mon Sep 17 00:00:00 2001
From: Daniel Kolesa <daniel@octaforge.org>
Date: Sat, 12 Dec 2020 05:05:04 +0100
Subject: [PATCH] void arch-generic plumbing bits
---
Makefile | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git Makefile Makefile
index c7d11ed..4529ac8 100755
--- Makefile
+++ Makefile
@@ -111,7 +111,8 @@ CONFIG_RTW_SDIO_PM_KEEP_POWER = y
###################### MP HW TX MODE FOR VHT #######################
CONFIG_MP_VHT_HW_TX_MODE = n
###################### Platform Related #######################
-CONFIG_PLATFORM_I386_PC = y
+CONFIG_PLATFORM_VOID_NATIVE = y
+CONFIG_PLATFORM_I386_PC = n
CONFIG_PLATFORM_ARM_RPI = n
CONFIG_PLATFORM_ANDROID_X86 = n
CONFIG_PLATFORM_ANDROID_INTEL_X86 = n
@@ -1227,6 +1228,17 @@ endif
EXTRA_CFLAGS += -DDM_ODM_SUPPORT_TYPE=0x04
+ifeq ($(CONFIG_PLATFORM_VOID_NATIVE), 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
--
2.29.2

View File

@ -1,7 +1,7 @@
# Template file for 'rtl8812au-dkms'
pkgname=rtl8812au-dkms
version=20200702
revision=2
revision=3
_modver=5.6.4.2
_gitrev=3110ad65d0f03532bd97b1017cae67ca86dd34f6
wrksrc="rtl8812au-${_modver}-${_gitrev}"
@ -14,6 +14,25 @@ distfiles="https://github.com/gordboy/rtl8812au-${_modver}/archive/${_gitrev}.ta
checksum=398c7524ba150a48c39204372425f4a7c8f84a58ef92e9cca400c3cc0518203f
dkms_modules="rtl8812au ${_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
}
do_install() {
local dest=/usr/src/rtl8812au-${_modver}