make the config file configurable, for Ubuntu
This commit is contained in:
parent
1f9c1464ab
commit
5cefec4cca
1 changed files with 8 additions and 5 deletions
13
install.sh
13
install.sh
|
@ -165,13 +165,16 @@ grep -q "^snd-soc-wm8960$" /etc/modules || \
|
||||||
echo "snd-soc-wm8960" >> /etc/modules
|
echo "snd-soc-wm8960" >> /etc/modules
|
||||||
|
|
||||||
#set dtoverlays
|
#set dtoverlays
|
||||||
sed -i -e 's:#dtparam=i2c_arm=on:dtparam=i2c_arm=on:g' /boot/config.txt || true
|
CONFIG=/boot/config.txt
|
||||||
grep -q "^dtoverlay=i2s-mmap$" /boot/config.txt || \
|
[ -f /boot/firmware/usercfg.txt ] && CONFIG=/boot/firmware/usercfg.txt
|
||||||
echo "dtoverlay=i2s-mmap" >> /boot/config.txt
|
|
||||||
|
sed -i -e 's:#dtparam=i2c_arm=on:dtparam=i2c_arm=on:g' $CONFIG || true
|
||||||
|
grep -q "^dtoverlay=i2s-mmap$" $CONFIG || \
|
||||||
|
echo "dtoverlay=i2s-mmap" >> $CONFIG
|
||||||
|
|
||||||
|
|
||||||
grep -q "^dtparam=i2s=on$" /boot/config.txt || \
|
grep -q "^dtparam=i2s=on$" $CONFIG || \
|
||||||
echo "dtparam=i2s=on" >> /boot/config.txt
|
echo "dtparam=i2s=on" >> $CONFIG
|
||||||
|
|
||||||
#install config files
|
#install config files
|
||||||
mkdir /etc/voicecard || true
|
mkdir /etc/voicecard || true
|
||||||
|
|
Loading…
Reference in a new issue