more script updates

pull/19/head
morrownr 2022-12-04 21:53:57 -06:00
parent 40afaec38d
commit 4c04fd14de
3 changed files with 22 additions and 8 deletions

View File

@ -115,7 +115,7 @@ EXTRA_CFLAGS += -DCONFIG_RTW_ANDROID=$(CONFIG_RTW_ANDROID)
endif endif
########################## Debug ########################### ########################## Debug ###########################
CONFIG_RTW_DEBUG = y CONFIG_RTW_DEBUG = n
# default log level is _DRV_INFO_ = 4, # default log level is _DRV_INFO_ = 4,
# please refer to "How_to_set_driver_debug_log_level.doc" to set the available level. # please refer to "How_to_set_driver_debug_log_level.doc" to set the available level.
CONFIG_RTW_LOG_LEVEL = 0 CONFIG_RTW_LOG_LEVEL = 0

View File

@ -5,7 +5,7 @@
# Supports dkms and non-dkms installations. # Supports dkms and non-dkms installations.
SCRIPT_NAME="install-driver.sh" SCRIPT_NAME="install-driver.sh"
SCRIPT_VERSION="20221125" SCRIPT_VERSION="20221204"
MODULE_NAME="8821cu" MODULE_NAME="8821cu"
DRV_VERSION="5.12.0.4" DRV_VERSION="5.12.0.4"
OPTIONS_FILE="${MODULE_NAME}.conf" OPTIONS_FILE="${MODULE_NAME}.conf"
@ -30,6 +30,15 @@ then
exit 1 exit 1
fi fi
# check to ensure mokutil is installed
if ! command -v mokutil >/dev/null 2>&1
then
echo "A required package appears to not be installed."
echo "Please install the following package: mokutil"
echo "Once the package is installed, please run \"sudo ./${SCRIPT_NAME}\""
exit 1
fi
# check to ensure nano is installed # check to ensure nano is installed
if ! command -v nano >/dev/null 2>&1 if ! command -v nano >/dev/null 2>&1
then then
@ -88,13 +97,19 @@ then
fi fi
# information that helps with bug reports # information that helps with bug reports
# kernel # kernel
echo "Linux Kernel=${KVER}" echo "Linux Kernel=${KVER}"
# architecture - for ARM: aarch64 = 64 bit, armv7l = 32 bit # architecture - for ARM: aarch64 = 64 bit, armv7l = 32 bit
echo "CPU Architecture=${KARCH}" echo "CPU Architecture=${KARCH}"
# gcc version # gcc version
echo "gcc --version | grep -i gcc" gcc_ver=$(gcc --version | grep -i gcc)
#getconf LONG_BIT (may be handy in the future) echo "gcc --version="${gcc_ver}
# check for secure mode
#
# blacklist the in-kernel module (driver) so that there is no conflict # blacklist the in-kernel module (driver) so that there is no conflict
echo "Installing ${BLACKLIST_FILE} to: /etc/modprobe.d" echo "Installing ${BLACKLIST_FILE} to: /etc/modprobe.d"
@ -217,14 +232,12 @@ fi
if [ $NO_PROMPT -ne 1 ] if [ $NO_PROMPT -ne 1 ]
then then
read -p "Do you want to edit the driver options file now? [y/N] " -n 1 -r read -p "Do you want to edit the driver options file now? [y/N] " -n 1 -r
echo
if [[ $REPLY =~ ^[Yy]$ ]] if [[ $REPLY =~ ^[Yy]$ ]]
then then
nano /etc/modprobe.d/${OPTIONS_FILE} nano /etc/modprobe.d/${OPTIONS_FILE}
fi fi
read -p "Do you want to reboot now? (recommended) [y/N] " -n 1 -r read -p "Do you want to reboot now? (recommended) [y/N] " -n 1 -r
echo
if [[ $REPLY =~ ^[Yy]$ ]] if [[ $REPLY =~ ^[Yy]$ ]]
then then
reboot reboot

View File

@ -5,7 +5,7 @@
# Supports dkms and non-dkms removals. # Supports dkms and non-dkms removals.
SCRIPT_NAME="remove-driver.sh" SCRIPT_NAME="remove-driver.sh"
SCRIPT_VERSION="20221125" SCRIPT_VERSION="20221204"
MODULE_NAME="8821cu" MODULE_NAME="8821cu"
DRV_VERSION="5.12.0.4" DRV_VERSION="5.12.0.4"
OPTIONS_FILE="${MODULE_NAME}.conf" OPTIONS_FILE="${MODULE_NAME}.conf"
@ -61,11 +61,12 @@ then
fi fi
# information that helps with bug reports # information that helps with bug reports
# kernel # kernel
echo "Linux Kernel=${KVER}" echo "Linux Kernel=${KVER}"
# architecture - for ARM: aarch64 = 64 bit, armv7l = 32 bit # architecture - for ARM: aarch64 = 64 bit, armv7l = 32 bit
echo "CPU Architecture=${KARCH}" echo "CPU Architecture=${KARCH}"
#getconf LONG_BIT (may be handy in the future)
# determine if dkms is installed and run the appropriate routines # determine if dkms is installed and run the appropriate routines
if command -v dkms >/dev/null 2>&1 if command -v dkms >/dev/null 2>&1