-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathprovison-rasp-pi.sh
29 lines (24 loc) · 1000 Bytes
/
provison-rasp-pi.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
#!/usr/bin/env bash
remote_host=$1
# Set up shell
scp .zshrc .p10k.zsh raspberrypi-1:
sudo apt update
sudo apt install zsh neovim fd-find fzf ranger git
curl https://pyenv.run | bash
sudo update-alternatives --install /usr/bin/vi vi /usr/bin/nvim 60
echo 0 | sudo update-alternatives --config vi
sudo update-alternatives --install /usr/bin/vim vim /usr/bin/nvim 60
echo 0 | sudo update-alternatives --config vim
sudo update-alternatives --install /usr/bin/editor editor /usr/bin/nvim 60
echo 0 | sudo update-alternatives --config editor
zsh -c "exit"
sudo chsh -s "$(which zsh)" pi
# Setup pwm
sudo bash -c "echo 'blacklist snd_bcm2835' >> /etc/modprobe.d/snd-blacklist.conf"
# Setup SPI
sudo bash -c "echo 'dtparam=spi=on' >> /boot/config.txt"
sudo bash -c "echo 'core_freq=250' >> /boot/config.txt"
sudo bash -c "sed -i '$ s/$/ spidev.bufsiz=32768/' /boot/cmdline.txt"
# pi 4
sudo bash -c "echo 'core_freq=500' >> /boot/config.txt"
sudo bash -c "echo 'core_freq_min=500' >> /boot/config.txt"