Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions script/prepare-pi.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
# Updating and installing utilities
sudo apt-get update
sudo apt-get upgrade -y
sudo apt-get install -y git stm32flash gcc-arm-none-eabi gcc g++ make build-essential libasio-dev libncurses-dev libssl-dev
sudo apt-get install -y git stm32flash gcc-arm-none-eabi gcc g++ make cmake build-essential libasio-dev libncurses-dev libssl-dev

# Removing a console configuration from /boot/cmdline.txt
sudo sed -i 's/console=serial0,115200 //g' /boot/cmdline.txt
sudo sed -i 's/console=serial0,115200 //g' /boot/firmware/cmdline.txt

# Determining the model of Raspberry Pi to adjust /boot/config.txt accordingly
model=$(tr -d '\0' < /proc/device-tree/model)
Expand All @@ -16,16 +16,18 @@ if echo "$model" | grep -q "Raspberry Pi 3"; then
fi

# Adding the correct overlay to /boot/config.txt
echo "$overlay" | sudo tee -a /boot/config.txt
echo "$overlay" | sudo tee -a /boot/firmware/config.txt

# Prompt user to select device type
read -p "Install for hotspots (h) or repeater boards (r)? " choice < /dev/tty
if [ "$choice" = "h" ]; then
sudo mkdir -p /opt/centrunk
sudo mkdir -p /var/logs/centrunk
cd /opt/centrunk
sudo git clone --recurse-submodules https://github.com/DVMProject/dvmfirmware-hs.git
elif [ "$choice" = "r" ]; then
sudo mkdir -p /opt/centrunk
sudo mkdir -p /var/logs/centrunk
cd /opt/centrunk
sudo git clone --recurse-submodules https://github.com/DVMProject/dvmfirmware.git
else
Expand All @@ -37,6 +39,11 @@ fi
sudo systemctl disable hciuart.service
sudo systemctl disable bluealsa.service
sudo systemctl disable bluetooth.service
sudo systemctl disable serial-getty@ttyAMA0.service
sudo systemctl mask serial-getty@ttyAMA0.service
sudo systemctl mask hciuart.service
sudo systemctl mask bluealsa.service
sudo systemctl mask bluetooth.service

# Rebooting
echo "The system will now reboot."
Expand Down