Added PiRTC setup scripts

This commit is contained in:
2021-05-29 19:41:41 -04:00
parent e35f99d24d
commit 6a814176e9
2 changed files with 30 additions and 0 deletions

13
PiRTC/install.sh Executable file
View File

@ -0,0 +1,13 @@
#!/bin/sh
# software
sudo apt-get install python-smbus i2c-tool
# check
sudo i2cdetect -y 1
# config
cp /boot/config.txt /boot/config.bak
echo "" >> /boot/config.txt
echo "dtoverlay=i2c-rtc,ds3231" >> /boot/config.txt

17
PiRTC/setup.sh Executable file
View File

@ -0,0 +1,17 @@
#!/bin/sh
# check
sudo i2cdetect -y 1
# remove fake
sudo apt-get -y remove fake-hwclock
sudo update-rc.d -f fake-hwclock remove
sudo systemctl disable fake-hwclock
# device
cp hwclock-set /lib/udev/hwclock-set
# set
sudo hwclock -r
sudo hwclock -w
sudo hwclock -r