diff --git a/cmake/HardwareOsPostConfig.cmake b/cmake/HardwareOsPostConfig.cmake index 5146de98..cfa7a178 100644 --- a/cmake/HardwareOsPostConfig.cmake +++ b/cmake/HardwareOsPostConfig.cmake @@ -30,7 +30,7 @@ add_compile_options( $<$:${ASM_FLAGS}> ) -set(STRIPPED_OBSW_NAME ${OBSW_BIN_NAME}-stripped) +set(STRIPPED_OBSW_NAME ${CMAKE_PROJECT_NAME}-stripped) set(STRIPPED_WATCHDOG_NAME eive-watchdog-stripped) add_custom_command( diff --git a/scripts/install-obsw-yocto.sh b/scripts/install-obsw-yocto.sh new file mode 100755 index 00000000..9298cb32 --- /dev/null +++ b/scripts/install-obsw-yocto.sh @@ -0,0 +1,62 @@ +#!/bin/bash + +build_dir=cmake-build-release-q7s +obsw_root="" +q7s_yocto_dir="q7s-yocto" +q7s_package_path="q7s-package/${q7s_yocto_dir}" + +yocto_obsw_path="yocto/meta-eive/recipes-core/eive-obsw/files" +yocto_watchdog_path="yocto/meta-eive/recipes-support/eive-obsw-watchdog/files" +obsw_bin_name="eive-obsw-stripped" +watchdog_bin_name="eive-watchdog-stripped" + +if [ ! -z ${EIVE_OBSW_ROOT} ]; then + cd ${EIVE_OBSW_ROOT} +elif [ -d ${build_dir} ]; then + obsw_root=${build_dir} + : +elif [ -d ../${build_dir} ]; then + cd .. + obsw_root=$(pwd) +else + echo "No way into the EIVE OBSW Root folder found. Exiting" + exit 1 +fi + +yocto_root="" +if [ -d ../${q7s_package_path} ]; then + cd ../${q7s_package_path} + yocto_root=$(pwd) +elif [ -d ../${q7s_yocto_dir} ] + cd ../${q7s_yocto_dir} + yocto_root=$(pwd) +fi +if [ -z ${yocto_root} ]; then + echo "No yocto directory found. Exiting" + exit 1 +fi + +cd ${obsw_root} + +if [ ! -d ${build_dir} ]; then + echo "No Q7S Release binary folder ${build_dir} found. Exiting" + exit 1 +fi + +if [ ! -f ${obsw_bin_name} ]; then + echo "No EIVE OBSW binary found to intall to yocto" +else + cp_cmd="cp $(pwd)/${obsw_bin_name} ${yocto_root}/${yocto_obsw_path}/eive-obsw" + echo "Executing ${cp_cmd}" + eval ${cp_cmd} + echo "Installed EIVE OBSW into yocto repository successfully" +fi + +if [ ! -f ${watchdog_bin_name} ]; then + echo "No EIVE Watchdog found to intall to yocto" +else + cp_cmd="cp $(pwd)/${watchdog_bin_name} ${yocto_root}/${yocto_obsw_path}/eive-obsw" + echo "Executing ${cp_cmd}" + eval ${cp_cmd} + echo "Installed EIVE watchdog into yocto repository successfully" +fi diff --git a/scripts/q7s-env.sh b/scripts/q7s-env.sh index 2b455f6c..c5638323 100755 --- a/scripts/q7s-env.sh +++ b/scripts/q7s-env.sh @@ -16,6 +16,7 @@ if [[ -d "eive-obsw" ]]; then export EIVE_OBSW_ROOT="$(pwd)/eive-obsw" echo "Adding $(pwd)/eive-obsw/cmake/scripts/q7s helper script path to PATH" export PATH=$PATH:"$(pwd)/eive-obsw/cmake/scripts/q7s" + export PATH=$PATH:"$(pwd)/eive-obsw/scripts" cd "eive-obsw" fi export CONSOLE_PREFIX="[Q7S ENV]" diff --git a/tmtc b/tmtc index 5e9f83cd..c5862579 160000 --- a/tmtc +++ b/tmtc @@ -1 +1 @@ -Subproject commit 5e9f83cd68c307617b2b05ccc0f9902f5795f8cf +Subproject commit c5862579348974882e23d39d0a6d9b2844159b99