automate install

This commit is contained in:
gmdutra 2017-10-19 11:38:34 -02:00
parent 4a643b502f
commit 6b8641fd21

View File

@ -5,7 +5,7 @@ if [ "$(id -u)" != "0" ]; then
exit 1 exit 1
fi fi
apt install build-essential bc git wget sudo apt install build-essential bc git wget
cd /usr/src cd /usr/src
@ -22,9 +22,22 @@ make bcm2709_defconfig
make prepare make prepare
make modules_prepare make modules_prepare
make && sudo wget "https://raw.githubusercontent.com/notro/rpi-source/master/rpi-source" -O /usr/bin/rpi-source
cp 8812au.ko /lib/modules/$(uname -r)/kernel/drivers/net/wireless && sudo chmod 755 /usr/bin/rpi-source
depmod && rpi-source --skip-gcc
git clone "https://github.com/gnab/rtl8812au"
cd rtl8812au
sed -i 's/CONFIG_PLATFORM_I386_PC = y/CONFIG_PLATFORM_I386_PC = n/g' Makefile
sed -i 's/CONFIG_PLATFORM_ARM_RPI = n/CONFIG_PLATFORM_ARM_RPI = y/g' Makefile
make
sudo cp 8812au.ko /lib/modules/`uname -r`/kernel/drivers/net/wireless
sudo depmod -a
sudo modprobe 8812au
echo " echo "
***Success*** ***Success***
***Module will be activated automatically at next reboot*** ***Module will be activated automatically at next reboot***