From 1f9c1464ab9253488965a77e963f4805a6ccc4c2 Mon Sep 17 00:00:00 2001 From: Hin-Tak Leung Date: Sun, 23 Aug 2020 18:12:49 +0100 Subject: [PATCH] make the overlay install directory configurable, for Ubuntu --- install.sh | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/install.sh b/install.sh index f9ab572..209aab3 100755 --- a/install.sh +++ b/install.sh @@ -31,8 +31,11 @@ fi # - check for /boot/overlays # - dtparam and dtoverlay is available errorFound=0 -if [ ! -d /boot/overlays ] ; then - echo "/boot/overlays not found or not a directory" 1>&2 +OVERLAYS=/boot/overlays +[ -d /boot/firmware/overlays ] && OVERLAYS=/boot/firmware/overlays + +if [ ! -d $OVERLAYS ] ; then + echo "$OVERLAYS not found or not a directory" 1>&2 errorFound=1 fi # should we also check for alsactl and amixer used in seeed-voicecard? @@ -144,9 +147,9 @@ install_module "./" "seeed-voicecard" # install dtbos -cp seeed-2mic-voicecard.dtbo /boot/overlays -cp seeed-4mic-voicecard.dtbo /boot/overlays -cp seeed-8mic-voicecard.dtbo /boot/overlays +cp seeed-2mic-voicecard.dtbo $OVERLAYS +cp seeed-4mic-voicecard.dtbo $OVERLAYS +cp seeed-8mic-voicecard.dtbo $OVERLAYS #install alsa plugins # no need this plugin now