upgrade installation and removal scripts
This commit is contained in:
parent
2170e093ed
commit
322efe9318
41
README.md
41
README.md
@ -379,27 +379,19 @@ discover the settings and make a new script that works with your ARM or
|
||||
ARM64 based system, you are welcome to submit the script and information
|
||||
to be included here.
|
||||
|
||||
#### Step 10: Run the installation script ( install-driver.sh or install-driver-no-dkms.sh )
|
||||
#### Step 10: Run the installation script ( install-driver.sh )
|
||||
|
||||
Note: For automated builds (non-interactive), use _NoPrompt_ as an option.
|
||||
|
||||
Option for distros that support `dkms` (almost all)
|
||||
|
||||
```
|
||||
sudo ./install-driver.sh
|
||||
```
|
||||
|
||||
Option for distros that do not support `dkms`
|
||||
|
||||
```
|
||||
sudo ./install-driver-no-dkms.sh
|
||||
```
|
||||
|
||||
Note: If you elect to skip the reboot at the end of the installation
|
||||
script, the driver may not load immediately and the driver options will
|
||||
not be applied. Rebooting is strongly recommended.
|
||||
|
||||
Manual build instructions: The above scripts automate the installation
|
||||
Manual build instructions: The above script automates the installation
|
||||
process, however, if you want to or need to do a command line
|
||||
installation, use the following:
|
||||
|
||||
@ -410,9 +402,8 @@ sudo make install
|
||||
sudo reboot
|
||||
```
|
||||
|
||||
Note: If you use the manual build instructions or the `install-driver-no-dkms.sh`
|
||||
script, you will need to repeat the process each time a new kernel is
|
||||
installed in your distro.
|
||||
Note: If you use the manual build instructions script, you will need
|
||||
to repeat the process each time a new kernel is installed in your distro.
|
||||
|
||||
-----
|
||||
|
||||
@ -629,19 +620,6 @@ present what you know to the devs of your distro via their problem
|
||||
reporting system. Turning off secure boot is NOT a fix. A real fix needs
|
||||
to happen.
|
||||
|
||||
|
||||
-----
|
||||
|
||||
Question: Are there any known problems with AP mode?
|
||||
|
||||
Answer: Overall this driver does a good job with AP mode. During testing
|
||||
and work prior to making this driver available, the team working on this
|
||||
driver noticed some problems in AP mode if used with a Raspberry Pi 4B.
|
||||
We were unable to discover or fix the exact cause of the problem but
|
||||
the workaround is to keep the driver in USB2 mode. This workaround only
|
||||
applies to AP mode with Raspberry Pi 4B. No problems were noted with
|
||||
systems that use x86 or amd64 processors.
|
||||
|
||||
-----
|
||||
|
||||
Question: Can you provide additional information about monitor mode?
|
||||
@ -670,6 +648,17 @@ ALFA AWUS036ACS - [driver](https://github.com/morrownr/8821au-20210708)
|
||||
To ask questions, go to [USB-WiFi](https://github.com/morrownr/USB-WiFi)
|
||||
and post in `Discussions` or `Issues`.
|
||||
|
||||
-----
|
||||
|
||||
Question: Are there any known problems with AP mode?
|
||||
|
||||
Answer: Overall this driver does a good job with AP mode. During testing
|
||||
and work prior to making this driver available, the team working on this
|
||||
driver noticed some problems in AP mode if used with a Raspberry Pi 4B.
|
||||
We were unable to discover or fix the exact cause of the problem but
|
||||
the workaround is to keep the driver in USB2 mode. This workaround only
|
||||
applies to AP mode with Raspberry Pi 4B. No problems were noted with
|
||||
systems that use x86 or amd64 processors.
|
||||
|
||||
-----
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,76 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Purpose: Remove Realtek USB WiFi adapter drivers.
|
||||
#
|
||||
# This version of the removal script does not use dkms.
|
||||
|
||||
SCRIPT_NAME="remove-driver-no-dkms.sh"
|
||||
SCRIPT_VERSION="20220913"
|
||||
OPTIONS_FILE="88x2bu.conf"
|
||||
|
||||
MODULE_NAME="88x2bu"
|
||||
KVER="$(uname -r)"
|
||||
KSRC="/lib/modules/${KVER}/build"
|
||||
MODDESTDIR="/lib/modules/${KVER}/kernel/drivers/net/wireless/"
|
||||
|
||||
BLACKLIST_FILE="rtw88_8822bu.conf"
|
||||
|
||||
# support for NoPrompt allows non-interactive use of this script
|
||||
NO_PROMPT=0
|
||||
|
||||
# get the options
|
||||
while [ $# -gt 0 ]
|
||||
do
|
||||
case $1 in
|
||||
NoPrompt)
|
||||
NO_PROMPT=1 ;;
|
||||
*h|*help|*)
|
||||
echo "Syntax $0 <NoPrompt>"
|
||||
echo " NoPrompt - noninteractive mode"
|
||||
echo " -h|--help - Show help"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
||||
# check to ensure sudo was used
|
||||
if [[ $EUID -ne 0 ]]
|
||||
then
|
||||
echo "You must run this script with superuser (root) privileges."
|
||||
echo "Try: \"sudo ./${SCRIPT_NAME}\""
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# displays script name and version
|
||||
echo "Running ${SCRIPT_NAME} version ${SCRIPT_VERSION}"
|
||||
|
||||
make uninstall
|
||||
RESULT=$?
|
||||
|
||||
if [[ ("$RESULT" = "0")]]
|
||||
then
|
||||
echo "Deleting ${OPTIONS_FILE} from /etc/modprobe.d"
|
||||
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 "You may now delete the driver directory if desired."
|
||||
else
|
||||
echo "An error occurred. Error = ${RESULT}"
|
||||
echo "Please report this error."
|
||||
exit $RESULT
|
||||
fi
|
||||
|
||||
# if NoPrompt is not used, ask user some questions to complete removal
|
||||
if [ $NO_PROMPT -ne 1 ]
|
||||
then
|
||||
read -p "Do you want to reboot now? (recommended) [y/N] " -n 1 -r
|
||||
echo
|
||||
if [[ $REPLY =~ ^[Yy]$ ]]
|
||||
then
|
||||
reboot
|
||||
fi
|
||||
fi
|
||||
|
||||
exit 0
|
@ -2,20 +2,29 @@
|
||||
|
||||
# Purpose: Remove Realtek USB WiFi adapter drivers.
|
||||
#
|
||||
# This version of the removal script uses dkms.
|
||||
# Supports dkms and non-dkms removals.
|
||||
|
||||
SCRIPT_NAME="remove-driver.sh"
|
||||
SCRIPT_VERSION="20220821"
|
||||
SCRIPT_VERSION="20220927"
|
||||
OPTIONS_FILE="88x2bu.conf"
|
||||
BLACKLIST_FILE="rtw88_8822bu.conf"
|
||||
|
||||
MODULE_NAME="88x2bu"
|
||||
KVER="$(uname -r)"
|
||||
KSRC="/lib/modules/${KVER}/build"
|
||||
MODDESTDIR="/lib/modules/${KVER}/kernel/drivers/net/wireless/"
|
||||
|
||||
DRV_NAME="rtl88x2bu"
|
||||
DRV_VERSION="5.13.1"
|
||||
|
||||
DRV_DIR="$(pwd)"
|
||||
KRNL_VERSION="$(uname -r)"
|
||||
|
||||
echo "Running ${SCRIPT_NAME} version ${SCRIPT_VERSION}"
|
||||
# check to ensure sudo was used
|
||||
if [[ $EUID -ne 0 ]]
|
||||
then
|
||||
echo "You must run this script with superuser (root) privileges."
|
||||
echo "Try: \"sudo ./${SCRIPT_NAME}\""
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# support for NoPrompt allows non-interactive use of this script
|
||||
NO_PROMPT=0
|
||||
@ -36,14 +45,8 @@ do
|
||||
shift
|
||||
done
|
||||
|
||||
# check to ensure sudo was used
|
||||
if [[ $EUID -ne 0 ]]
|
||||
then
|
||||
echo "You must run this script with superuser (root) privileges."
|
||||
echo "Try: \"sudo ./${SCRIPT_NAME}\""
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# displays script name and version
|
||||
echo "Running ${SCRIPT_NAME} version ${SCRIPT_VERSION}"
|
||||
echo "Starting removal..."
|
||||
|
||||
dkms remove -m ${DRV_NAME} -v ${DRV_VERSION} --all
|
||||
@ -60,6 +63,9 @@ then
|
||||
rm -f /etc/modprobe.d/${BLACKLIST_FILE}
|
||||
echo "Deleting source files from /usr/src/${DRV_NAME}-${DRV_VERSION}"
|
||||
rm -rf /usr/src/${DRV_NAME}-${DRV_VERSION}
|
||||
echo "Removing a non-dkms installation."
|
||||
rm -f $(MODDESTDIR)$(MODULE_NAME).ko
|
||||
/sbin/depmod -a ${KVER}
|
||||
echo "The driver was removed successfully."
|
||||
echo "You may now delete the driver directory if desired."
|
||||
else
|
||||
@ -68,6 +74,7 @@ else
|
||||
exit $RESULT
|
||||
fi
|
||||
|
||||
# if NoPrompt is not used, ask user some questions to complete removal
|
||||
if [ $NO_PROMPT -ne 1 ]
|
||||
then
|
||||
read -p "Do you want to reboot now? (recommended) [y/N] " -n 1 -r
|
||||
|
Loading…
x
Reference in New Issue
Block a user