diff --git a/install.sh b/install.sh index 8c84be9..661b540 100755 --- a/install.sh +++ b/install.sh @@ -175,9 +175,12 @@ grep -q "^snd-soc-ac108$" /etc/modules || \ grep -q "^snd-soc-wm8960$" /etc/modules || \ echo "snd-soc-wm8960" >> /etc/modules -#set dtoverlays +#set dtoverlays - Raspbian: CONFIG=/boot/config.txt +# Ubuntu: [ -f /boot/firmware/usercfg.txt ] && CONFIG=/boot/firmware/usercfg.txt +# LibreELEC: +[ -f /flash/distroconfig.txt ] && CONFIG=/flash/distroconfig.txt sed -i -e 's:#dtparam=i2c_arm=on:dtparam=i2c_arm=on:g' $CONFIG || true grep -q "^dtoverlay=i2s-mmap$" $CONFIG || \ diff --git a/seeed-voicecard b/seeed-voicecard index 9a135a1..ab31734 100755 --- a/seeed-voicecard +++ b/seeed-voicecard @@ -48,8 +48,12 @@ function get_kernel_version() { return 0 } +# Raspbian: CONFIG=/boot/config.txt +# Ubuntu: [ -f /boot/firmware/usercfg.txt ] && CONFIG=/boot/firmware/usercfg.txt +# LibreELEC: +[ -f /flash/distroconfig.txt ] && CONFIG=/flash/distroconfig.txt get_overlay() { ov=$1 diff --git a/uninstall.sh b/uninstall.sh index adbebfc..b74def9 100755 --- a/uninstall.sh +++ b/uninstall.sh @@ -13,8 +13,12 @@ fi uname_r=$(uname -r) +# Raspbian: CONFIG=/boot/config.txt +# Ubuntu: [ -f /boot/firmware/usercfg.txt ] && CONFIG=/boot/firmware/usercfg.txt +# LibreELEC: +[ -f /flash/distroconfig.txt ] && CONFIG=/flash/distroconfig.txt get_overlay() { ov=$1