From edc528f1e3f3a882d47f6bd4a76a0feba457d6fc Mon Sep 17 00:00:00 2001 From: builderjer Date: Sun, 15 Jun 2025 12:01:18 -0600 Subject: [PATCH 1/2] added back respeaker drivers --- build_raspOVOS.sh | 7 +++++-- local_build.sh | 0 scripts/setup_respeaker.sh | 19 ++++++++++++++++--- 3 files changed, 21 insertions(+), 5 deletions(-) mode change 100644 => 100755 local_build.sh diff --git a/build_raspOVOS.sh b/build_raspOVOS.sh index c8cc26b9b..a748b1559 100644 --- a/build_raspOVOS.sh +++ b/build_raspOVOS.sh @@ -143,8 +143,11 @@ fi echo "Tuning /etc/fstab..." bash /mounted-github-repo/scripts/setup_fstab.sh -#echo "Updating ovos-i2csound and raspovos-audio-setup" -#bash /mounted-github-repo/scripts/update.sh +echo "Installing respeaker drivers" +bash /mounted-github-repo/scripts/setup_respeaker.sh + +# echo "Updating ovos-i2csound and raspovos-audio-setup" +# bash /mounted-github-repo/scripts/update.sh # Copy raspOVOS overlay to the system. echo "Copying raspOVOS overlay..." diff --git a/local_build.sh b/local_build.sh old mode 100644 new mode 100755 diff --git a/scripts/setup_respeaker.sh b/scripts/setup_respeaker.sh index 76fbe27db..5790231c0 100755 --- a/scripts/setup_respeaker.sh +++ b/scripts/setup_respeaker.sh @@ -14,7 +14,16 @@ marker="0.0.0" git clone https://github.com/HinTak/seeed-voicecard cd seeed-voicecard -git checkout v6.6 +kernel=$(uname -r) +k_ver=$(echo $kernel | cut -d '.' -f2) +checkout_version="v6.$k_ver" + +if git checkout $checkout_version; then + echo "using version $checkout_version of respeaker drivers" +else + echo "Could not checkout version $checkout_version" + echo "Trying default branch" +fi function install_respeaker { local _i @@ -30,7 +39,7 @@ function install_respeaker { dkms remove --force -m $mod -v $ver --all rm -rf /usr/src/$mod-$ver fi - + mkdir -p /usr/src/$mod-$ver cp -a $src/* /usr/src/$mod-$ver/ @@ -55,7 +64,11 @@ apt-get -y install dkms git i2c-tools libasound2-plugins kernels=($(ls /boot/vmlinuz-* | sort -V | sed 's|/boot/vmlinuz-||')) -install_respeaker "./" "seeed-voicecard" +if [ install_respeaker "./" "seeed-voicecard" -eq 0]; then + echo "seeed-voicecard drivers are installed" +else + echo "could not build respeaker drivers" +fi cd .. From 827eaf7f2443b7650acd5611aed655101f4fd1f6 Mon Sep 17 00:00:00 2001 From: builderjer Date: Sun, 15 Jun 2025 13:01:03 -0600 Subject: [PATCH 2/2] fixed 'if' syntax --- scripts/setup_respeaker.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/setup_respeaker.sh b/scripts/setup_respeaker.sh index 5790231c0..cfea1f184 100755 --- a/scripts/setup_respeaker.sh +++ b/scripts/setup_respeaker.sh @@ -64,7 +64,7 @@ apt-get -y install dkms git i2c-tools libasound2-plugins kernels=($(ls /boot/vmlinuz-* | sort -V | sed 's|/boot/vmlinuz-||')) -if [ install_respeaker "./" "seeed-voicecard" -eq 0]; then +if install_respeaker "./" "seeed-voicecard"; then echo "seeed-voicecard drivers are installed" else echo "could not build respeaker drivers"