add disable in-kernel driver support

This commit is contained in:
morrownr 2022-08-21 15:31:50 -05:00
parent 6dda660a6a
commit a18a601f7d
6 changed files with 68 additions and 30 deletions

File diff suppressed because it is too large Load Diff

View File

@ -5,8 +5,9 @@
# This version of the installation script does not use dkms. # This version of the installation script does not use dkms.
SCRIPT_NAME="install-driver-no-dkms.sh" SCRIPT_NAME="install-driver-no-dkms.sh"
SCRIPT_VERSION="20220705" SCRIPT_VERSION="20220821"
OPTIONS_FILE="88x2bu.conf" OPTIONS_FILE="88x2bu.conf"
BLACKLIST_FILE="rtw88_8822bu.conf"
# support for NoPrompt allows non-interactive use of this script # support for NoPrompt allows non-interactive use of this script
NO_PROMPT=0 NO_PROMPT=0
@ -47,9 +48,15 @@ uname -m
#getconf LONG_BIT (need to work on this) #getconf LONG_BIT (need to work on this)
echo "Starting installation..." echo "Starting installation..."
# sets module parameters (driver options)
echo "Copying ${OPTIONS_FILE} to: /etc/modprobe.d" echo "Copying ${OPTIONS_FILE} to: /etc/modprobe.d"
cp -f ${OPTIONS_FILE} /etc/modprobe.d cp -f ${OPTIONS_FILE} /etc/modprobe.d
# blacklist the in-kernel module (driver) so that there is no conflict
echo "Copying ${BLACKLIST_FILE} to: /etc/modprobe.d"
cp -f ${BLACKLIST_FILE} /etc/modprobe.d
make clean make clean
make make
@ -71,6 +78,7 @@ if [[ "$RESULT" != "0" ]]
then then
echo "An error occurred. Error = ${RESULT}" echo "An error occurred. Error = ${RESULT}"
echo "Please report this error." echo "Please report this error."
echo "Please copy all screen output and paste it into the report."
echo "You will need to run the following before reattempting installation." echo "You will need to run the following before reattempting installation."
echo "$ sudo ./remove-driver-no-dkms.sh" echo "$ sudo ./remove-driver-no-dkms.sh"
exit $RESULT exit $RESULT

View File

@ -1,11 +1,16 @@
#!/bin/bash #!/bin/bash
# Purpose: Install Realtek USB WiFi adapter drivers.
#
# This version of the installation script uses dkms.
SCRIPT_NAME="install-driver.sh" SCRIPT_NAME="install-driver.sh"
SCRIPT_VERSION="20220705" SCRIPT_VERSION="20220821"
OPTIONS_FILE="88x2bu.conf"
BLACKLIST_FILE="rtw88_8822bu.conf"
DRV_NAME="rtl88x2bu" DRV_NAME="rtl88x2bu"
DRV_VERSION="5.13.1" DRV_VERSION="5.13.1"
OPTIONS_FILE="88x2bu.conf"
DRV_DIR="$(pwd)" DRV_DIR="$(pwd)"
KRNL_VERSION="$(uname -r)" KRNL_VERSION="$(uname -r)"
@ -60,12 +65,19 @@ uname -m
#getconf LONG_BIT (need to work on this) #getconf LONG_BIT (need to work on this)
echo "Starting installation..." echo "Starting installation..."
# the add command requires source in /usr/src/${DRV_NAME}-${DRV_VERSION} # the add command requires source in /usr/src/${DRV_NAME}-${DRV_VERSION}
echo "Copying source files to: /usr/src/${DRV_NAME}-${DRV_VERSION}" echo "Copying source files to: /usr/src/${DRV_NAME}-${DRV_VERSION}"
cp -rf "${DRV_DIR}" /usr/src/${DRV_NAME}-${DRV_VERSION} cp -rf "${DRV_DIR}" /usr/src/${DRV_NAME}-${DRV_VERSION}
# sets module parameters (driver options)
echo "Copying ${OPTIONS_FILE} to: /etc/modprobe.d" echo "Copying ${OPTIONS_FILE} to: /etc/modprobe.d"
cp -f ${OPTIONS_FILE} /etc/modprobe.d cp -f ${OPTIONS_FILE} /etc/modprobe.d
# blacklist the in-kernel module (driver) so that there is no conflict
echo "Copying ${BLACKLIST_FILE} to: /etc/modprobe.d"
cp -f ${BLACKLIST_FILE} /etc/modprobe.d
dkms add -m ${DRV_NAME} -v ${DRV_VERSION} dkms add -m ${DRV_NAME} -v ${DRV_VERSION}
RESULT=$? RESULT=$?

View File

@ -5,8 +5,9 @@
# This version of the removal script does not use dkms. # This version of the removal script does not use dkms.
SCRIPT_NAME="remove-driver-no-dkms.sh" SCRIPT_NAME="remove-driver-no-dkms.sh"
SCRIPT_VERSION="20220419" SCRIPT_VERSION="20220821"
OPTIONS_FILE="88x2bu.conf" OPTIONS_FILE="88x2bu.conf"
BLACKLIST_FILE="rtw88_8822bu.conf"
echo "Running ${SCRIPT_NAME} version ${SCRIPT_VERSION}" echo "Running ${SCRIPT_NAME} version ${SCRIPT_VERSION}"
@ -46,7 +47,10 @@ if [[ ("$RESULT" = "0")]]
then then
echo "Deleting ${OPTIONS_FILE} from /etc/modprobe.d" echo "Deleting ${OPTIONS_FILE} from /etc/modprobe.d"
rm -f /etc/modprobe.d/${OPTIONS_FILE} rm -f /etc/modprobe.d/${OPTIONS_FILE}
echo "Deleting ${BLACKLIST_FILE} from /etc/modprobe.d"
rm -f /etc/modprobe.d/${BLACKLIST_FILE}
echo "The driver was removed successfully." echo "The driver was removed successfully."
echo "You may now delete the driver directory if desired."
else else
echo "An error occurred. Error = ${RESULT}" echo "An error occurred. Error = ${RESULT}"
echo "Please report this error." echo "Please report this error."

View File

@ -1,11 +1,16 @@
#!/bin/bash #!/bin/bash
# Purpose: Remove Realtek USB WiFi adapter drivers.
#
# This version of the removal script uses dkms.
SCRIPT_NAME="remove-driver.sh" SCRIPT_NAME="remove-driver.sh"
SCRIPT_VERSION="20211212" SCRIPT_VERSION="20220821"
OPTIONS_FILE="88x2bu.conf"
BLACKLIST_FILE="rtw88_8822bu.conf"
DRV_NAME="rtl88x2bu" DRV_NAME="rtl88x2bu"
DRV_VERSION="5.13.1" DRV_VERSION="5.13.1"
OPTIONS_FILE="88x2bu.conf"
DRV_DIR="$(pwd)" DRV_DIR="$(pwd)"
KRNL_VERSION="$(uname -r)" KRNL_VERSION="$(uname -r)"
@ -52,6 +57,8 @@ if [[ ("$RESULT" = "0")||("$RESULT" = "3") ]]
then then
echo "Deleting ${OPTIONS_FILE} from /etc/modprobe.d" echo "Deleting ${OPTIONS_FILE} from /etc/modprobe.d"
rm -f /etc/modprobe.d/${OPTIONS_FILE} rm -f /etc/modprobe.d/${OPTIONS_FILE}
echo "Deleting ${BLACKLIST_FILE} from /etc/modprobe.d"
rm -f /etc/modprobe.d/${BLACKLIST_FILE}
echo "Deleting source files from /usr/src/${DRV_NAME}-${DRV_VERSION}" echo "Deleting source files from /usr/src/${DRV_NAME}-${DRV_VERSION}"
rm -rf /usr/src/${DRV_NAME}-${DRV_VERSION} rm -rf /usr/src/${DRV_NAME}-${DRV_VERSION}
echo "The driver was removed successfully." echo "The driver was removed successfully."

1
rtw88_8822bu.conf Normal file
View File

@ -0,0 +1 @@
blacklist rtw88_8822bu