|
|
|
@ -4,7 +4,7 @@ echo -e "\ninstallation script for CubeSatSim\n"
|
|
|
|
|
|
|
|
|
|
|
|
sudo apt-get update && sudo apt-get dist-upgrade -y
|
|
|
|
sudo apt-get update && sudo apt-get dist-upgrade -y
|
|
|
|
|
|
|
|
|
|
|
|
sudo apt-get install -y wiringpi git libasound2-dev i2c-tools cpulimit
|
|
|
|
sudo apt-get install -y wiringpi git libasound2-dev i2c-tools cpulimit python-picamera python3-picamera build-essential libgd-dev libmagic-dev
|
|
|
|
|
|
|
|
|
|
|
|
cd /tmp
|
|
|
|
cd /tmp
|
|
|
|
|
|
|
|
|
|
|
|
@ -36,6 +36,7 @@ else
|
|
|
|
echo "ARG1=f" >> .mode
|
|
|
|
echo "ARG1=f" >> .mode
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
FILE=/home/pi/CubeSatSim/sim.cfg
|
|
|
|
FILE=/home/pi/CubeSatSim/sim.cfg
|
|
|
|
if [ -f "$FILE" ]; then
|
|
|
|
if [ -f "$FILE" ]; then
|
|
|
|
echo "$FILE exists."
|
|
|
|
echo "$FILE exists."
|
|
|
|
@ -44,6 +45,7 @@ else
|
|
|
|
echo $1 >> sim.cfg
|
|
|
|
echo $1 >> sim.cfg
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
cd
|
|
|
|
cd
|
|
|
|
|
|
|
|
|
|
|
|
git clone https://github.com/alanbjohnston/direwolf.git
|
|
|
|
git clone https://github.com/alanbjohnston/direwolf.git
|
|
|
|
@ -56,6 +58,7 @@ sudo make install
|
|
|
|
|
|
|
|
|
|
|
|
make install-rpi
|
|
|
|
make install-rpi
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
cd
|
|
|
|
cd
|
|
|
|
|
|
|
|
|
|
|
|
git clone https://github.com/alanbjohnston/pi-power-button.git
|
|
|
|
git clone https://github.com/alanbjohnston/pi-power-button.git
|
|
|
|
@ -64,14 +67,25 @@ cd pi-power-button
|
|
|
|
|
|
|
|
|
|
|
|
./script/install
|
|
|
|
./script/install
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
cd
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
git clone https://github.com/alanbjohnston/PiSSTVpp.git
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
cd PiSSTVpp
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
make pisstvpp
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
cd
|
|
|
|
cd
|
|
|
|
|
|
|
|
|
|
|
|
git clone https://github.com/F5OEO/rpitx.git
|
|
|
|
git clone https://github.com/alanbjohnston/rpitx.git
|
|
|
|
|
|
|
|
|
|
|
|
cd rpitx
|
|
|
|
cd rpitx
|
|
|
|
|
|
|
|
|
|
|
|
./install.sh
|
|
|
|
./install.sh
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
cd
|
|
|
|
cd
|
|
|
|
|
|
|
|
|
|
|
|
sudo cp ~/CubeSatSim/systemd/cubesatsim.service /etc/systemd/system/cubesatsim.service
|
|
|
|
sudo cp ~/CubeSatSim/systemd/cubesatsim.service /etc/systemd/system/cubesatsim.service
|
|
|
|
@ -82,13 +96,16 @@ sudo cp ~/CubeSatSim/systemd/rpitx.service /etc/systemd/system/rpitx.service
|
|
|
|
|
|
|
|
|
|
|
|
sudo systemctl enable rpitx
|
|
|
|
sudo systemctl enable rpitx
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
sudo cp /boot/config.txt /boot/config.txt.0
|
|
|
|
sudo cp /boot/config.txt /boot/config.txt.0
|
|
|
|
|
|
|
|
|
|
|
|
sudo cp /boot/cmdline.txt /boot/cmdline.txt.0
|
|
|
|
sudo cp /boot/cmdline.txt /boot/cmdline.txt.0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
sudo raspi-config nonint do_i2c 0
|
|
|
|
sudo raspi-config nonint do_i2c 0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
sudo raspi-config nonint do_camera 0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#if [ "$1" = "u" ]; then
|
|
|
|
#if [ "$1" = "u" ]; then
|
|
|
|
#fi
|
|
|
|
#fi
|
|
|
|
|
|
|
|
|
|
|
|
@ -103,11 +120,18 @@ sudo raspi-config nonint do_i2c 0
|
|
|
|
sudo sh -c 'echo "\ndtoverlay=i2c-gpio,bus=3,i2c_gpio_delay_us=1,i2c_gpio_sda=23,i2c_gpio_scl=24" >> /boot/config.txt'
|
|
|
|
sudo sh -c 'echo "\ndtoverlay=i2c-gpio,bus=3,i2c_gpio_delay_us=1,i2c_gpio_sda=23,i2c_gpio_scl=24" >> /boot/config.txt'
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
if [[ $(grep 'dtoverlay=pi3-miniuart-bt' /boot/config.txt) ]]; then
|
|
|
|
if [[ $(grep 'enable_uart=1' /boot/config.txt) ]]; then
|
|
|
|
echo "dtoverlay=pi3-miniuart-bt already in /boot/config.txt"
|
|
|
|
echo "enable_uart=1 already in /boot/config.txt"
|
|
|
|
else
|
|
|
|
else
|
|
|
|
echo "adding dtoverlay=pi3-miniuart-bt to /boot/config.txt"
|
|
|
|
echo "adding enable_uart=1 to /boot/config.txt"
|
|
|
|
sudo sh -c 'echo "\ndtoverlay=pi3-miniuart-bt" >> /boot/config.txt'
|
|
|
|
sudo sh -c 'echo "\nenable_uart=1" >> /boot/config.txt'
|
|
|
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if [[ $(grep 'dtoverlay=disable-bt' /boot/config.txt) ]]; then
|
|
|
|
|
|
|
|
echo "dtoverlay=disable-bt already in /boot/config.txt"
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
echo "adding dtoverlay=disable-bt to /boot/config.txt"
|
|
|
|
|
|
|
|
sudo sh -c 'echo "\ndtoverlay=disable-bt" >> /boot/config.txt'
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
if [[ $(grep 'dtoverlay=dwc2' /boot/config.txt) ]]; then
|
|
|
|
if [[ $(grep 'dtoverlay=dwc2' /boot/config.txt) ]]; then
|
|
|
|
@ -124,5 +148,9 @@ sudo raspi-config nonint do_i2c 0
|
|
|
|
sudo sed -i 's/ rootwait/ rootwait modules-load=dwc2,g_ether/g' /boot/cmdline.txt
|
|
|
|
sudo sed -i 's/ rootwait/ rootwait modules-load=dwc2,g_ether/g' /boot/cmdline.txt
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
CubeSatSim/config -c
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
CubeSatSim/config -l
|
|
|
|
|
|
|
|
|
|
|
|
echo "You need to reboot to complete the installation\n"
|
|
|
|
echo "You need to reboot to complete the installation\n"
|
|
|
|
|
|
|
|
|