Added download of VIM3 files with a platform check - Adds the lib

to the ldconfig path
This commit is contained in:
RichardPar 2023-04-04 13:20:26 +01:00
parent 5a0a19d4a6
commit 9cff2b2ecf

View File

@ -75,6 +75,18 @@ if [[ "${TARGETARCH}" == "arm64" ]]; then
libva-drm2 mesa-va-drivers libva-drm2 mesa-va-drivers
fi fi
# Check if the platform is a VIM3 and download TF delegate drivers for NPU
VIM3_RELEASE="Vim3_tflite_delegate-0.1"
if cat /proc/cpuinfo | grep -q VIM3
then
wget -q https://github.com/RichardPar/Vim3_tflite_delegate/archive/refs/tags/v0.1.tar.gz -O - | tar -xz
if [ -d "$VIM3_RELEASE" ]; then
mv "$VIM3_RELEASE/library" /lib/vim3
echo "/lib/vim3" > /etc/ld.so.conf.d/vim3.conf
rm -rf "$VIM3_RELEASE"
fi
fi
# not sure why 32bit arm requires all these # not sure why 32bit arm requires all these
if [[ "${TARGETARCH}" == "arm" ]]; then if [[ "${TARGETARCH}" == "arm" ]]; then
apt-get -qq install --no-install-recommends --no-install-suggests -y \ apt-get -qq install --no-install-recommends --no-install-suggests -y \
@ -85,6 +97,7 @@ if [[ "${TARGETARCH}" == "arm" ]]; then
libgstreamer-plugins-base1.0-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libgstreamer1.0-dev
fi fi
apt-get purge gnupg apt-transport-https wget xz-utils -y apt-get purge gnupg apt-transport-https wget xz-utils -y
apt-get clean autoclean -y apt-get clean autoclean -y
apt-get autoremove --purge -y apt-get autoremove --purge -y