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
|
fi
|
||||||
done
|
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
|
command -v raspi-config &> /dev/null
|
||||||
if [ $? -eq 0 ]
|
if [ $? -eq 0 ]
|
||||||
then
|
then
|
||||||
sudo raspi-config nonint do_i2c 0
|
sudo raspi-config nonint do_i2c 0
|
||||||
sudo raspi-config nonint do_serial 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
|
fi
|
||||||
|
|
||||||
daemonname="argononed"
|
daemonname="argononed"
|
||||||
|
|
@ -281,6 +293,9 @@ echo ' sudo rm '$removescript >> $removescript
|
||||||
echo ' echo "Removed Argon One Services."' >> $removescript
|
echo ' echo "Removed Argon One Services."' >> $removescript
|
||||||
echo ' echo "Cleanup will complete after restarting the device."' >> $removescript
|
echo ' echo "Cleanup will complete after restarting the device."' >> $removescript
|
||||||
echo 'fi' >> $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
|
sudo chmod 755 $removescript
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue