From 796adb3f085c83813c2d0f4eb5cd5d373806593a Mon Sep 17 00:00:00 2001 From: Hin-Tak Leung Date: Thu, 3 Dec 2020 09:50:43 +0000 Subject: [PATCH] update CONFIG location for LibreELEC --- install.sh | 5 ++++- seeed-voicecard | 4 ++++ uninstall.sh | 4 ++++ 3 files changed, 12 insertions(+), 1 deletion(-) 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