forked from al177/esp8089
-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathinstall
36 lines (29 loc) · 1.16 KB
/
install
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/bin/sh
# define colors
YELLOW='\033[1;33m'
GREEN='\033[0;32m'
NC='\033[0m' # No Color
#make sure everything is up to date
printf "** ${YELLOW}Updating packages and installing tools${NC} **\n"
sudo apt-get update && sudo apt-get -y upgrade
#install tools
sudo apt-get -y install bc git wget libncurses5-dev
printf "** ${YELLOW}Building kernel sources${NC} **\n"
cd ..
sudo wget https://raw.githubusercontent.com/notro/rpi-source/master/rpi-source -O /usr/bin/rpi-source && sudo chmod +x /usr/bin/rpi-source && /usr/bin/rpi-source -q --tag-update
rpi-source --skip-gcc
printf "** ${YELLOW}Turning on SDIO Polling${NC} **\n"
sudo sed -i -e "/^dtoverlay.*sdio/d" /boot/config.txt
sudo sh -c 'echo "dtoverlay=sdio,poll_once=off" >> /boot/config.txt'
# build esp8089 module
printf "** ${YELLOW}Making esp8089 module${NC} **\n"
cd esp8089
make
printf "** ${YELLOW}Installing esp8089 module${NC} **\n"
sudo make install
#add start script
printf "** ${YELLOW}Adding startup script for esp8266 module${NC} **\n"
sudo cp startWIFI /etc/init.d/
sudo chmod 755 /etc/init.d/startWIFI
sudo update-rc.d startWIFI defaults
printf "** ${GREEN}Please reboot to activate WIFI module${NC} **\n"