forked from g4eml/Langstone
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall_hyperpixel4.sh
134 lines (97 loc) · 3.39 KB
/
install_hyperpixel4.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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
#!/bin/bash
# Langstone Install script
# Buster Version G4EML 23/05/20
echo "#############################################################"
echo "## Installing Langstone Transceiver with Hyperpixel Display##"
echo "#############################################################"
echo "#################################"
echo "## Update the Package Manager ##"
echo "#################################"
# Update the package manager
sudo dpkg --configure -a
sudo apt-get -y update
# Uninstall the apt-listchanges package to allow silent install of ca certificates (201704030)
# http://unix.stackexchange.com/questions/124468/how-do-i-resolve-an-apparent-hanging-update-process
sudo apt-get -y remove apt-listchanges
# -------- Upgrade distribution ------
echo "#################################"
echo "## Update Distribution ##"
echo "#################################"
# Update the distribution
sudo apt-get -y dist-upgrade
echo "#################################"
echo "## Install Packages ##"
echo "#################################"
# Install the packages that we need
sudo apt-get -y install git
sudo apt-get -y install libxml2 libxml2-dev bison flex libcdk5-dev cmake
sudo apt-get -y install libaio-dev libusb-1.0-0-dev libserialport-dev libxml2-dev libavahi-client-dev
sudo apt-get -y install gr-iio
sudo apt-get -y install gnuradio
sudo apt-get -y install raspi-gpio
sudo apt-get -y install sshpass
sudo apt-get -y install libi2c-dev
echo "#################################"
echo "## Install Hyperpixel ##"
echo "#################################"
cd ~
git clone https://github.com/pimoroni/hyperpixel4 -b pi4
cd hyperpixel4
sudo ./install.sh
echo "#################################"
echo "## Install Wiring Pi ##"
echo "#################################"
# install WiringPi
cd /tmp
wget https://project-downloads.drogon.net/wiringpi-latest.deb
sudo dpkg -i wiringpi-latest.deb
cd ~
echo "#################################"
echo "## Install LibIIO ##"
echo "#################################"
#install libiio
git clone https://github.com/analogdevicesinc/libiio.git
cd libiio
cmake ./
make all
sudo make install
cd ~
# Set auto login to command line.
sudo raspi-config nonint do_boot_behaviour B2
# Enable i2c support
sudo raspi-config nonint do_i2c 0
# install the Langstone Files
echo "#################################"
echo "## Installing Langstone ##"
echo "#################################"
git clone https://github.com/g4eml/Langstone.git
cd Langstone
chmod +x build
chmod +x run
chmod +x stop
chmod +x update
./build
#make Langstone autostart on boot
if !(grep Langstone ~/.bashrc) then
echo if test -z \"\$SSH_CLIENT\" >> ~/.bashrc
echo then >> ~/.bashrc
echo /home/pi/Langstone/run >> ~/.bashrc
echo fi >> ~/.bashrc
fi
#Configure the boot parameters
if !(grep display_lcd_rotate /boot/config.txt) then
sudo sh -c "echo display_lcd_rotate=3 >> /boot/config.txt"
fi
if !(grep disable_splash /boot/config.txt) then
sudo sh -c "echo disable_splash=1 >> /boot/config.txt"
fi
if !(grep global_cursor_default /boot/cmdline.txt) then
sudo sed -i '1s,$, vt.global_cursor_default=0,' /boot/cmdline.txt
fi
#remove overlay from display driver
sudo sed -i '/dtoverlay=vc4-fkms-v3d/s/^/#/' /boot/config.txt
echo "#################################"
echo "## Reboot and Start ##"
echo "#################################"
#Reboot and start
sudo reboot