summaryrefslogtreecommitdiff
path: root/python/openvino/runtime/scripts/hps/setup_toolchain.sh
diff options
context:
space:
mode:
authorEric Dao <eric@erickhangdao.com>2025-03-10 17:54:31 -0400
committerEric Dao <eric@erickhangdao.com>2025-03-10 17:54:31 -0400
commitab224e2e6ba65f5a369ec392f99cd8845ad06c98 (patch)
treea1e757e9341863ed52b8ad4c5a1c45933aab9da4 /python/openvino/runtime/scripts/hps/setup_toolchain.sh
parent40da1752f2c8639186b72f6838aa415e854d0b1d (diff)
downloadthesis-master.tar.gz
thesis-master.tar.bz2
thesis-master.zip
completed thesisHEADmaster
Diffstat (limited to 'python/openvino/runtime/scripts/hps/setup_toolchain.sh')
-rwxr-xr-xpython/openvino/runtime/scripts/hps/setup_toolchain.sh35
1 files changed, 35 insertions, 0 deletions
diff --git a/python/openvino/runtime/scripts/hps/setup_toolchain.sh b/python/openvino/runtime/scripts/hps/setup_toolchain.sh
new file mode 100755
index 0000000..f88c001
--- /dev/null
+++ b/python/openvino/runtime/scripts/hps/setup_toolchain.sh
@@ -0,0 +1,35 @@
+#!/bin/bash
+
+# Script to unpack the Yocto SDK and setup a toolchain file
+unset LD_LIBRARY_PATH
+
+SCRIPT_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
+
+TOOLCHAIN_DIR=`pwd`/embedded_arm_sdk
+TOOLCHAIN_FILEDIR=${TOOLCHAIN_DIR}/cmake
+TOOLCHAIN_FILE=${TOOLCHAIN_FILEDIR}/embedded.arm.cmake
+
+# If we have a parameter then use as the poky install script
+POKY_FILE=`pwd`/poky*.sh
+if [ $# -gt 0 ]; then
+ POKY_FILE=$1
+fi
+
+###########################################################
+# If the toolchain file already exists then do nothing
+# If you want to recreate then delete ${TOOLCHAIN_DIR}
+if [ -e ${TOOLCHAIN_DIR} ]; then
+ echo "Toolchain file already exists. ${TOOLCHAIN_DIR}"
+ exit 0
+fi
+
+# Install the Yocto SDK
+./$POKY_FILE -y -d ${TOOLCHAIN_DIR}
+if [ $? != 0 ]; then
+ echo "Failed to install Yocto SDK"
+ exit 1
+fi
+
+# Create the Toolchain file
+${SCRIPT_PATH}/create_toolchain_file.sh ${TOOLCHAIN_DIR}
+exit $?