Merge remote-tracking branch 'origin/improve_build_nr_lte_merge' into develop_integration_2020_w04
This commit is contained in:
@@ -127,7 +127,7 @@ endfunction()
|
||||
|
||||
#set(CMAKE_BUILD_TYPE "Debug")
|
||||
if (CMAKE_BUILD_TYPE STREQUAL "")
|
||||
set(CMAKE_BUILD_TYPE "RelWithDebInfo")
|
||||
set(CMAKE_BUILD_TYPE "Release")
|
||||
endif()
|
||||
message("CMAKE_BUILD_TYPE is ${CMAKE_BUILD_TYPE}")
|
||||
add_list_string_option(CMAKE_BUILD_TYPE "RelWithDebInfo" "Choose the type of build, options are: None(CMAKE_CXX_FLAGS or CMAKE_C_FLAGS used) Debug Release RelWithDebInfo MinSizeRel." Debug Release RelWithDebInfo MinSizeRel)
|
||||
@@ -184,9 +184,9 @@ set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-rpath -Wl,${CMAKE_CU
|
||||
#########################
|
||||
# set a flag for changes in the source code
|
||||
# these changes are related to hardcoded path to include .h files
|
||||
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS} -g -DMALLOC_CHECK_=3")
|
||||
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS} -g3 -DMALLOC_CHECK_=3")
|
||||
set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS} -g3 -DMALLOC_CHECK_=3 -O2")
|
||||
|
||||
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS} -O3")
|
||||
|
||||
set(GIT_BRANCH "UNKNOWN")
|
||||
set(GIT_COMMIT_HASH "UNKNOWN")
|
||||
@@ -244,14 +244,10 @@ add_boolean_option(TEST_OMG False "???")
|
||||
add_boolean_option(DEBUG_OMG False "???")
|
||||
add_boolean_option(PRINT_STATS False "This adds the possibility to see the status")
|
||||
add_boolean_option(T_TRACER True "Activate the T tracer, a debugging/monitoring framework" )
|
||||
add_boolean_option(ENABLE_VCD True "always true now, time measurements of proc calls and var displays")
|
||||
add_boolean_option(UE_AUTOTEST_TRACE False "Activate UE autotest specific logs")
|
||||
add_boolean_option(UE_DEBUG_TRACE False "Activate UE debug trace")
|
||||
add_boolean_option(UE_TIMING_TRACE False "Activate UE timing trace")
|
||||
add_boolean_option(DISABLE_LOG_X False "Deactivate all LOG_* macros")
|
||||
add_boolean_option(USRP_REC_PLAY False "Enable USRP record playback mode")
|
||||
add_boolean_option(UE_NAS_USE_TUN False "Enable UE NAS TUN device instead of ue_ip.ko")
|
||||
add_boolean_option(NOS1 False "Allows to run without a EPC")
|
||||
add_boolean_option(BASIC_SIMULATOR False "Has to be True when building the basic simulator, False otherwise")
|
||||
add_boolean_option(DEBUG_CONSOLE False "makes debugging easier, disables stdout/stderr buffering")
|
||||
|
||||
@@ -341,7 +337,6 @@ add_library(NR_RRC_LIB ${nr_rrc_h} ${nr_rrc_source}
|
||||
add_dependencies(NR_RRC_LIB nr_rrc_flag)
|
||||
include_directories ("${NR_RRC_FULL_DIR}")
|
||||
|
||||
|
||||
# S1AP
|
||||
# Same limitation as described in RRC: unknown generated file list
|
||||
# so we generate it at cmake time
|
||||
@@ -635,10 +630,8 @@ add_library(F1AP
|
||||
add_list1_option(NB_ANTENNAS_RX "2" "Number of antennas in reception" "1" "2" "4")
|
||||
add_list1_option(NB_ANTENNAS_TX "4" "Number of antennas in transmission" "1" "2" "4")
|
||||
|
||||
add_list2_option(RF_BOARD "EXMIMO" "RF head type" "None" "OAI_USRP" "OAI_BLADERF" "CPRIGW" "OAI_LMSSDR" "OAI_SIMU")
|
||||
if (NOT ${RF_BOARD} STREQUAL "None")
|
||||
add_definitions(-DMANAGED_RF=1)
|
||||
endif()
|
||||
add_list2_option(RF_BOARD "EXMIMO" "RF head type" "None" "OAI_USRP" "OAI_BLADERF" "OAI_LMSSDR" "OAI_SIMU")
|
||||
|
||||
|
||||
|
||||
add_list2_option(TRANSP_PRO "None" "Transport protocol type" "None" "ETHERNET")
|
||||
@@ -655,7 +648,6 @@ set (CONFIG_LIBCONFIG_SOURCES
|
||||
${CONFIG_ROOTDIR}/libconfig/config_libconfig.c
|
||||
)
|
||||
add_library(CONFIG_LIB ${CONFIG_SOURCES})
|
||||
set(CONFIG_LIBRARIES CONFIG_LIB)
|
||||
add_library(params_libconfig MODULE ${CONFIG_LIBCONFIG_SOURCES} )
|
||||
target_link_libraries(params_libconfig config)
|
||||
# shared library loader
|
||||
@@ -737,7 +729,7 @@ Message("CPU_Affinity flag is ${CPU_AFFINITY}")
|
||||
##############################################################
|
||||
# ???!!! TO BE DOCUMENTED OPTIONS !!!???
|
||||
##############################################################
|
||||
add_boolean_option(ENABLE_USE_MME True "eNB connected to MME (INTERFACE S1-C), not standalone eNB")
|
||||
|
||||
add_boolean_option(NO_RRM True "DO WE HAVE A RADIO RESSOURCE MANAGER: NO")
|
||||
add_boolean_option(RRC_DEFAULT_RAB_IS_AM False "set the RLC mode to AM for the default bearer")
|
||||
|
||||
@@ -747,7 +739,6 @@ add_boolean_option(CPU_AFFINITY False "Enable CPU Affinity of threads (only vali
|
||||
add_boolean_option(NAS_NETLINK False "useless ??? Must be True to compile nasmesh driver without rtai ????")
|
||||
add_boolean_option(OAI_NW_DRIVER_USE_NETLINK True "????")
|
||||
|
||||
add_boolean_option(USE_MME False "this flag is used only one time in lte-softmodem.c")
|
||||
add_boolean_option(MESSAGE_CHART_GENERATOR False "For generating sequence diagrams")
|
||||
add_boolean_option(MESSAGE_CHART_GENERATOR_RLC_MAC False "trace RLC-MAC exchanges in sequence diagrams")
|
||||
add_boolean_option(MESSAGE_CHART_GENERATOR_PHY False "trace some PHY exchanges in sequence diagrams")
|
||||
@@ -1598,11 +1589,8 @@ set(PHY_MEX_UE
|
||||
${OPENAIR_DIR}/common/utils/LOG/log.c
|
||||
${OPENAIR_DIR}/common/utils/T/T.c
|
||||
${OPENAIR_DIR}/common/utils/T/local_tracer.c
|
||||
${OPENAIR_DIR}/common/config/config_cmdline.c
|
||||
${OPENAIR_DIR}/common/config/config_userapi.c
|
||||
${OPENAIR_DIR}/common/config/config_load_configmodule.c
|
||||
)
|
||||
add_library(PHY_MEX ${PHY_MEX_UE})
|
||||
add_library(PHY_MEX ${PHY_MEX_UE} ${CONFIG_LIB})
|
||||
|
||||
#Layer 2 library
|
||||
#####################
|
||||
@@ -2425,13 +2413,10 @@ add_definitions(-DASN1_MINIMUM_VERSION=924)
|
||||
add_library(minimal_lib
|
||||
${OPENAIR_DIR}/common/utils/backtrace.c
|
||||
${OPENAIR_DIR}/common/utils/LOG/log.c
|
||||
${OPENAIR_DIR}/common/config/config_userapi.c
|
||||
${OPENAIR_DIR}/common/config/config_load_configmodule.c
|
||||
${OPENAIR_DIR}/common/config/config_cmdline.c
|
||||
${OPENAIR_DIR}/common/utils/minimal_stub.c
|
||||
${T_SOURCE}
|
||||
)
|
||||
target_link_libraries(minimal_lib pthread dl ${T_LIB})
|
||||
target_link_libraries(minimal_lib pthread dl ${T_LIB} ${CONFIG_LIB})
|
||||
|
||||
add_executable(nfapi_test
|
||||
${OPENAIR_DIR}/openair2/NR_PHY_INTERFACE/nfapi_5g_test.c
|
||||
@@ -2485,7 +2470,7 @@ target_link_libraries (lte-softmodem
|
||||
-Wl,--end-group z dl)
|
||||
|
||||
target_link_libraries (lte-softmodem ${LIBXML2_LIBRARIES})
|
||||
target_link_libraries (lte-softmodem pthread m ${CONFIG_LIBRARIES} rt crypt ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} ${NETTLE_LIBRARIES} sctp ${PROTOBUF_LIB} ${CMAKE_DL_LIBS} ${LIBYAML_LIBRARIES})
|
||||
target_link_libraries (lte-softmodem pthread m ${CONFIG_LIB} rt crypt ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} ${NETTLE_LIBRARIES} sctp ${PROTOBUF_LIB} ${CMAKE_DL_LIBS} ${LIBYAML_LIBRARIES})
|
||||
target_link_libraries (lte-softmodem ${LIB_LMS_LIBRARIES})
|
||||
target_link_libraries (lte-softmodem ${T_LIB})
|
||||
|
||||
@@ -2558,7 +2543,7 @@ target_link_libraries (lte-uesoftmodem
|
||||
-Wl,--end-group z dl)
|
||||
|
||||
target_link_libraries (lte-uesoftmodem ${LIBXML2_LIBRARIES})
|
||||
target_link_libraries (lte-uesoftmodem pthread m ${CONFIG_LIBRARIES} rt crypt ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} ${NETTLE_LIBRARIES} sctp ${PROTOBUF_LIB} ${CMAKE_DL_LIBS} ${LIBYAML_LIBRARIES} ${ATLAS_LIBRARIES})
|
||||
target_link_libraries (lte-uesoftmodem pthread m ${CONFIG_LIB} rt crypt ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} ${NETTLE_LIBRARIES} sctp ${PROTOBUF_LIB} ${CMAKE_DL_LIBS} ${LIBYAML_LIBRARIES} ${ATLAS_LIBRARIES})
|
||||
target_link_libraries (lte-uesoftmodem ${LIB_LMS_LIBRARIES})
|
||||
target_link_libraries (lte-uesoftmodem ${T_LIB})
|
||||
|
||||
@@ -2597,7 +2582,7 @@ target_link_libraries (nr-softmodem
|
||||
-Wl,--end-group z dl)
|
||||
|
||||
target_link_libraries (nr-softmodem ${LIBXML2_LIBRARIES})
|
||||
target_link_libraries (nr-softmodem pthread m ${CONFIG_LIBRARIES} rt crypt ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} ${NETTLE_LIBRARIES} sctp ${XFORMS_LIBRARIES} ${PROTOBUF_LIB} ${CMAKE_DL_LIBS} ${LIBYAML_LIBRARIES} ${ATLAS_LIBRARIES})
|
||||
target_link_libraries (nr-softmodem pthread m ${CONFIG_LIB} rt crypt ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} ${NETTLE_LIBRARIES} sctp ${XFORMS_LIBRARIES} ${PROTOBUF_LIB} ${CMAKE_DL_LIBS} ${LIBYAML_LIBRARIES} ${ATLAS_LIBRARIES})
|
||||
target_link_libraries (nr-softmodem ${LIB_LMS_LIBRARIES})
|
||||
target_link_libraries (nr-softmodem ${T_LIB})
|
||||
|
||||
@@ -2637,7 +2622,7 @@ target_link_libraries (nr-uesoftmodem
|
||||
-Wl,--end-group z dl)
|
||||
|
||||
target_link_libraries (nr-uesoftmodem ${LIBXML2_LIBRARIES})
|
||||
target_link_libraries (nr-uesoftmodem pthread m ${CONFIG_LIBRARIES} rt crypt ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} ${NETTLE_LIBRARIES} sctp ${XFORMS_LIBRARIES} ${PROTOBUF_LIB} ${CMAKE_DL_LIBS} ${LIBYAML_LIBRARIES} ${ATLAS_LIBRARIES})
|
||||
target_link_libraries (nr-uesoftmodem pthread m ${CONFIG_LIB} rt crypt ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} ${NETTLE_LIBRARIES} sctp ${XFORMS_LIBRARIES} ${PROTOBUF_LIB} ${CMAKE_DL_LIBS} ${LIBYAML_LIBRARIES} ${ATLAS_LIBRARIES})
|
||||
target_link_libraries (nr-uesoftmodem ${LIB_LMS_LIBRARIES})
|
||||
target_link_libraries (nr-uesoftmodem ${T_LIB})
|
||||
|
||||
@@ -2683,7 +2668,7 @@ add_executable(dlsim_tm4
|
||||
)
|
||||
target_link_libraries (dlsim_tm4
|
||||
-Wl,--start-group SIMU UTIL SCHED_LIB SCHED_RU_LIB PHY LFDS ${ITTI_LIB} -Wl,--end-group
|
||||
pthread m rt ${CONFIG_LIBRARIES} ${ATLAS_LIBRARIES} ${T_LIB}
|
||||
pthread m rt ${CONFIG_LIB} ${ATLAS_LIBRARIES} ${T_LIB}
|
||||
)
|
||||
|
||||
add_executable(polartest
|
||||
@@ -2806,7 +2791,7 @@ foreach(myExe dlsim dlsim_tm7 ulsim pbchsim scansim mbmssim pdcchsim pucchsim pr
|
||||
)
|
||||
target_link_libraries (${myExe}
|
||||
-Wl,--start-group SIMU UTIL SCHED_LIB SCHED_RU_LIB SCHED_UE_LIB PHY_COMMON PHY PHY_UE PHY_RU LFDS ${ITTI_LIB} LFDS7 -Wl,--end-group
|
||||
pthread m rt ${CONFIG_LIBRARIES} ${ATLAS_LIBRARIES} ${XFORMS_LIBRARIES} ${T_LIB} dl
|
||||
pthread m rt ${CONFIG_LIB} ${ATLAS_LIBRARIES} ${XFORMS_LIBRARIES} ${T_LIB} dl
|
||||
)
|
||||
endforeach(myExe)
|
||||
|
||||
@@ -2819,7 +2804,7 @@ add_executable(test_epc_generate_scenario
|
||||
${OPENAIR3_DIR}/S1AP/s1ap_eNB_defs.h
|
||||
)
|
||||
target_link_libraries (test_epc_generate_scenario
|
||||
-Wl,--start-group RRC_LIB S1AP_LIB S1AP_ENB X2AP_LIB X2AP_ENB M2AP_LIB M2AP_ENB M3AP_LIB M3AP_ENB F1AP_LIB F1AP GTPV1U LIB_NAS_UE SECU_CN UTIL HASHTABLE SCTP_CLIENT MME_APP UDP SCHED_LIB PHY LFDS ${ITTI_LIB} ${MSC_LIB} L2 -Wl,--end-group pthread m rt crypt sctp ${LIBXML2_LIBRARIES} ${LIBXSLT_LIBRARIES} ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} ${NETTLE_LIBRARIES} ${CONFIG_LIBRARIES}
|
||||
-Wl,--start-group RRC_LIB S1AP_LIB S1AP_ENB X2AP_LIB X2AP_ENB M2AP_LIB M2AP_ENB M3AP_LIB M3AP_ENB F1AP_LIB F1AP GTPV1U LIB_NAS_UE SECU_CN UTIL HASHTABLE SCTP_CLIENT MME_APP UDP SCHED_LIB PHY LFDS ${ITTI_LIB} ${MSC_LIB} L2 -Wl,--end-group pthread m rt crypt sctp ${LIBXML2_LIBRARIES} ${LIBXSLT_LIBRARIES} ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} ${NETTLE_LIBRARIES} ${CONFIG_LIB}
|
||||
)
|
||||
|
||||
add_executable(test_epc_play_scenario
|
||||
@@ -2838,7 +2823,7 @@ add_executable(test_epc_play_scenario
|
||||
)
|
||||
target_include_directories(test_epc_play_scenario PUBLIC /usr/local/share/asn1c)
|
||||
target_link_libraries (test_epc_play_scenario
|
||||
-Wl,--start-group RRC_LIB S1AP_LIB X2AP_LIB X2AP_ENB M3AP_LIB M3AP_ENB F1AP_LIB F1AP GTPV1U LIB_NAS_UE SECU_CN UTIL HASHTABLE SCTP_CLIENT MME_APP UDP SCHED_LIB PHY_COMMON PHY PHY_UE LFDS ${ITTI_LIB} ${MSC_LIB} -Wl,--end-group pthread m rt crypt sctp ${LIBXML2_LIBRARIES} ${LIBXSLT_LIBRARIES} ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} ${NETTLE_LIBRARIES} ${CONFIG_LIBRARIES}
|
||||
-Wl,--start-group RRC_LIB S1AP_LIB X2AP_LIB X2AP_ENB M3AP_LIB M3AP_ENB F1AP_LIB F1AP GTPV1U LIB_NAS_UE SECU_CN UTIL HASHTABLE SCTP_CLIENT MME_APP UDP SCHED_LIB PHY_COMMON PHY PHY_UE LFDS ${ITTI_LIB} ${MSC_LIB} -Wl,--end-group pthread m rt crypt sctp ${LIBXML2_LIBRARIES} ${LIBXSLT_LIBRARIES} ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} ${NETTLE_LIBRARIES} ${CONFIG_LIB}
|
||||
)
|
||||
|
||||
|
||||
@@ -2858,7 +2843,7 @@ foreach(myExe s1ap
|
||||
${OPENAIR3_DIR}/TEST/test_${myExe}.c
|
||||
)
|
||||
target_link_libraries (test_${myExe}
|
||||
-Wl,--start-group SECU_CN UTIL LFDS -Wl,--end-group m rt crypt ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} ${NETTLE_LIBRARIES} ${CONFIG_LIBRARIES}
|
||||
-Wl,--start-group SECU_CN UTIL LFDS -Wl,--end-group m rt crypt ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} ${NETTLE_LIBRARIES} ${CONFIG_LIB}
|
||||
)
|
||||
endforeach(myExe)
|
||||
|
||||
|
||||
+80
-56
@@ -88,8 +88,11 @@ Options
|
||||
-i | --install-system-files
|
||||
Install OpenAirInterface required files in Linux system
|
||||
This option will require root password
|
||||
-g | --run-with-gdb
|
||||
Add debugging symbols to compilation directives. It also disables any compiler optimization. Only for debugging. Do not use in normal operation!
|
||||
-g | --run-with-gdb <Release | RelWithDebInfo | MinSizeRel | Debug
|
||||
specify the build mode used by cmake. defaults to Debug mode if -g is used alone, with no mode parameter
|
||||
if -g is not specifies, Release mode is used.
|
||||
-G | --cmaketrace
|
||||
enable cmake debugging messages
|
||||
--eNB
|
||||
Makes the LTE softmodem
|
||||
--gNB
|
||||
@@ -190,12 +193,43 @@ function main() {
|
||||
INSTALL_SYSTEM_FILES=1
|
||||
echo_info "Will copy OpenAirInterface files in Linux directories"
|
||||
shift;;
|
||||
-g | --run-with-gdb)
|
||||
GDB=1
|
||||
CMAKE_BUILD_TYPE="Debug"
|
||||
echo_info "Will Compile with gdb symbols and disable compiler optimization"
|
||||
CMAKE_CMD="$CMAKE_CMD -DCMAKE_BUILD_TYPE=Debug --trace-expand"
|
||||
-g | --run-with-gdb)
|
||||
case "$2" in
|
||||
"Release")
|
||||
GDB=0
|
||||
CMAKE_BUILD_TYPE="Release"
|
||||
echo_info "Will Compile without gdb symbols and with compiler optimization"
|
||||
CMAKE_CMD="$CMAKE_CMD -DCMAKE_BUILD_TYPE=Release"
|
||||
shift
|
||||
;;
|
||||
"RelWithDebInfo")
|
||||
GDB=0
|
||||
CMAKE_BUILD_TYPE="RelWithDebInfo"
|
||||
echo_info "Will Compile with gdb symbols"
|
||||
CMAKE_CMD="$CMAKE_CMD -DCMAKE_BUILD_TYPE=RelWithDebInfo"
|
||||
shift
|
||||
;;
|
||||
"MinSizeRel")
|
||||
GDB=0
|
||||
CMAKE_BUILD_TYPE="MinSizeRel"
|
||||
echo_info "Will Compile for minimal exec size"
|
||||
CMAKE_CMD="$CMAKE_CMD -DCMAKE_BUILD_TYPE=MinSizeRel"
|
||||
shift
|
||||
;;
|
||||
"Debug" | *)
|
||||
GDB=1
|
||||
CMAKE_BUILD_TYPE="Debug"
|
||||
echo_info "Will Compile with gdb symbols and disable compiler optimization"
|
||||
CMAKE_CMD="$CMAKE_CMD -DCMAKE_BUILD_TYPE=Debug"
|
||||
if [ "$2" == "Debug" ] ; then
|
||||
shift
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
shift;;
|
||||
-G | --cmaketrace)
|
||||
CMAKE_CMD="$CMAKE_CMD --trace-expand"
|
||||
shift;;
|
||||
--eNB)
|
||||
eNB=1
|
||||
echo_info "Will compile eNB"
|
||||
@@ -513,22 +547,17 @@ function main() {
|
||||
echo_info "3. building the compilation directives ..."
|
||||
|
||||
DIR=$OPENAIR_DIR/cmake_targets
|
||||
|
||||
if [ "$T_TRACER" = "False" ] ; then
|
||||
build_dir=ran_build_noLOG
|
||||
if [ "$SIMUS_PHY" = "1" -o "$SIMUS_CORE" = "1" ] ; then
|
||||
build_dir=phy_simulators
|
||||
else
|
||||
build_dir=ran_build
|
||||
fi
|
||||
|
||||
if [ "$gNB" = "1" ] ; then
|
||||
exec=nr-softmodem
|
||||
elif [ "$nrUE" = "1" ] ; then
|
||||
exec=nr-uesoftmodem
|
||||
elif [ "$eNB" = "1" ] ; then
|
||||
exec=lte-softmodem
|
||||
elif [ "$UE" = "1" ] ; then
|
||||
exec=lte-uesoftmodem
|
||||
if [ "$T_TRACER" = "False" ] ; then
|
||||
build_dir=ran_build_noLOG
|
||||
else
|
||||
build_dir=ran_build
|
||||
fi
|
||||
fi
|
||||
[ "$CLEAN" = "1" ] && rm -rf $DIR/$build_dir/build
|
||||
mkdir -p $DIR/$build_dir/build
|
||||
|
||||
# configuration module libraries, one currently available, using libconfig
|
||||
config_libconfig_shlib=params_libconfig
|
||||
@@ -537,8 +566,7 @@ function main() {
|
||||
if [ "$eNB" = "1" -o "$UE" = "1" -o "$gNB" = "1" -o "$nrUE" = "1" -o "$HW" = "EXMIMO" ] ; then
|
||||
|
||||
# softmodem compilation
|
||||
[ "$CLEAN" = "1" ] && rm -rf $DIR/$build_dir/build
|
||||
mkdir -p $DIR/$build_dir/build
|
||||
|
||||
cmake_file=$DIR/$build_dir/CMakeLists.txt
|
||||
echo "cmake_minimum_required(VERSION 2.8)" > $cmake_file
|
||||
echo "set ( CMAKE_BUILD_TYPE $CMAKE_BUILD_TYPE )" >> $cmake_file
|
||||
@@ -561,29 +589,30 @@ function main() {
|
||||
echo 'include(${CMAKE_CURRENT_SOURCE_DIR}/../CMakeLists.txt)' >> $cmake_file
|
||||
cd $DIR/$build_dir/build
|
||||
eval $CMAKE_CMD
|
||||
fi
|
||||
|
||||
if [ "$eNB" = "1" -o "$UE" = "1" -o "$gNB" = "1" -o "$nrUE" = "1" ] ; then
|
||||
echo_info "Compiling $exec"
|
||||
compilations \
|
||||
$build_dir $exec \
|
||||
$exec $dbin/$exec.$REL
|
||||
|
||||
# if --eNB --UE are both provided together as build options
|
||||
if [ "$eNB" = "1" -a "$UE" = "1" ] ; then
|
||||
echo_info "Compiling lte-uesoftmodem"
|
||||
compilations \
|
||||
$build_dir lte-uesoftmodem \
|
||||
lte-uesoftmodem $dbin/lte-uesoftmodem.$REL
|
||||
fi
|
||||
|
||||
# if --gNB --nrUE are both provided together as build options
|
||||
if [ "$gNB" = "1" -a "$nrUE" = "1" ] ; then
|
||||
echo_info "Compiling nr-uesoftmodem"
|
||||
compilations \
|
||||
$build_dir nr-uesoftmodem \
|
||||
nr-uesoftmodem $dbin/nr-uesoftmodem.$REL
|
||||
fi
|
||||
execlist=""
|
||||
if [ "$eNB" = "1" ] ; then
|
||||
execlist="$execlist lte-softmodem"
|
||||
fi
|
||||
if [ "$gNB" = "1" ] ; then
|
||||
execlist="$execlist nr-softmodem"
|
||||
fi
|
||||
if [ "$UE" = 1 ] ; then
|
||||
execlist="$execlist lte-uesoftmodem"
|
||||
fi
|
||||
if [ "$nrUE" = 1 ] ; then
|
||||
execlist="$execlist nr-uesoftmodem"
|
||||
fi
|
||||
|
||||
for f in $execlist ; do
|
||||
echo_info "Compiling $f..."
|
||||
compilations \
|
||||
$build_dir $f \
|
||||
$f $dbin/$f.$REL
|
||||
done
|
||||
|
||||
|
||||
|
||||
|
||||
# mandatory shared libraries common to UE and (e/g)NB
|
||||
|
||||
@@ -603,10 +632,9 @@ function main() {
|
||||
$build_dir rb_tool \
|
||||
rb_tool $dbin/rb_tool
|
||||
cp $OPENAIR_DIR/cmake_targets/tools/init_nas_nos1 $dbin
|
||||
fi
|
||||
|
||||
|
||||
if [ "$UE" = 1 ] ; then
|
||||
# ue_ip driver compilation
|
||||
|
||||
echo_info "Compiling UE specific part"
|
||||
compilations \
|
||||
$build_dir ue_ip \
|
||||
@@ -645,15 +673,12 @@ function main() {
|
||||
echo_warning "not generated UE NAS files: binaries not found"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
if [ "$SIMUS_PHY" = "1" -o "$SIMUS_CORE" = "1" ] ; then
|
||||
cd $OPENAIR_DIR/cmake_targets/phy_simulators
|
||||
[ "$CLEAN" = "1" ] && rm -rf build
|
||||
mkdir -p build
|
||||
cd build
|
||||
rm -f *sim
|
||||
cd $DIR/$build_dir/build
|
||||
eval $CMAKE_CMD
|
||||
fi
|
||||
|
||||
##################
|
||||
# PHY simulators #
|
||||
@@ -674,7 +699,7 @@ function main() {
|
||||
# lte-simulators $config_libconfig_shlib \
|
||||
# lib$config_libconfig_shlib.so $dbin/lib$config_libconfig_shlib.so
|
||||
fi
|
||||
|
||||
fi
|
||||
###################
|
||||
# Core simulators #
|
||||
###################
|
||||
@@ -781,7 +806,6 @@ function main() {
|
||||
# Build RF device and transport protocol libraries #
|
||||
####################################################
|
||||
if [ "$eNB" = "1" -o "$UE" = "1" -o "$gNB" = "1" -o "$nrUE" = "1" -o "$HWLAT" = "1" ] ; then
|
||||
|
||||
# build RF device libraries
|
||||
if [ "$HW" != "None" ] ; then
|
||||
rm -f liboai_device.so
|
||||
|
||||
@@ -80,14 +80,9 @@
|
||||
#include "UTIL/OTG/otg_extern.h"
|
||||
#endif
|
||||
|
||||
#if defined(ENABLE_ITTI)
|
||||
#if defined(ENABLE_USE_MME)
|
||||
#include "s1ap_eNB.h"
|
||||
#ifdef PDCP_USE_NETLINK
|
||||
#include "SIMULATION/ETH_TRANSPORT/proto.h"
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
#include "s1ap_eNB.h"
|
||||
#include "SIMULATION/ETH_TRANSPORT/proto.h"
|
||||
|
||||
|
||||
#include "T.h"
|
||||
|
||||
|
||||
+4
-8
@@ -104,14 +104,10 @@ static int DEFBFW[] = {0x00007fff};
|
||||
#include "UTIL/OTG/otg_extern.h"
|
||||
#endif
|
||||
|
||||
#if defined(ENABLE_ITTI)
|
||||
#if defined(ENABLE_USE_MME)
|
||||
#include "s1ap_eNB.h"
|
||||
#ifdef PDCP_USE_NETLINK
|
||||
#include "SIMULATION/ETH_TRANSPORT/proto.h"
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
#include "s1ap_eNB.h"
|
||||
#include "SIMULATION/ETH_TRANSPORT/proto.h"
|
||||
|
||||
|
||||
|
||||
#include "T.h"
|
||||
#include "nfapi_interface.h"
|
||||
|
||||
@@ -428,7 +428,7 @@ int create_gNB_tasks(uint32_t gnb_nb) {
|
||||
}
|
||||
|
||||
/*
|
||||
# if defined(ENABLE_USE_MME)
|
||||
if (EPC_MODE_ENABLED) {
|
||||
if (gnb_nb > 0) {
|
||||
if (itti_create_task (TASK_SCTP, sctp_eNB_task, NULL) < 0) {
|
||||
LOG_E(SCTP, "Create task for SCTP failed\n");
|
||||
@@ -452,7 +452,7 @@ int create_gNB_tasks(uint32_t gnb_nb) {
|
||||
}
|
||||
}
|
||||
|
||||
# endif
|
||||
}
|
||||
*/
|
||||
|
||||
if (gnb_nb > 0) {
|
||||
|
||||
+1
-1
@@ -18,7 +18,7 @@
|
||||
* For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
* contact@openairinterface.org
|
||||
*/
|
||||
|
||||
#include "executables/thread-common.h"
|
||||
#include "executables/nr-uesoftmodem.h"
|
||||
|
||||
#include "LAYER2/NR_MAC_UE/mac.h"
|
||||
|
||||
+13
-33
@@ -37,27 +37,19 @@
|
||||
|
||||
#include "common/utils/LOG/log.h"
|
||||
|
||||
#if defined(ENABLE_ITTI)
|
||||
# include "intertask_interface.h"
|
||||
# if defined(ENABLE_USE_MME)
|
||||
# include "s1ap_eNB.h"
|
||||
# include "sctp_eNB_task.h"
|
||||
# include "gtpv1u_eNB_task.h"
|
||||
# endif
|
||||
|
||||
# include "PHY/INIT/phy_init.h"
|
||||
#include "intertask_interface.h"
|
||||
#include "s1ap_eNB.h"
|
||||
#include "sctp_eNB_task.h"
|
||||
#include "gtpv1u_eNB_task.h"
|
||||
#include "PHY/INIT/phy_init.h"
|
||||
|
||||
extern unsigned char NB_gNB_INST;
|
||||
#endif
|
||||
|
||||
|
||||
extern RAN_CONTEXT_t RC;
|
||||
|
||||
#if defined(ENABLE_ITTI)
|
||||
#define GNB_REGISTER_RETRY_DELAY 10
|
||||
|
||||
/*------------------------------------------------------------------------------*/
|
||||
# if defined(ENABLE_USE_MME)
|
||||
# define GNB_REGISTER_RETRY_DELAY 10
|
||||
# endif
|
||||
|
||||
|
||||
/*------------------------------------------------------------------------------*/
|
||||
@@ -82,7 +74,6 @@ static void configure_nr_rrc(uint32_t gnb_id)
|
||||
/*------------------------------------------------------------------------------*/
|
||||
|
||||
/*
|
||||
# if defined(ENABLE_USE_MME)
|
||||
static uint32_t gNB_app_register(uint32_t gnb_id_start, uint32_t gnb_id_end)//, const Enb_properties_array_t *enb_properties)
|
||||
{
|
||||
uint32_t gnb_id;
|
||||
@@ -113,23 +104,15 @@ static uint32_t gNB_app_register(uint32_t gnb_id_start, uint32_t gnb_id_end)//,
|
||||
|
||||
return register_gnb_pending;
|
||||
}
|
||||
# endif
|
||||
*/
|
||||
#endif
|
||||
|
||||
|
||||
/*------------------------------------------------------------------------------*/
|
||||
void *gNB_app_task(void *args_p)
|
||||
{
|
||||
#if defined(ENABLE_ITTI)
|
||||
uint32_t gnb_nb = RC.nb_nr_inst;
|
||||
uint32_t gnb_id_start = 0;
|
||||
uint32_t gnb_id_end = gnb_id_start + gnb_nb;
|
||||
# if defined(ENABLE_USE_MME)
|
||||
//uint32_t register_gnb_pending;
|
||||
//uint32_t registered_gnb;
|
||||
//long gnb_register_retry_timer_id;
|
||||
# endif
|
||||
uint32_t gnb_id;
|
||||
MessageDef *msg_p = NULL;
|
||||
const char *msg_name = NULL;
|
||||
@@ -166,15 +149,15 @@ void *gNB_app_task(void *args_p)
|
||||
configure_nr_rrc(gnb_id);
|
||||
}
|
||||
|
||||
# if defined(ENABLE_USE_MME)
|
||||
if (EPC_MODE_ENABLED) {
|
||||
/* Try to register each gNB */
|
||||
//registered_gnb = 0;
|
||||
//register_gnb_pending = gNB_app_register (gnb_id_start, gnb_id_end);//, gnb_properties_p);
|
||||
# else
|
||||
} else {
|
||||
/* Start L2L1 task */
|
||||
msg_p = itti_alloc_new_message(TASK_GNB_APP, INITIALIZE_MESSAGE);
|
||||
itti_send_msg_to_task(TASK_L2L1, INSTANCE_DEFAULT, msg_p);
|
||||
# endif
|
||||
msg_p = itti_alloc_new_message(TASK_GNB_APP, INITIALIZE_MESSAGE);
|
||||
itti_send_msg_to_task(TASK_L2L1, INSTANCE_DEFAULT, msg_p);
|
||||
}
|
||||
|
||||
do {
|
||||
// Wait for a message
|
||||
@@ -193,7 +176,7 @@ void *gNB_app_task(void *args_p)
|
||||
LOG_I(GNB_APP, "Received %s\n", ITTI_MSG_NAME(msg_p));
|
||||
break;
|
||||
|
||||
# if defined(ENABLE_USE_MME)
|
||||
|
||||
/*
|
||||
case S1AP_REGISTER_ENB_CNF:
|
||||
LOG_I(GNB_APP, "[gNB %d] Received %s: associated MME %d\n", instance, msg_name,
|
||||
@@ -254,7 +237,6 @@ void *gNB_app_task(void *args_p)
|
||||
//}
|
||||
|
||||
break;
|
||||
# endif
|
||||
|
||||
default:
|
||||
LOG_E(GNB_APP, "Received unexpected message %s\n", msg_name);
|
||||
@@ -265,8 +247,6 @@ void *gNB_app_task(void *args_p)
|
||||
AssertFatal (result == EXIT_SUCCESS, "Failed to free memory (%d)!\n", result);
|
||||
} while (1);
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -36,13 +36,9 @@
|
||||
#include "gnb_config.h"
|
||||
#include "UTIL/OTG/otg.h"
|
||||
#include "UTIL/OTG/otg_externs.h"
|
||||
#if defined(ENABLE_ITTI)
|
||||
# include "intertask_interface.h"
|
||||
# if defined(ENABLE_USE_MME)
|
||||
# include "s1ap_eNB.h"
|
||||
# include "sctp_eNB_task.h"
|
||||
# endif
|
||||
#endif
|
||||
#include "intertask_interface.h"
|
||||
#include "s1ap_eNB.h"
|
||||
#include "sctp_eNB_task.h"
|
||||
#include "sctp_default_values.h"
|
||||
// #include "SystemInformationBlockType2.h"
|
||||
// #include "LAYER2/MAC/extern.h"
|
||||
@@ -225,11 +221,10 @@ void RCconfig_nr_flexran()
|
||||
/* gNB ID from configuration, as read in by RCconfig_RRC() */
|
||||
if (!GNBParamList.paramarray[i][GNB_GNB_ID_IDX].uptr) {
|
||||
// Calculate a default gNB ID
|
||||
# if defined(ENABLE_USE_MME)
|
||||
if (EPC_MODE_ENABLED)
|
||||
gnb_id = i + (s1ap_generate_eNB_id () & 0xFFFF8);
|
||||
# else
|
||||
else
|
||||
gnb_id = i;
|
||||
# endif
|
||||
} else {
|
||||
gnb_id = *(GNBParamList.paramarray[i][GNB_GNB_ID_IDX].uptr);
|
||||
}
|
||||
@@ -648,7 +643,7 @@ void RCconfig_NRRRC(MessageDef *msg_p, uint32_t i, gNB_RRC_INST *rrc) {
|
||||
AssertFatal (i<num_gnbs,"Failed to parse config file no %ith element in %s \n",i, GNB_CONFIG_STRING_ACTIVE_GNBS);
|
||||
|
||||
/*
|
||||
#if defined(ENABLE_ITTI) && defined(ENABLE_USE_MME)
|
||||
if (EPC_MODE_ENABLED) {
|
||||
if (strcasecmp( *(GNBSParams[GNB_ASN1_VERBOSITY_IDX].strptr), GNB_CONFIG_STRING_ASN1_VERBOSITY_NONE) == 0) {
|
||||
asn_debug = 0;
|
||||
asn1_xer_print = 0;
|
||||
@@ -662,7 +657,7 @@ void RCconfig_NRRRC(MessageDef *msg_p, uint32_t i, gNB_RRC_INST *rrc) {
|
||||
asn_debug = 0;
|
||||
asn1_xer_print = 0;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
*/
|
||||
|
||||
if (num_gnbs>0) {
|
||||
@@ -671,13 +666,13 @@ void RCconfig_NRRRC(MessageDef *msg_p, uint32_t i, gNB_RRC_INST *rrc) {
|
||||
|
||||
if (GNBParamList.paramarray[i][GNB_GNB_ID_IDX].uptr == NULL) {
|
||||
// Calculate a default gNB ID
|
||||
# if defined(ENABLE_USE_MME)
|
||||
if (EPC_MODE_ENABLED) {
|
||||
uint32_t hash;
|
||||
hash = s1ap_generate_eNB_id ();
|
||||
gnb_id = i + (hash & 0xFFFF8);
|
||||
# else
|
||||
} else {
|
||||
gnb_id = i;
|
||||
# endif
|
||||
}
|
||||
} else {
|
||||
gnb_id = *(GNBParamList.paramarray[i][GNB_GNB_ID_IDX].uptr);
|
||||
}
|
||||
@@ -2739,7 +2734,7 @@ int RCconfig_NR_S1(MessageDef *msg_p, uint32_t i) {
|
||||
config_get( GNBSParams,sizeof(GNBSParams)/sizeof(paramdef_t),NULL);
|
||||
|
||||
/*
|
||||
#if defined(ENABLE_ITTI) && defined(ENABLE_USE_MME)
|
||||
if (EPC_MODE_ENABLED) {
|
||||
if (strcasecmp( *(GNBSParams[GNB_ASN1_VERBOSITY_IDX].strptr), GNB_CONFIG_STRING_ASN1_VERBOSITY_NONE) == 0) {
|
||||
asn_debug = 0;
|
||||
asn1_xer_print = 0;
|
||||
@@ -2753,7 +2748,7 @@ int RCconfig_NR_S1(MessageDef *msg_p, uint32_t i) {
|
||||
asn_debug = 0;
|
||||
asn1_xer_print = 0;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
*/
|
||||
|
||||
AssertFatal (i<GNBSParams[GNB_ACTIVE_GNBS_IDX].numelt,
|
||||
|
||||
@@ -2724,8 +2724,9 @@ int decode_SIB1_MBMS( const protocol_ctxt_t *const ctxt_pP, const uint8_t eNB_in
|
||||
LOG_I(RRC,"Setting SIStatus bit 0 to 1\n");
|
||||
UE_rrc_inst[ctxt_pP->module_id].Info[eNB_index].SIStatus_MBMS = 1;
|
||||
UE_rrc_inst[ctxt_pP->module_id].Info[eNB_index].SIB1systemInfoValueTag_MBMS = sib1_MBMS->systemInfoValueTag_r14;
|
||||
#if defined(ENABLE_ITTI) && defined(ENABLE_USE_MME)
|
||||
|
||||
/*
|
||||
if (EPC_MODE_ENABLED)
|
||||
{
|
||||
int cell_valid = 0;
|
||||
|
||||
@@ -2781,8 +2782,8 @@ int decode_SIB1_MBMS( const protocol_ctxt_t *const ctxt_pP, const uint8_t eNB_in
|
||||
LOG_E(RRC, "Synched with a cell, but PLMN doesn't match our SIM, the message PHY_FIND_NEXT_CELL_REQ is sent but lost in current UE implementation! \n");
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
#endif
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_RRC_UE_DECODE_SIB1, VCD_FUNCTION_OUT );
|
||||
return 0;
|
||||
}
|
||||
@@ -2922,8 +2923,8 @@ int decode_SIB1( const protocol_ctxt_t *const ctxt_pP, const uint8_t eNB_index,
|
||||
LOG_I(RRC,"Setting SIStatus bit 0 to 1\n");
|
||||
UE_rrc_inst[ctxt_pP->module_id].Info[eNB_index].SIStatus = 1;
|
||||
UE_rrc_inst[ctxt_pP->module_id].Info[eNB_index].SIB1systemInfoValueTag = sib1->systemInfoValueTag;
|
||||
#if defined(ENABLE_ITTI) && defined(ENABLE_USE_MME)
|
||||
{
|
||||
|
||||
if (EPC_MODE_ENABLED) {
|
||||
int cell_valid = 0;
|
||||
|
||||
if (sib1->cellAccessRelatedInfo.cellBarred == LTE_SystemInformationBlockType1__cellAccessRelatedInfo__cellBarred_notBarred) {
|
||||
@@ -2982,7 +2983,7 @@ int decode_SIB1( const protocol_ctxt_t *const ctxt_pP, const uint8_t eNB_index,
|
||||
LOG_E(RRC, "Synched with a cell, but PLMN doesn't match our SIM, the message PHY_FIND_NEXT_CELL_REQ is sent but lost in current UE implementation! \n");
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_RRC_UE_DECODE_SIB1, VCD_FUNCTION_OUT );
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -19,24 +19,22 @@
|
||||
* contact@openairinterface.org
|
||||
*/
|
||||
|
||||
#if defined(ENABLE_ITTI)
|
||||
|
||||
# include "intertask_interface.h"
|
||||
# include "create_nr_tasks.h"
|
||||
# include "common/utils/LOG/log.h"
|
||||
|
||||
# ifdef OPENAIR2
|
||||
# if defined(ENABLE_USE_MME)
|
||||
# include "sctp_eNB_task.h"
|
||||
# include "s1ap_eNB.h"
|
||||
# include "nas_ue_task.h"
|
||||
# include "udp_eNB_task.h"
|
||||
# include "gtpv1u_eNB_task.h"
|
||||
# endif
|
||||
#include "sctp_eNB_task.h"
|
||||
#include "s1ap_eNB.h"
|
||||
#include "nas_ue_task.h"
|
||||
#include "udp_eNB_task.h"
|
||||
#include "gtpv1u_eNB_task.h"
|
||||
# if ENABLE_RAL
|
||||
# include "lteRALue.h"
|
||||
# include "lteRALenb.h"
|
||||
# endif
|
||||
# include "RRC/NR/nr_rrc_defs.h"
|
||||
#include "RRC/NR/nr_rrc_defs.h"
|
||||
# endif
|
||||
# include "gnb_app.h"
|
||||
|
||||
@@ -61,7 +59,7 @@ int create_gNB_tasks(uint32_t gnb_nb)
|
||||
}
|
||||
|
||||
/*
|
||||
# if defined(ENABLE_USE_MME)
|
||||
if (EPC_MODE_ENABLED) {
|
||||
if (gnb_nb > 0) {
|
||||
if (itti_create_task (TASK_SCTP, sctp_eNB_task, NULL) < 0) {
|
||||
LOG_E(SCTP, "Create task for SCTP failed\n");
|
||||
@@ -85,7 +83,7 @@ int create_gNB_tasks(uint32_t gnb_nb)
|
||||
}
|
||||
}
|
||||
|
||||
# endif
|
||||
}
|
||||
*/
|
||||
|
||||
if (gnb_nb > 0) {
|
||||
|
||||
Reference in New Issue
Block a user