diff --git a/drivers/realtek/rtl8852be-install.sh b/drivers/realtek/rtl8852be-install.sh new file mode 100755 index 0000000..67c836e --- /dev/null +++ b/drivers/realtek/rtl8852be-install.sh @@ -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 \ No newline at end of file