update OVERLAYS location for LibreELEC

This commit is contained in:
Hin-Tak Leung 2020-12-03 10:02:40 +00:00
parent 796adb3f08
commit 71321134f6
3 changed files with 9 additions and 0 deletions

View file

@ -31,8 +31,11 @@ fi
# - check for /boot/overlays # - check for /boot/overlays
# - dtparam and dtoverlay is available # - dtparam and dtoverlay is available
errorFound=0 errorFound=0
# Try Raspbian, Ubuntu, then LibreELEC location for OVERLAYS:
OVERLAYS=/boot/overlays OVERLAYS=/boot/overlays
[ -d /boot/firmware/overlays ] && OVERLAYS=/boot/firmware/overlays [ -d /boot/firmware/overlays ] && OVERLAYS=/boot/firmware/overlays
[ -d /flash/overlays ] && OVERLAYS=/flash/overlays
if [ ! -d $OVERLAYS ] ; then if [ ! -d $OVERLAYS ] ; then
echo "$OVERLAYS not found or not a directory" 1>&2 echo "$OVERLAYS not found or not a directory" 1>&2

View file

@ -24,8 +24,11 @@ set -x
#exec 1>/var/log/$(basename $0).log 2>&1 #exec 1>/var/log/$(basename $0).log 2>&1
export PATH=$PATH:/opt/vc/bin export PATH=$PATH:/opt/vc/bin
# Try Raspbian, Ubuntu, then LibreELEC location for OVERLAYS:
OVERLAYS=/boot/overlays OVERLAYS=/boot/overlays
[ -d /boot/firmware/overlays ] && OVERLAYS=/boot/firmware/overlays [ -d /boot/firmware/overlays ] && OVERLAYS=/boot/firmware/overlays
[ -d /flash/overlays ] && OVERLAYS=/flash/overlays
#enable i2c interface #enable i2c interface
dtparam -d $OVERLAYS i2c_arm=on dtparam -d $OVERLAYS i2c_arm=on

View file

@ -62,8 +62,11 @@ echo "remove dtbos"
for i in $RPI_HATS; do for i in $RPI_HATS; do
dtoverlay -r $i dtoverlay -r $i
done done
# Try Raspbian, Ubuntu, then LibreELEC location for OVERLAYS:
OVERLAYS=/boot/overlays OVERLAYS=/boot/overlays
[ -d /boot/firmware/overlays ] && OVERLAYS=/boot/firmware/overlays [ -d /boot/firmware/overlays ] && OVERLAYS=/boot/firmware/overlays
[ -d /flash/overlays ] && OVERLAYS=/flash/overlays
rm ${OVERLAYS}/seeed-2mic-voicecard.dtbo || true rm ${OVERLAYS}/seeed-2mic-voicecard.dtbo || true
rm ${OVERLAYS}/seeed-4mic-voicecard.dtbo || true rm ${OVERLAYS}/seeed-4mic-voicecard.dtbo || true