summaryrefslogtreecommitdiff
path: root/python/openvino/runtime/scripts/hps/setup_toolchain.sh
diff options
context:
space:
mode:
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 $?