Build Hosted SW without proprietary libraries #337

Merged
muellerr merged 8 commits from build_host_without_proprietary_libs into develop 2023-01-09 16:07:55 +01:00
8 changed files with 32 additions and 16 deletions

View File

@ -13,6 +13,9 @@ list yields a list of all related PRs for each release.
## Fixed ## Fixed
- PLOC SUPV: Minor adaptions and important bugfix for UART manager - PLOC SUPV: Minor adaptions and important bugfix for UART manager
- Allow cloning and building the hosted OBSW version without proprietary libraries,
which also avoids the need to have a Gitea account.
PR: https://egit.irs.uni-stuttgart.de/eive/eive-obsw/pulls/337
## Added ## Added

View File

@ -402,15 +402,14 @@ endif()
add_subdirectory(thirdparty) add_subdirectory(thirdparty)
if(EIVE_ADD_LINUX_FILES) if(EIVE_ADD_LINUX_FILES)
add_subdirectory(${LIB_ARCSEC_PATH}) if(TGT_BSP MATCHES "arm/q7s")
add_subdirectory(${LIB_GOMSPACE_PATH})
add_subdirectory(${LIB_ARCSEC_PATH})
endif()
add_subdirectory(${LINUX_PATH}) add_subdirectory(${LINUX_PATH})
endif() endif()
add_subdirectory(${BSP_PATH}) add_subdirectory(${BSP_PATH})
if(UNIX)
add_subdirectory(${LIB_GOMSPACE_PATH})
endif()
add_subdirectory(${COMMON_PATH}) add_subdirectory(${COMMON_PATH})
add_subdirectory(${DUMMY_PATH}) add_subdirectory(${DUMMY_PATH})
@ -489,7 +488,8 @@ target_link_libraries(${LIB_DUMMIES} PUBLIC ${LIB_FSFW_NAME} ${LIB_JSON_NAME})
target_link_libraries(${OBSW_NAME} PRIVATE ${LIB_EIVE_MISSION} ${LIB_DUMMIES}) target_link_libraries(${OBSW_NAME} PRIVATE ${LIB_EIVE_MISSION} ${LIB_DUMMIES})
if(TGT_BSP MATCHES "arm/q7s") if(TGT_BSP MATCHES "arm/q7s")
target_link_libraries(${LIB_EIVE_MISSION} PUBLIC ${LIB_GPS} ${LIB_ARCSEC}) target_link_libraries(${LIB_EIVE_MISSION} PUBLIC ${LIB_GPS} ${LIB_ARCSEC}
${LIB_GOMSPACE_CLIENTS})
endif() endif()
target_link_libraries(${UNITTEST_NAME} PRIVATE Catch2 ${LIB_EIVE_MISSION} target_link_libraries(${UNITTEST_NAME} PRIVATE Catch2 ${LIB_EIVE_MISSION}
@ -499,10 +499,6 @@ if(TGT_BSP MATCHES "arm/egse")
target_link_libraries(${OBSW_NAME} PRIVATE ${LIB_ARCSEC}) target_link_libraries(${OBSW_NAME} PRIVATE ${LIB_ARCSEC})
endif() endif()
if(UNIX)
target_link_libraries(${OBSW_NAME} PRIVATE ${LIB_GOMSPACE_CLIENTS})
endif()
if(EIVE_ADD_ETL_LIB) if(EIVE_ADD_ETL_LIB)
target_link_libraries(${LIB_EIVE_MISSION} PUBLIC ${LIB_ETL_TARGET}) target_link_libraries(${LIB_EIVE_MISSION} PUBLIC ${LIB_ETL_TARGET})
endif() endif()

View File

@ -14,7 +14,7 @@ RUN set -ex; \
rm -rf build-hosted; \ rm -rf build-hosted; \
mkdir build-hosted; \ mkdir build-hosted; \
cd build-hosted; \ cd build-hosted; \
cmake -DCMAKE_BUILD_TYPE=Release -DOS_FSFW=linux ..; cmake -DCMAKE_BUILD_TYPE=Release -DOSAL_FSFW=host ..;
ENTRYPOINT ["cmake", "--build", "build-hosted"] ENTRYPOINT ["cmake", "--build", "build-hosted"]
CMD ["-j"] CMD ["-j"]

View File

@ -0,0 +1,3 @@
#!/bin/bash
git submodule update --init fsfw thirdparty/rapidcsv thirdparty/lwgps thirdparty/json

View File

@ -1,12 +1,14 @@
#!/bin/bash #!/bin/bash
cfg_script_name="cmake-build-cfg.py" cfg_script_name="cmake-build-cfg.py"
init_dir=$(pwd) init_dir=$(pwd)
root_dir=""
if [ -z "${EIVE_OBSW_ROOT}" ]; then if [ -z "${EIVE_OBSW_ROOT}" ]; then
counter=0 counter=0
while [ ${counter} -lt 5 ] while [ ${counter} -lt 5 ]
do do
cd .. cd ..
if [ -f ${cfg_script_name} ];then if [ -f ${cfg_script_name} ];then
root_dir=$(realpath "../..")
break break
fi fi
counter=$((counter=counter + 1)) counter=$((counter=counter + 1))
@ -18,6 +20,7 @@ if [ -z "${EIVE_OBSW_ROOT}" ]; then
fi fi
else else
cfg_script_name="${EIVE_OBSW_ROOT}/cmake/scripts/${cfg_script_name}" cfg_script_name="${EIVE_OBSW_ROOT}/cmake/scripts/${cfg_script_name}"
root_dir=${EIVE_OBSW_ROOT}
fi fi
build_generator="make" build_generator="make"
@ -34,4 +37,5 @@ echo "Running command (without the leading +):"
set -x # Print command set -x # Print command
${python} ${cfg_script_name} -o "${os_fsfw}" -g "${build_generator}" -b "debug" -l "${builddir}" ${python} ${cfg_script_name} -o "${os_fsfw}" -g "${build_generator}" -b "debug" -l "${builddir}"
# Use this if commands are added which should not be printed # Use this if commands are added which should not be printed
# set +x set +x
cd ${root_dir}/${builddir}

View File

@ -7,6 +7,7 @@ if [ -z "${EIVE_OBSW_ROOT}" ]; then
do do
cd .. cd ..
if [ -f ${cfg_script_name} ];then if [ -f ${cfg_script_name} ];then
root_dir=$(realpath "../..")
break break
fi fi
counter=$((counter=counter + 1)) counter=$((counter=counter + 1))
@ -20,7 +21,7 @@ else
cfg_script_name="${EIVE_OBSW_ROOT}/cmake/scripts/${cfg_script_name}" cfg_script_name="${EIVE_OBSW_ROOT}/cmake/scripts/${cfg_script_name}"
fi fi
build_generator="Unix Makefiles" build_generator="make"
os_fsfw="host" os_fsfw="host"
builddir="cmake-build-release" builddir="cmake-build-release"
if [ "${OS}" = "Windows_NT" ]; then if [ "${OS}" = "Windows_NT" ]; then
@ -34,4 +35,5 @@ echo "Running command (without the leading +):"
set -x # Print command set -x # Print command
${python} ${cfg_script_name} -o "${os_fsfw}" -g "${build_generator}" -b "release" -l "${builddir}" ${python} ${cfg_script_name} -o "${os_fsfw}" -g "${build_generator}" -b "release" -l "${builddir}"
# Use this if commands are added which should not be printed # Use this if commands are added which should not be printed
# set +x set +x
cd ${root_dir}/${builddir}

View File

@ -1,4 +1,3 @@
add_subdirectory(csp)
add_subdirectory(utility) add_subdirectory(utility)
add_subdirectory(callbacks) add_subdirectory(callbacks)
add_subdirectory(boardtest) add_subdirectory(boardtest)
@ -9,4 +8,9 @@ if(EIVE_ADD_LINUX_FSFWCONFIG)
add_subdirectory(fsfwconfig) add_subdirectory(fsfwconfig)
endif() endif()
# Dependency on proprietary library
if(TGT_BSP MATCHES "arm/q7s")
add_subdirectory(csp)
endif()
target_sources(${OBSW_NAME} PUBLIC ObjectFactory.cpp scheduling.cpp) target_sources(${OBSW_NAME} PUBLIC ObjectFactory.cpp scheduling.cpp)

View File

@ -7,4 +7,8 @@ target_sources(
ScexDleParser.cpp ScexHelper.cpp) ScexDleParser.cpp ScexHelper.cpp)
add_subdirectory(ploc) add_subdirectory(ploc)
add_subdirectory(startracker)
# Dependency on proprietary library
if(TGT_BSP MATCHES "arm/q7s")
add_subdirectory(startracker)
endif()