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
8 changes: 4 additions & 4 deletions script/prepare-pi.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,18 @@ 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

# Removing a console configuration from /boot/cmdline.txt
sudo sed -i 's/console=serial0,115200 //g' /boot/cmdline.txt
# Removing a console configuration from /boot/firmware/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
# Determining the model of Raspberry Pi to adjust /boot/firmware/config.txt accordingly
model=$(tr -d '\0' < /proc/device-tree/model)
overlay="dtoverlay=disable-bt"
if echo "$model" | grep -q "Raspberry Pi 3"; then
overlay="dtoverlay=pi3-disable-bt"
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
Expand Down