numerous updates to scripts and docs
This commit is contained in:
parent
83db18e610
commit
8713ef1364
13
88x2bu.conf
13
88x2bu.conf
@ -10,7 +10,7 @@
|
||||
blacklist rtw88_8822bu
|
||||
#
|
||||
# Edit the following line to change, add or delete options:
|
||||
options 88x2bu rtw_drv_log_level=1 rtw_led_ctrl=1 rtw_vht_enable=1 rtw_switch_usb_mode=0
|
||||
options 88x2bu rtw_drv_log_level=0 rtw_led_ctrl=1 rtw_vht_enable=1 rtw_switch_usb_mode=0
|
||||
#
|
||||
# Note: To activate USB3 mode, change rtw_switch_usb_mode above to rtw_switch_usb_mode=1
|
||||
#
|
||||
@ -27,21 +27,14 @@ options 88x2bu rtw_drv_log_level=1 rtw_led_ctrl=1 rtw_vht_enable=1 rtw_switch_us
|
||||
#
|
||||
# Log options ( rtw_drv_log_level )
|
||||
#
|
||||
# 0 = NONE
|
||||
# 1 = ALWAYS (default)
|
||||
# 0 = NONE (default)
|
||||
# 1 = ALWAYS
|
||||
# 2 = ERROR
|
||||
# 3 = WARNING
|
||||
# 4 = INFO
|
||||
# 5 = DEBUG
|
||||
# 6 = MAX
|
||||
#
|
||||
# Note: You can save a log file that only includes RTW log entries by running
|
||||
# the following in a terminal:
|
||||
#
|
||||
# sudo ./save-log.sh
|
||||
#
|
||||
# Note: The name of the log file will be `rtw.log`.
|
||||
#
|
||||
# -----
|
||||
#
|
||||
# LED options ( rtw_led_ctrl )
|
||||
|
25
FAQ.md
25
FAQ.md
@ -196,13 +196,32 @@ dtoverlay=disable-wifi
|
||||
|
||||
-----
|
||||
|
||||
Question: After `sudo apt upgrade`, my 32 Bit Raspberry Pi OS runs on a 64 bit
|
||||
kernel and now I can't compile an out-of-kernel Realtek driver.
|
||||
Question: When running `sudo sh install-driver.sh` on my RasPi 4B or
|
||||
400, I see the following:
|
||||
|
||||
Answer: See:
|
||||
```
|
||||
Your kernel header files aren't properly installed.
|
||||
Please consult your distro documentation or user support forums.
|
||||
Once the header files are properly installed, please run...
|
||||
```
|
||||
|
||||
Answer: The Pi 4/400 firmware now prefers the 64-bit kernel if one
|
||||
exists so even if you installed the 32 bit version of the RasPiOS,
|
||||
you may now have the 64 bit kernel active.
|
||||
|
||||
The fix:
|
||||
|
||||
add the following to /boot/config.txt and reboot:
|
||||
|
||||
arm_64bit=0
|
||||
|
||||
Reference:
|
||||
|
||||
https://forums.raspberrypi.com/viewtopic.php?p=2091532&hilit=Tp+link#p2091532
|
||||
|
||||
Note to RasPiOS devs: We really really wish you would consider the
|
||||
consequences of the changes you make. Thank you.
|
||||
|
||||
-----
|
||||
|
||||
Question: Were compromises made to make this work on EL8 (RHEL, CentOS,
|
||||
|
1
Kconfig
1
Kconfig
@ -1,7 +1,6 @@
|
||||
config RTL8822BU
|
||||
tristate "Realtek 8822B USB WiFi"
|
||||
depends on USB
|
||||
select WIRELESS_EXT
|
||||
help
|
||||
Help message of RTL8822BU
|
||||
|
||||
|
@ -9,10 +9,7 @@ SMEM=$(LANG=C free | awk '/Mem:/ { print $2 }')
|
||||
# sproc needs to be set here if dkms build is not initiated by install-driver.sh
|
||||
sproc=$(nproc)
|
||||
|
||||
# calculate number of cores to be used in order to avoid Out of Memory
|
||||
# condition in low-RAM systems by limiting core usage.
|
||||
# this section of code is also in the file install-driver.sh and that
|
||||
# code should stay the same as this code.
|
||||
# avoid Out of Memory condition in low-RAM systems by limiting core usage
|
||||
if [ "$sproc" -gt 1 ]; then
|
||||
if [ "$SMEM" -lt 1400000 ]; then
|
||||
sproc=2
|
||||
|
BIN
docs/dkms/Ubuntu Manpage_ dkms.pdf
Normal file
BIN
docs/dkms/Ubuntu Manpage_ dkms.pdf
Normal file
Binary file not shown.
@ -24,7 +24,7 @@
|
||||
# GNU General Public License for more details.
|
||||
|
||||
SCRIPT_NAME="edit-options.sh"
|
||||
# SCRIPT_VERSION="20230126"
|
||||
# SCRIPT_VERSION="20230710"
|
||||
OPTIONS_FILE="88x2bu.conf"
|
||||
|
||||
# check to ensure sudo was used to start the script
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -28,18 +28,26 @@
|
||||
# GNU General Public License for more details.
|
||||
|
||||
SCRIPT_NAME="remove-driver.sh"
|
||||
SCRIPT_VERSION="20230226"
|
||||
MODULE_NAME="88x2bu"
|
||||
SCRIPT_VERSION="20230830"
|
||||
|
||||
DRV_NAME="rtl88x2bu"
|
||||
DRV_VERSION="5.13.1"
|
||||
MODULE_NAME="88x2bu"
|
||||
|
||||
#KARCH="$(uname -m)"
|
||||
if [ -z "${KARCH+1}" ]; then
|
||||
KARCH="$(uname -m)"
|
||||
KVER="$(uname -r)"
|
||||
MODDESTDIR="/lib/modules/${KVER}/kernel/drivers/net/wireless/"
|
||||
fi
|
||||
|
||||
DRV_NAME="rtl${MODULE_NAME}"
|
||||
#KVER="$(uname -r)"
|
||||
if [ -z "${KVER+1}" ]; then
|
||||
KVER="$(uname -r)"
|
||||
fi
|
||||
|
||||
MODDESTDIR="/lib/modules/${KVER}/kernel/drivers/net/wireless/"
|
||||
OPTIONS_FILE="${MODULE_NAME}.conf"
|
||||
|
||||
# check to ensure sudo was used to start the script
|
||||
# check to ensure sudo or su - was used to start the script
|
||||
if [ "$(id -u)" -ne 0 ]; then
|
||||
echo "You must run this script with superuser (root) privileges."
|
||||
echo "Try: \"sudo ./${SCRIPT_NAME}\""
|
||||
@ -49,7 +57,8 @@ fi
|
||||
# support for the NoPrompt option allows non-interactive use of this script
|
||||
NO_PROMPT=0
|
||||
# get the script options
|
||||
while [ $# -gt 0 ]; do
|
||||
while [ $# -gt 0 ]
|
||||
do
|
||||
case $1 in
|
||||
NoPrompt)
|
||||
NO_PROMPT=1 ;;
|
||||
@ -70,8 +79,8 @@ echo ": ${SCRIPT_NAME} v${SCRIPT_VERSION}"
|
||||
|
||||
# information that helps with bug reports
|
||||
|
||||
# display architecture
|
||||
echo ": ${KARCH} (architecture)"
|
||||
# display kernel architecture
|
||||
echo ": ${KARCH} (kernel architecture)"
|
||||
|
||||
# display kernel version
|
||||
echo ": ${KVER} (kernel version)"
|
||||
@ -105,11 +114,19 @@ if [ -f "/usr/lib/modules/${KVER}/kernel/drivers/net/wireless/${DRV_NAME}/${MODU
|
||||
/sbin/depmod -a "${KVER}"
|
||||
fi
|
||||
|
||||
# determine if dkms is installed and run the appropriate routines
|
||||
# check for and remove all dkms installations with DRV_NAME
|
||||
#
|
||||
# dkms status [module/module-version] [-k kernel/arch]
|
||||
#
|
||||
# $ dkms status
|
||||
#
|
||||
if command -v dkms >/dev/null 2>&1; then
|
||||
echo "Removing a dkms installation."
|
||||
# 2>/dev/null suppresses the output of dkms
|
||||
dkms remove -m ${DRV_NAME} -v ${DRV_VERSION} --all 2>/dev/null
|
||||
dkms status | while IFS="/, " read -r modname modver kerver _dummy; do
|
||||
case "$modname" in *${MODULE_NAME})
|
||||
echo "--> ${modname} ${modver} ${kerver}"
|
||||
dkms remove -m "${modname}" -v "${modver}" -k "${kerver}" -c "/usr/src/${modname}-${modver}/dkms.conf"
|
||||
esac
|
||||
done
|
||||
RESULT=$?
|
||||
# echo "Result=${RESULT}"
|
||||
|
||||
|
38
save-log.sh
38
save-log.sh
@ -1,38 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Purpose: Save a log file with RTW lines only.
|
||||
#
|
||||
# To make this file executable:
|
||||
#
|
||||
# $ chmod +x save-log.sh
|
||||
#
|
||||
# To execute this file:
|
||||
#
|
||||
# $ sudo ./save-log.sh
|
||||
#
|
||||
# or
|
||||
#
|
||||
# $ sudo sh save-log.sh
|
||||
|
||||
SCRIPT_NAME="save-log.sh"
|
||||
|
||||
if [ "$(id -u)" -ne 0 ]; then
|
||||
echo "You must run this script with superuser (root) privileges."
|
||||
echo "Try: \"sudo ./${SCRIPT_NAME}\""
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# deletes existing log
|
||||
rm -f -- rtw.log
|
||||
|
||||
dmesg | cut -d"]" -f2- | grep -i RTW >> rtw.log
|
||||
RESULT=$?
|
||||
|
||||
if [ "$RESULT" != "0" ]; then
|
||||
echo "An error occurred while running: ${SCRIPT_NAME}"
|
||||
echo "Did you set a log level > 0 ?"
|
||||
exit 1
|
||||
else
|
||||
# dmesg | cut -d"]" -f2- | grep -i USB >> rtw.log
|
||||
echo "rtw.log saved successfully."
|
||||
fi
|
Loading…
x
Reference in New Issue
Block a user