mirror of
https://gitlab.eurecom.fr/oai/openairinterface5g.git
synced 2026-07-13 04:30:28 +00:00
Remove specific directory for LTE SIM management tools
Move into openair3/NAS/TOOLS/CMakeLists.txt, and simplify the CMakeLists.txt. Co-authored-by: Robert Schmidt <robert.schmidt@openairinterface.org>
This commit is contained in:
committed by
Robert Schmidt
parent
61c769f8b5
commit
b65b5dd40e
1
.gitignore
vendored
1
.gitignore
vendored
@@ -5,7 +5,6 @@
|
||||
cmake_targets/log/
|
||||
cmake_targets/*/build/
|
||||
cmake_targets/ran_build/
|
||||
cmake_targets/nas_sim_tools/build/
|
||||
log/
|
||||
lte_build_oai/
|
||||
|
||||
|
||||
@@ -172,7 +172,7 @@ else ()
|
||||
endif()
|
||||
|
||||
# add autotools definitions that were maybe used!
|
||||
add_definitions("-DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_FCNTL_H=1 -DHAVE_ARPA_INET_H=1 -DHAVE_SYS_TIME_H=1 -DHAVE_SYS_SOCKET_H=1 -DHAVE_STRERROR=1 -DHAVE_SOCKET=1 -DHAVE_MEMSET=1 -DHAVE_GETTIMEOFDAY=1 -DHAVE_STDLIB_H=1 -DHAVE_MALLOC=1 -DHAVE_LIBSCTP")
|
||||
add_definitions(-DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_FCNTL_H=1 -DHAVE_ARPA_INET_H=1 -DHAVE_SYS_TIME_H=1 -DHAVE_SYS_SOCKET_H=1 -DHAVE_STRERROR=1 -DHAVE_SOCKET=1 -DHAVE_MEMSET=1 -DHAVE_GETTIMEOFDAY=1 -DHAVE_STDLIB_H=1 -DHAVE_MALLOC=1 -DHAVE_LIBSCTP)
|
||||
|
||||
# we need -rdynamic to incorporate all symbols in shared objects, see man page
|
||||
set(commonOpts "-pipe -fPIC -Wall -fno-strict-aliasing -rdynamic")
|
||||
|
||||
@@ -244,7 +244,7 @@ function main() {
|
||||
shift;;
|
||||
--UE)
|
||||
UE=1
|
||||
TARGET_LIST="$TARGET_LIST lte-uesoftmodem"
|
||||
TARGET_LIST="$TARGET_LIST lte-uesoftmodem conf2uedata usim nvram"
|
||||
echo_info "Will compile UE"
|
||||
shift;;
|
||||
--nrUE)
|
||||
@@ -513,18 +513,7 @@ function main() {
|
||||
fi
|
||||
|
||||
if [ "$UE" = 1 ] ; then
|
||||
|
||||
echo_info "Compiling UE specific part"
|
||||
|
||||
[ "$CLEAN" = "1" ] && rm -rf $DIR/nas_sim_tools/build
|
||||
mkdir -p $DIR/nas_sim_tools/build
|
||||
cd $DIR/nas_sim_tools/build
|
||||
|
||||
${CMAKE_CMD% *} ..
|
||||
compilations nas_sim_tools usim.txt "usim" "${BUILD_TOOL_OPT}"
|
||||
compilations nas_sim_tools nvram.txt "nvram" "${BUILD_TOOL_OPT}"
|
||||
compilations nas_sim_tools conf2uedata.txt "conf2uedata" "${BUILD_TOOL_OPT}"
|
||||
|
||||
echo_info "Generate LTE USIM default sim content UE specific part"
|
||||
# generate USIM data
|
||||
if [ -f conf2uedata ]; then
|
||||
install_nas_tools $conf_nvram_path $DIR/$BUILD_DIR/build "$DIR/$BUILD_DIR/build/conf2uedata.txt"
|
||||
|
||||
@@ -1,79 +0,0 @@
|
||||
cmake_minimum_required(VERSION 3.5)
|
||||
|
||||
project(NAS_SIM_TOOLS)
|
||||
|
||||
include(FindPkgConfig)
|
||||
pkg_search_module(CONFIG libconfig REQUIRED)
|
||||
include_directories(${CONFIG_INCLUDE_DIRS})
|
||||
add_definitions(-std=gnu99)
|
||||
include("../macros.cmake")
|
||||
|
||||
ENABLE_LANGUAGE(C)
|
||||
|
||||
set(CMAKE_C_FLAGS
|
||||
"${CMAKE_C_FLAGS} ${C_FLAGS_PROCESSOR} -Werror -Wall -Wstrict-prototypes -g")
|
||||
|
||||
set(OPENAIR_DIR $ENV{OPENAIR_DIR})
|
||||
set(OPENAIR3_DIR $ENV{OPENAIR_DIR}/openair3)
|
||||
include_directories (${OPENAIR_DIR}/openair2/COMMON)
|
||||
include_directories (${OPENAIR_DIR})
|
||||
|
||||
set(CONF2UEDATA_LIB_SRC
|
||||
${OPENAIR_DIR}/openair3/NAS/TOOLS/conf_emm.c
|
||||
${OPENAIR_DIR}/openair3/NAS/TOOLS/conf_user_data.c
|
||||
${OPENAIR_DIR}/openair3/NAS/TOOLS/conf_usim.c
|
||||
${OPENAIR_DIR}/openair3/NAS/TOOLS/conf_network.c
|
||||
${OPENAIR_DIR}/openair3/NAS/TOOLS/conf_user_plmn.c
|
||||
${OPENAIR_DIR}/openair3/NAS/TOOLS/conf_parser.c
|
||||
${OPENAIR_DIR}/openair3/NAS/TOOLS/fs.c
|
||||
${OPENAIR_DIR}/openair3/NAS/TOOLS/display.c
|
||||
${OPENAIR_DIR}/openair3/NAS/UE/API/USIM/usim_api.c
|
||||
${OPENAIR_DIR}/openair3/NAS/UE/API/USIM/aka_functions.c
|
||||
${OPENAIR_DIR}/common/utils/mem/memory.c
|
||||
${OPENAIR_DIR}/openair3/NAS/COMMON/UTIL/OctetString.c
|
||||
${OPENAIR_DIR}/common/utils/utils.c
|
||||
)
|
||||
|
||||
include_directories(
|
||||
${OPENAIR_DIR}/common/utils
|
||||
${OPENAIR_DIR}/openair3/NAS/UE
|
||||
${OPENAIR_DIR}/openair3/NAS/COMMON
|
||||
${OPENAIR_DIR}/openair3/NAS/UE/API/USER
|
||||
${OPENAIR_DIR}/openair3/NAS/UE/API/USIM
|
||||
${OPENAIR_DIR}/openair3/NAS/UE/EMM/
|
||||
${OPENAIR_DIR}/openair3/NAS/UE/ESM/
|
||||
${OPENAIR_DIR}/openair3/NAS/COMMON/IES/
|
||||
${OPENAIR_DIR}/openair3/NAS/COMMON/UTIL
|
||||
)
|
||||
|
||||
# conf2uedata binary
|
||||
|
||||
set(conf2uedata_SRC
|
||||
${OPENAIR_DIR}/openair3/NAS/TOOLS/conf2uedata.c
|
||||
${CONF2UEDATA_LIB_SRC}
|
||||
)
|
||||
|
||||
add_executable(conf2uedata ${conf2uedata_SRC} )
|
||||
target_link_libraries(conf2uedata ${CONFIG_LIBRARIES})
|
||||
|
||||
# usim binary
|
||||
|
||||
set(usim_SRC
|
||||
${OPENAIR_DIR}/openair3/NAS/TOOLS/usim.c
|
||||
${CONF2UEDATA_LIB_SRC}
|
||||
)
|
||||
|
||||
|
||||
add_executable(usim ${usim_SRC} )
|
||||
target_link_libraries(usim ${CONFIG_LIBRARIES})
|
||||
|
||||
# nvram binary
|
||||
|
||||
set(nvram_SRC
|
||||
${OPENAIR_DIR}/openair3/NAS/TOOLS/nvram.c
|
||||
${CONF2UEDATA_LIB_SRC}
|
||||
)
|
||||
|
||||
|
||||
add_executable(nvram ${nvram_SRC})
|
||||
target_link_libraries(nvram ${CONFIG_LIBRARIES})
|
||||
@@ -177,7 +177,6 @@ clean_all_files() {
|
||||
dir=$OPENAIR_DIR/cmake_targets
|
||||
rm -rf $dir/ran_build $dir/ran_build_noLOG
|
||||
rm -rf $dir/lte-simulators/build
|
||||
rm -rf $dir/nas_sim_tools/build
|
||||
rm -rf $dir/oaisim_build_oai/build $dir/oaisim_build_oai/CMakeLists.txt
|
||||
rm -rf $dir/autotests/bin $dir/autotests/log $dir/autotests/*/build
|
||||
}
|
||||
|
||||
@@ -55,9 +55,9 @@ RUN dnf update -y && \
|
||||
WORKDIR /opt/oai-lte-ue/bin
|
||||
COPY --from=lte-ue-build \
|
||||
/oai-ran/cmake_targets/ran_build/build/lte-uesoftmodem \
|
||||
/oai-ran/cmake_targets/nas_sim_tools/build/conf2uedata \
|
||||
/oai-ran/cmake_targets/nas_sim_tools/build/nvram \
|
||||
/oai-ran/cmake_targets/nas_sim_tools/build/usim \
|
||||
/oai-ran/cmake_targets/ran_build/build/conf2uedata \
|
||||
/oai-ran/cmake_targets/ran_build/build/nvram \
|
||||
/oai-ran/cmake_targets/ran_build/build/usim \
|
||||
./
|
||||
|
||||
COPY ./docker/scripts/lte_ue_entrypoint.sh ./entrypoint.sh
|
||||
|
||||
@@ -56,9 +56,9 @@ RUN dnf update -y && \
|
||||
WORKDIR /opt/oai-lte-ue/bin
|
||||
COPY --from=lte-ue-build \
|
||||
/oai-ran/cmake_targets/ran_build/build/lte-uesoftmodem \
|
||||
/oai-ran/cmake_targets/nas_sim_tools/build/conf2uedata \
|
||||
/oai-ran/cmake_targets/nas_sim_tools/build/nvram \
|
||||
/oai-ran/cmake_targets/nas_sim_tools/build/usim \
|
||||
/oai-ran/cmake_targets/ran_build/build/conf2uedata \
|
||||
/oai-ran/cmake_targets/ran_build/build/nvram \
|
||||
/oai-ran/cmake_targets/ran_build/build/usim \
|
||||
./
|
||||
|
||||
COPY ./docker/scripts/lte_ue_entrypoint.sh ./entrypoint.sh
|
||||
|
||||
@@ -89,9 +89,9 @@ COPY --from=lte-ue-build /usr/lib/x86_64-linux-gnu/libasan.so.8.0.0 /usr/lib/x86
|
||||
WORKDIR /opt/oai-lte-ue/bin
|
||||
COPY --from=lte-ue-build \
|
||||
/oai-ran/cmake_targets/ran_build/build/lte-uesoftmodem \
|
||||
/oai-ran/cmake_targets/nas_sim_tools/build/conf2uedata \
|
||||
/oai-ran/cmake_targets/nas_sim_tools/build/nvram \
|
||||
/oai-ran/cmake_targets/nas_sim_tools/build/usim \
|
||||
/oai-ran/cmake_targets/ran_build/build/conf2uedata \
|
||||
/oai-ran/cmake_targets/ran_build/build/nvram \
|
||||
/oai-ran/cmake_targets/ran_build/build/usim \
|
||||
./
|
||||
|
||||
COPY ./docker/scripts/lte_ue_entrypoint.sh ./entrypoint.sh
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
add_subdirectory(COMMON)
|
||||
add_subdirectory(NR_UE)
|
||||
add_subdirectory(UE)
|
||||
add_subdirectory(TOOLS)
|
||||
|
||||
36
openair3/NAS/TOOLS/CMakeLists.txt
Executable file
36
openair3/NAS/TOOLS/CMakeLists.txt
Executable file
@@ -0,0 +1,36 @@
|
||||
add_library(conf2uedata_lib OBJECT
|
||||
conf_emm.c
|
||||
conf_user_data.c
|
||||
conf_usim.c
|
||||
conf_network.c
|
||||
conf_user_plmn.c
|
||||
conf_parser.c
|
||||
fs.c
|
||||
display.c
|
||||
../UE/API/USIM/usim_api.c
|
||||
../UE/API/USIM/aka_functions.c
|
||||
../COMMON/UTIL/OctetString.c
|
||||
${OPENAIR_DIR}/common/utils/mem/memory.c
|
||||
${OPENAIR_DIR}/common/utils/utils.c
|
||||
)
|
||||
|
||||
add_executable(conf2uedata conf2uedata.c)
|
||||
target_link_libraries(conf2uedata PRIVATE conf2uedata_lib)
|
||||
set_target_properties(conf2uedata PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
|
||||
target_link_libraries(conf2uedata PRIVATE LOG minimal_lib ${libconfig_LIBRARIES})
|
||||
|
||||
add_executable(usim usim.c)
|
||||
target_link_libraries(usim PRIVATE conf2uedata_lib)
|
||||
set_target_properties(usim PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
|
||||
target_link_libraries(usim PRIVATE LOG minimal_lib ${libconfig_LIBRARIES})
|
||||
|
||||
add_executable(nvram nvram.c)
|
||||
target_link_libraries(nvram PRIVATE conf2uedata_lib)
|
||||
set_target_properties(nvram PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
|
||||
target_link_libraries(nvram PRIVATE LOG minimal_lib ${libconfig_LIBRARIES})
|
||||
|
||||
if (${T_TRACER})
|
||||
add_dependencies(conf2uedata generate_T)
|
||||
add_dependencies(usim generate_T)
|
||||
add_dependencies(nvram generate_T)
|
||||
endif (${T_TRACER})
|
||||
@@ -3,6 +3,7 @@
|
||||
#include <string.h> // memset, strncpy
|
||||
#include <getopt.h>
|
||||
|
||||
#include "log.h"
|
||||
#include "conf2uedata.h"
|
||||
#include "display.h"
|
||||
#include "conf_parser.h"
|
||||
@@ -42,6 +43,7 @@ int main(int argc, char**argv) {
|
||||
exit(1);
|
||||
}
|
||||
|
||||
logInit();
|
||||
if ( parse_config_file(output_dir, conf_file, OUTPUT_ALL) == false ) {
|
||||
exit(1);
|
||||
}
|
||||
|
||||
@@ -42,6 +42,7 @@ Description Implements the utility used to generate data stored in the
|
||||
#include <stdbool.h>
|
||||
#include <getopt.h>
|
||||
|
||||
#include "log.h"
|
||||
#include "conf_parser.h"
|
||||
#include "display.h"
|
||||
|
||||
@@ -104,6 +105,7 @@ int main (int argc, char * const argv[])
|
||||
_display_usage(argv[0]);
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
logInit();
|
||||
|
||||
/* compute default data directory if no output_dir is given */
|
||||
if ( output_dir == NULL ) {
|
||||
|
||||
@@ -42,6 +42,7 @@ Description Implements the utility used to generate data stored in the
|
||||
#include <stdbool.h>
|
||||
#include <getopt.h>
|
||||
|
||||
#include "log.h"
|
||||
#include "conf_parser.h"
|
||||
#include "display.h"
|
||||
|
||||
@@ -105,6 +106,7 @@ int main (int argc, char * const argv[])
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
|
||||
logInit();
|
||||
/* compute default data directory if no output_dir is given */
|
||||
if ( output_dir == NULL ) {
|
||||
output_dir = getenv(OUTPUT_DIR_ENV);
|
||||
|
||||
Reference in New Issue
Block a user