rtl882bu-dkms: fix for arch-generic dkms build
Fixes https://github.com/void-linux/void-packages/issues/24106 Tested on ppc64le.
This commit is contained in:
parent
37e50b7637
commit
752179bf37
|
@ -0,0 +1,44 @@
|
|||
From 9cecd7211e1c41ce0716f923961cc07b119be573 Mon Sep 17 00:00:00 2001
|
||||
From: Daniel Kolesa <daniel@octaforge.org>
|
||||
Date: Sat, 12 Dec 2020 05:03:29 +0100
|
||||
Subject: [PATCH] void arch-generic plumbing bits
|
||||
|
||||
---
|
||||
Makefile | 14 +++++++++++++-
|
||||
1 file changed, 13 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/Makefile b/Makefile
|
||||
index 29da0bf..d58bc95 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -97,7 +97,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
|
||||
@@ -1030,6 +1031,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
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
# Template file for 'rtl8822bu-dkms'
|
||||
pkgname=rtl8822bu-dkms
|
||||
version=20201020
|
||||
revision=1
|
||||
revision=2
|
||||
_gitrev=66aae0e630e9886acee2386c0623ca479130c8b8
|
||||
wrksrc="rtl8822bu-${_gitrev}"
|
||||
depends="dkms"
|
||||
|
@ -13,6 +13,25 @@ distfiles="https://github.com/EntropicEffect/rtl8822bu/archive/${_gitrev}.tar.gz
|
|||
checksum=0bc16641ffeb59517d935774bd3fcf62a3d51cf6f88f7f76bd520a5e3b8124d2
|
||||
dkms_modules="88x2bu ${version}"
|
||||
|
||||
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() {
|
||||
vmkdir /usr/src/88x2bu-${version}
|
||||
vcopy "*" usr/src/88x2bu-${version}
|
||||
|
|
Loading…
Reference in New Issue