reworked helper scripts, renamed q7s build dirs
This commit is contained in:
16
cmake/scripts/q7s/q7s-env-em.sh
Executable file
16
cmake/scripts/q7s/q7s-env-em.sh
Executable file
@ -0,0 +1,16 @@
|
||||
#!/bin/bash -i
|
||||
export PATH=$PATH:"$HOME/EIVE/gcc-arm-8.3-2019.03-x86_64-arm-linux-gnueabihf/bin"
|
||||
export CROSS_COMPILE="arm-linux-gnueabihf"
|
||||
|
||||
export ZYNQ_7020_SYSROOT="/opt/xiphos/sdk/ark/sysroots/cortexa9hf-neon-xiphos-linux-gnueabi"
|
||||
export EIVE_Q7S_EM=1
|
||||
|
||||
if [[ -d "eive-obsw" ]]; then
|
||||
echo "Detected EIVE OBSW root directory at $(pwd)/eive-obsw. Setting to EIVE_OBSW_ROOT"
|
||||
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"
|
||||
cd "eive-obsw"
|
||||
fi
|
||||
export CONSOLE_PREFIX="[Q7S ENV]"
|
||||
/bin/bash
|
16
cmake/scripts/q7s/q7s-env.sh
Executable file
16
cmake/scripts/q7s/q7s-env.sh
Executable file
@ -0,0 +1,16 @@
|
||||
#!/bin/bash -i
|
||||
export PATH=$PATH:"$HOME/EIVE/gcc-arm-8.3-2019.03-x86_64-arm-linux-gnueabihf/bin"
|
||||
export CROSS_COMPILE="arm-linux-gnueabihf"
|
||||
|
||||
export ZYNQ_7020_SYSROOT="/opt/xiphos/sdk/ark/sysroots/cortexa9hf-neon-xiphos-linux-gnueabi"
|
||||
# export EIVE_Q7S_EM=1
|
||||
|
||||
if [[ -d "eive-obsw" ]]; then
|
||||
echo "Detected EIVE OBSW root directory at $(pwd)/eive-obsw. Setting to EIVE_OBSW_ROOT"
|
||||
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"
|
||||
cd "eive-obsw"
|
||||
fi
|
||||
export CONSOLE_PREFIX="[Q7S ENV]"
|
||||
/bin/bash
|
44
cmake/scripts/q7s/q7s-make-debug.sh
Executable file
44
cmake/scripts/q7s/q7s-make-debug.sh
Executable file
@ -0,0 +1,44 @@
|
||||
#!/bin/bash
|
||||
cfg_script_name="cmake-build-cfg.py"
|
||||
init_dir=$(pwd)
|
||||
if [ -z "${EIVE_OBSW_ROOT}" ]; then
|
||||
counter=0
|
||||
while [ ${counter} -lt 5 ]
|
||||
do
|
||||
cd ..
|
||||
if [ -f ${cfg_script_name} ];then
|
||||
break
|
||||
fi
|
||||
counter=$((counter=counter + 1))
|
||||
done
|
||||
|
||||
if [ "${counter}" -ge 5 ];then
|
||||
echo "${cfg_script_name} not found in upper directories!"
|
||||
exit 1
|
||||
fi
|
||||
else
|
||||
cfg_script_name="${EIVE_OBSW_ROOT}/cmake/scripts/${cfg_script_name}"
|
||||
fi
|
||||
|
||||
if [ ! -z "${EIVE_Q7S_EM}" ]; then
|
||||
build_defs="EIVE_Q7S_EM=ON"
|
||||
fi
|
||||
|
||||
os_fsfw="linux"
|
||||
tgt_bsp="arm/q7s"
|
||||
build_dir="cmake-build-debug-q7s"
|
||||
build_generator="make"
|
||||
if [ "${OS}" = "Windows_NT" ]; then
|
||||
python="py"
|
||||
# Could be other OS but this works for now.
|
||||
else
|
||||
python="python3"
|
||||
fi
|
||||
|
||||
echo "Running command (without the leading +):"
|
||||
set -x # Print command
|
||||
${python} ${cfg_script_name} -o "${os_fsfw}" -g "${build_generator}" -b "debug" -t "${tgt_bsp}" \
|
||||
-l"${build_dir}" -d "${build_defs}"
|
||||
set +x
|
||||
|
||||
cd ${init_dir}
|
45
cmake/scripts/q7s/q7s-make-release.sh
Executable file
45
cmake/scripts/q7s/q7s-make-release.sh
Executable file
@ -0,0 +1,45 @@
|
||||
#!/bin/bash
|
||||
cfg_script_name="cmake-build-cfg.py"
|
||||
init_dir=$(pwd)
|
||||
if [[ -z ${EIVE_OBSW_ROOT} ]]; then
|
||||
counter=0
|
||||
while [ ${counter} -lt 5 ]
|
||||
do
|
||||
cd ..
|
||||
if [ -f ${cfg_script_name} ];then
|
||||
break
|
||||
fi
|
||||
counter=$((counter=counter + 1))
|
||||
done
|
||||
|
||||
if [ "${counter}" -ge 5 ];then
|
||||
echo "${cfg_script_name} not found in upper directories!"
|
||||
exit 1
|
||||
fi
|
||||
else
|
||||
cfg_script_name="${EIVE_OBSW_ROOT}/cmake/scripts/${cfg_script_name}"
|
||||
fi
|
||||
|
||||
if [[ -z "${EIVE_Q7S_EM}" ]]; then
|
||||
build_defs="EIVE_Q7S_EM=ON"
|
||||
fi
|
||||
|
||||
os_fsfw="linux"
|
||||
tgt_bsp="arm/q7s"
|
||||
build_dir="cmake-build-release-q7s"
|
||||
build_generator="make"
|
||||
|
||||
if [ "${OS}" = "Windows_NT" ]; then
|
||||
python="py"
|
||||
# Could be other OS but this works for now.
|
||||
else
|
||||
python="python3"
|
||||
fi
|
||||
|
||||
echo "Running command (without the leading +):"
|
||||
set -x # Print command
|
||||
${python} ${cfg_script_name} -o "${os_fsfw}" -g "${build_generator}" -b "release" -t "${tgt_bsp}" \
|
||||
-l"${build_dir}" -d "${build_defs}"
|
||||
set +x
|
||||
|
||||
cd ${init_dir}
|
35
cmake/scripts/q7s/q7s-make-size.sh
Executable file
35
cmake/scripts/q7s/q7s-make-size.sh
Executable file
@ -0,0 +1,35 @@
|
||||
#!/bin/sh
|
||||
counter=0
|
||||
cfg_script_name="cmake-build-cfg.py"
|
||||
while [ ${counter} -lt 5 ]
|
||||
do
|
||||
cd ..
|
||||
if [ -f ${cfg_script_name} ];then
|
||||
break
|
||||
fi
|
||||
counter=$((counter=counter + 1))
|
||||
done
|
||||
|
||||
if [ "${counter}" -ge 5 ];then
|
||||
echo "${cfg_script_name} not found in upper directories!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
os_fsfw="linux"
|
||||
tgt_bsp="arm/q7s"
|
||||
build_dir="build-Release-Q7S"
|
||||
build_generator=""
|
||||
if [ "${OS}" = "Windows_NT" ]; then
|
||||
build_generator="MinGW Makefiles"
|
||||
python="py"
|
||||
# Could be other OS but this works for now.
|
||||
else
|
||||
build_generator="Unix Makefiles"
|
||||
python="python3"
|
||||
fi
|
||||
|
||||
echo "Running command (without the leading +):"
|
||||
set -x # Print command
|
||||
${python} ${cfg_script_name} -o "${os_fsfw}" -g "${build_generator}" -b "size" -t "${tgt_bsp}" \
|
||||
-l"${build_dir}"
|
||||
# set +x
|
44
cmake/scripts/q7s/q7s-ninja-debug.sh
Executable file
44
cmake/scripts/q7s/q7s-ninja-debug.sh
Executable file
@ -0,0 +1,44 @@
|
||||
#!/bin/bash
|
||||
cfg_script_name="cmake-build-cfg.py"
|
||||
init_dir=$(pwd)
|
||||
if [[ -z ${EIVE_OBSW_ROOT} ]]; then
|
||||
counter=0
|
||||
while [ ${counter} -lt 5 ]
|
||||
do
|
||||
cd ..
|
||||
if [ -f ${cfg_script_name} ];then
|
||||
break
|
||||
fi
|
||||
counter=$((counter=counter + 1))
|
||||
done
|
||||
|
||||
if [ "${counter}" -ge 5 ];then
|
||||
echo "${cfg_script_name} not found in upper directories!"
|
||||
exit 1
|
||||
fi
|
||||
else
|
||||
cfg_script_name="${EIVE_OBSW_ROOT}/cmake/scripts/${cfg_script_name}"
|
||||
fi
|
||||
|
||||
if [[ -z "${EIVE_Q7S_EM}" ]]; then
|
||||
build_defs="EIVE_Q7S_EM=ON"
|
||||
fi
|
||||
|
||||
os_fsfw="linux"
|
||||
tgt_bsp="arm/q7s"
|
||||
build_dir="cmake-build-debug-q7s"
|
||||
build_generator="ninja"
|
||||
if [ "${OS}" = "Windows_NT" ]; then
|
||||
python="py"
|
||||
# Could be other OS but this works for now.
|
||||
else
|
||||
python="python3"
|
||||
fi
|
||||
|
||||
echo "Running command (without the leading +):"
|
||||
set -x # Print command
|
||||
${python} ${cfg_script_name} -o "${os_fsfw}" -g "${build_generator}" -b "debug" -t "${tgt_bsp}" \
|
||||
-l "${build_dir}" -d "${build_defs}"
|
||||
set +x
|
||||
|
||||
cd ${init_dir}
|
44
cmake/scripts/q7s/q7s-ninja-release.sh
Executable file
44
cmake/scripts/q7s/q7s-ninja-release.sh
Executable file
@ -0,0 +1,44 @@
|
||||
#!/bin/bash
|
||||
cfg_script_name="cmake-build-cfg.py"
|
||||
init_dir=$(pwd)
|
||||
if [[ -z ${EIVE_OBSW_ROOT} ]]; then
|
||||
counter=0
|
||||
while [ ${counter} -lt 5 ]
|
||||
do
|
||||
cd ..
|
||||
if [ -f ${cfg_script_name} ];then
|
||||
break
|
||||
fi
|
||||
counter=$((counter=counter + 1))
|
||||
done
|
||||
|
||||
if [ "${counter}" -ge 5 ];then
|
||||
echo "${cfg_script_name} not found in upper directories!"
|
||||
exit 1
|
||||
fi
|
||||
else
|
||||
cfg_script_name="${EIVE_OBSW_ROOT}/cmake/scripts/${cfg_script_name}"
|
||||
fi
|
||||
|
||||
if [[ -z "${EIVE_Q7S_EM}" ]]; then
|
||||
build_defs="EIVE_Q7S_EM=ON"
|
||||
fi
|
||||
|
||||
os_fsfw="linux"
|
||||
tgt_bsp="arm/q7s"
|
||||
build_dir="cmake-build-release-q7s"
|
||||
build_generator="ninja"
|
||||
if [ "${OS}" = "Windows_NT" ]; then
|
||||
python="py"
|
||||
# Could be other OS but this works for now.
|
||||
else
|
||||
python="python3"
|
||||
fi
|
||||
|
||||
echo "Running command (without the leading +):"
|
||||
set -x # Print command
|
||||
${python} ${cfg_script_name} -o "${os_fsfw}" -g "${build_generator}" -b "release" -t "${tgt_bsp}" \
|
||||
-l"${build_dir}" -d "${build_defs}"
|
||||
set +x
|
||||
|
||||
cd ${init_dir}
|
50
cmake/scripts/q7s/win-q7s-env.sh
Normal file
50
cmake/scripts/q7s/win-q7s-env.sh
Normal file
@ -0,0 +1,50 @@
|
||||
#!/bin/sh
|
||||
# Run with: source win-q7s-env.sh [OPTIONS]
|
||||
function help () {
|
||||
echo "source win-q7s-env.sh [options] -t|--toolchain=<toolchain path> -s|--sysroot=<sysroot path>"
|
||||
}
|
||||
|
||||
TOOLCHAIN_PATH="/c/Xilinx/Vitis/2019.2/gnu/aarch32/nt/gcc-arm-linux-gnueabi/bin"
|
||||
SYSROOT="/c/Users/${USER}/eive-software/eive-compile-rootfs"
|
||||
EIVE_Q7S_EM=1
|
||||
|
||||
for i in "$@"; do
|
||||
case $i in
|
||||
-t=*|--toolchain=*)
|
||||
TOOLCHAIN_PATH="${i#*=}"
|
||||
shift
|
||||
;;
|
||||
-s=*|--sysroot=*)
|
||||
SYSROOT="${i#*=}"
|
||||
shift
|
||||
;;
|
||||
-h|--help)
|
||||
help
|
||||
shift
|
||||
;;
|
||||
-*|--*)
|
||||
echo "Unknown option $i"
|
||||
help
|
||||
return
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
if [ -d "$TOOLCHAIN_PATH" ]; then
|
||||
export PATH=$PATH:"/c/Xilinx/Vitis/2019.2/gnu/aarch32/nt/gcc-arm-linux-gnueabi/bin"
|
||||
export CROSS_COMPILE="arm-linux-gnueabihf"
|
||||
echo "Set toolchain path to /c/Xilinx/Vitis/2019.2/gnu/aarch32/nt/gcc-arm-linux-gnueabi/bin"
|
||||
else
|
||||
echo "Toolchain path $TOOLCHAIN_PATH does not exist"
|
||||
return
|
||||
fi
|
||||
|
||||
if [ -d "$SYSROOT" ]; then
|
||||
export ZYNQ_7020_SYSROOT=$SYSROOT
|
||||
echo "Set sysroot path to $SYSROOT"
|
||||
else
|
||||
echo "Sysroot path $SYSROOT does not exist"
|
||||
return
|
||||
fi
|
Reference in New Issue
Block a user