Added driver for Realtek rtl8852b2
This commit is contained in:
parent
09714be435
commit
cd71e6d481
57
drivers/realtek/rtl8852be-install.sh
Executable file
57
drivers/realtek/rtl8852be-install.sh
Executable file
@ -0,0 +1,57 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
#### Variables
|
||||||
|
APT_INST="apt -y install"
|
||||||
|
PKG_DEPS=(git build-essential bc linux-headers-amd64)
|
||||||
|
SRC_GIT="https://github.com/lwfinger/rtw89.git"
|
||||||
|
SRC_DEST="/usr/local/src"
|
||||||
|
|
||||||
|
#### Functions
|
||||||
|
check_root() {
|
||||||
|
if [ "$EUID" -ne 0 ]; then
|
||||||
|
echo "Must be root to run $0"
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
choice() {
|
||||||
|
echo -ne "[y/n]"
|
||||||
|
while true
|
||||||
|
do
|
||||||
|
read -rN1 input
|
||||||
|
case $input in
|
||||||
|
[yY][eE][sS]|[yY])
|
||||||
|
return 0
|
||||||
|
|
||||||
|
break
|
||||||
|
;;
|
||||||
|
[nN][oO]|[nN])
|
||||||
|
return 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
rtl8852b2-install() {
|
||||||
|
echo "* download rtl8852b2"
|
||||||
|
cd "$SRC_DEST"
|
||||||
|
git clone "$SRC_GIT"
|
||||||
|
|
||||||
|
echo "* compile source"
|
||||||
|
cd rtw89
|
||||||
|
make
|
||||||
|
|
||||||
|
echo "* install rtl8852b2 driver"
|
||||||
|
make install
|
||||||
|
echo "blacklist rtw89_8852ae" | tee -a /etc/modprobe.d/blacklist.conf
|
||||||
|
echo "blacklist rtw89_8852ce" | tee -a /etc/modprobe.d/blacklist.conf
|
||||||
|
|
||||||
|
echo "* please reboot system to load driver"
|
||||||
|
}
|
||||||
|
|
||||||
|
#### Main
|
||||||
|
|
||||||
|
check_root
|
||||||
|
rtl8852b2-install
|
Loading…
x
Reference in New Issue
Block a user