-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall.sh
executable file
·38 lines (30 loc) · 1.3 KB
/
install.sh
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
37
38
#!/bin/bash
CONFIG=/boot/config.txt
BLACKLIST=/etc/modprobe.d/raspi-blacklist.conf
# Enable SPI
sudo sed $CONFIG -i -r -e "s/^#?((device_tree_param|dtparam)=([^,]*,)*spi)(=[^,]*)?/\1=on/"
sudo sed $BLACKLIST -i -e "s/^\(blacklist[[:space:]]*spi[-_]bcm2708\)/#\1/"
#TODO: a reboot is required here: sudo reboot
# Install Kivy as per instructions of https://kivy.org/docs/installation/installation-rpi.html
sudo apt-get update
sudo apt-get install -y libsdl2-dev libsdl2-image-dev libsdl2-mixer-dev libsdl2-ttf-dev \
pkg-config libgl1-mesa-dev libgles2-mesa-dev \
python-setuptools libgstreamer1.0-dev git-core \
gstreamer1.0-plugins-{bad,base,good,ugly} \
gstreamer1.0-{omx,alsa} python-dev libmtdev-dev \
xclip python-pip
sudo pip install -U Cython==0.27.3
sudo pip install git+https://github.com/kivy/kivy.git@master
# Custom dependencies required by our own code
sudo apt-get install -y vlc libyaml-dev
sudo pip install pyyaml
git clone https://github.com/lthiery/SPI-Py.git
cd SPI-Py
sudo python setup.py install
cd ..
git clone https://github.com/mxgxw/MFRC522-python.git
cp configuration.yaml.sample configuration.yaml
# TODO: add the following lines to ~/.kivy/config.ini to enable touchscreen
#mouse = mouse
#mtdev_%(name)s = probesysfs,provider=mtdev
#hid_%(name)s = probesysfs,provider=hidinput