Add config settings support for Debian-Pi-Aarch64
This commit is contained in:
parent
4841d841c1
commit
a0eca1bb61
|
|
@ -42,12 +42,24 @@ for curpkg in ${pkglist[@]}; do
|
|||
fi
|
||||
done
|
||||
|
||||
# Ubuntu Mate for RPi has raspi-config too
|
||||
# Ubuntu Mate for RPi has raspi-config too, but can not used for Debian-Pi-Aarch64
|
||||
command -v raspi-config &> /dev/null
|
||||
if [ $? -eq 0 ]
|
||||
then
|
||||
sudo raspi-config nonint do_i2c 0
|
||||
sudo raspi-config nonint do_serial 0
|
||||
else
|
||||
# Add config settings support for Debian-Pi-Aarch64
|
||||
cat /boot/config.txt |grep "^#.*i2c_arm"
|
||||
if [ $? -eq 0 ]
|
||||
then
|
||||
sed -i 's/^#.*dtparam=i2c_arm=on/dtparam=i2c_arm=on/g' /boot/config.txt
|
||||
fi
|
||||
cat /boot/config.txt |grep "^#.*enable_uart"
|
||||
if [ $? -eq 0 ]
|
||||
then
|
||||
sed -i 's/^#.*enable_uart=1/enable_uart=1/g' /boot/config.txt
|
||||
fi
|
||||
fi
|
||||
|
||||
daemonname="argononed"
|
||||
|
|
@ -281,6 +293,9 @@ echo ' sudo rm '$removescript >> $removescript
|
|||
echo ' echo "Removed Argon One Services."' >> $removescript
|
||||
echo ' echo "Cleanup will complete after restarting the device."' >> $removescript
|
||||
echo 'fi' >> $removescript
|
||||
echo "sed -i 's/.*dtparam=i2c_arm=on/# dtparam=i2c_arm=on/g' /boot/config.txt" >> $removescript
|
||||
echo "sed -i 's/.*enable_uart=1/# enable_uart=1/g' /boot/config.txt" >> $removescript
|
||||
echo 'echo "I2C & UART in config.txt was restored as disabled."' >> $removescript
|
||||
|
||||
sudo chmod 755 $removescript
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue