Commit 6b676d16 authored by Laurent's avatar Laurent

Fix compilation issues

parent 4772f7f6
...@@ -23,6 +23,114 @@ ...@@ -23,6 +23,114 @@
cmake_minimum_required (VERSION 3.0) cmake_minimum_required (VERSION 3.0)
# System packages that are required
# We use either the cmake buildin, in ubuntu are in: /usr/share/cmake*/Modules/
# or cmake provide a generic interface to pkg-config that widely used
###################################
include(FindPkgConfig)
pkg_search_module(LIBXML2 libxml-2.0 REQUIRED)
include_directories(${LIBXML2_INCLUDE_DIRS})
pkg_search_module(LIBXSLT libxslt REQUIRED)
include_directories(${LIBXSLT_INCLUDE_DIRS})
pkg_search_module(OPENSSL openssl REQUIRED)
include_directories(${OPENSSL_INCLUDE_DIRS})
pkg_search_module(CONFIG libconfig REQUIRED)
include_directories(${CONFIG_INCLUDE_DIRS})
pkg_search_module(CRYPTO libcrypto REQUIRED)
include_directories(${CRYPTO_INCLUDE_DIRS})
#use native cmake method as this package is not in pkg-config
if (${RF_BOARD} STREQUAL "OAI_USRP")
find_package(Boost REQUIRED)
include_directories(${LIBBOOST_INCLUDE_DIR})
elseif (${RF_BOARD} STREQUAL "OAI_IRIS")
include_directories("${OPENAIR_TARGETS}/ARCH/IRIS/USERSPACE/LIB/")
include_directories("/usr/local/include/")
set(HW_SOURCE ${HW_SOURCE}
${OPENAIR_TARGETS}/ARCH/IRIS/USERSPACE/LIB/iris_lib.cpp)
LINK_DIRECTORIES("/usr/local/lib")
set(option_HW_lib "-lSoapySDR -rdynamic -ldl")
endif (${RF_BOARD} STREQUAL "OAI_USRP")
pkg_search_module(OPENPGM openpgm-5.1 openpgm-5.2)
if(NOT ${OPENPGM_FOUND})
message("PACKAGE openpgm-5.1 is required by binaries such as oaisim: will fail later if this target is built")
else()
include_directories(${OPENPGM_INCLUDE_DIRS})
endif()
pkg_search_module(NETTLE nettle)
if(NOT ${NETTLE_FOUND})
message( FATAL_ERROR "PACKAGE nettle not found: some targets will fail. Run build_oai -I again!")
else()
include_directories(${NETTLE_INCLUDE_DIRS})
endif()
message ("NETTLE VERSION_INSTALLED = ${NETTLE_VERSION}")
string(REGEX REPLACE "([0-9]+).*" "\\1" NETTLE_VERSION_MAJOR ${NETTLE_VERSION})
string(REGEX REPLACE "[0-9]+\\.([0-9]+).*" "\\1" NETTLE_VERSION_MINOR ${NETTLE_VERSION})
message ("NETTLE_VERSION_MAJOR = ${NETTLE_VERSION_MAJOR}")
message ("NETTLE_VERSION_MINOR = ${NETTLE_VERSION_MINOR}")
if ("${NETTLE_VERSION_MAJOR}" STREQUAL "" OR "${NETTLE_VERSION_MINOR}" STREQUAL "")
message( FATAL_ERROR "The nettle version not detected properly. Try to run build_oai -I again" )
endif()
add_definitions("-DNETTLE_VERSION_MAJOR=${NETTLE_VERSION_MAJOR}")
add_definitions("-DNETTLE_VERSION_MINOR=${NETTLE_VERSION_MINOR}")
pkg_search_module(XPM xpm)
if(NOT ${XPM_FOUND})
message("PACKAGE xpm not found: some targets will fail")
else()
include_directories(${XPM_INCLUDE_DIRS})
endif()
# Atlas is required by some packages, but not found in pkg-config
# So, here are some hacks here. Hope this gets fixed in future!
if(EXISTS "/usr/include/atlas/cblas.h" OR EXISTS "/usr/include/cblas.h")
include_directories("/usr/include/atlas")
LINK_DIRECTORIES("/usr/lib/lapack")
LINK_DIRECTORIES("/usr/lib64")
LINK_DIRECTORIES("/usr/lib64/atlas") #Added because atlas libraries in CentOS 7 are here!
if(EXISTS "/usr/lib64/libblas.so" OR EXISTS "/usr/lib/libblas.so") #Case for CentOS7
list(APPEND ATLAS_LIBRARIES blas)
else() # Case for Ubuntu
list(APPEND ATLAS_LIBRARIES cblas)
endif()
if(EXISTS "/usr/lib/atlas/libtatlas.so" OR EXISTS "/usr/lib64/atlas/libtatlas.so") #Case for CentOS7
list(APPEND ATLAS_LIBRARIES tatlas)
else()
list(APPEND ATLAS_LIBRARIES atlas) #Case for Ubuntu
endif()
list(APPEND ATLAS_LIBRARIES lapack)
# for ubuntu 17.10, directories are different
elseif(EXISTS "/usr/include/x86_64-linux-gnu/cblas.h")
include_directories("/usr/include/x86_64-linux-gnu")
LINK_DIRECTORIES("/usr/lib/x86_64-linux-gnu")
list(APPEND ATLAS_LIBRARIES cblas)
list(APPEND ATLAS_LIBRARIES atlas)
list(APPEND ATLAS_LIBRARIES lapack)
else()
message("No Blas/Atlas libs found, some targets will fail")
endif()
######################################################### #########################################################
# Base directories, compatible with legacy OAI building # # Base directories, compatible with legacy OAI building #
######################################################### #########################################################
...@@ -622,7 +730,7 @@ add_library(X2AP_ENB ...@@ -622,7 +730,7 @@ add_library(X2AP_ENB
${X2AP_DIR}/x2ap_ids.c ${X2AP_DIR}/x2ap_ids.c
${X2AP_DIR}/x2ap_timers.c ${X2AP_DIR}/x2ap_timers.c
) )
add_dependencies(X2AP_ENB rrc_flag x2_flag) add_dependencies(X2AP_ENB X2AP_LIB rrc_flag x2_flag)
# F1AP # F1AP
...@@ -2424,114 +2532,6 @@ include_directories("${NFAPI_DIR}/nfapi/inc") ...@@ -2424,114 +2532,6 @@ include_directories("${NFAPI_DIR}/nfapi/inc")
include_directories("${NFAPI_DIR}/sim_common/inc") include_directories("${NFAPI_DIR}/sim_common/inc")
include_directories("${NFAPI_DIR}/pnf_sim/inc") include_directories("${NFAPI_DIR}/pnf_sim/inc")
# System packages that are required
# We use either the cmake buildin, in ubuntu are in: /usr/share/cmake*/Modules/
# or cmake provide a generic interface to pkg-config that widely used
###################################
include(FindPkgConfig)
pkg_search_module(LIBXML2 libxml-2.0 REQUIRED)
include_directories(${LIBXML2_INCLUDE_DIRS})
pkg_search_module(LIBXSLT libxslt REQUIRED)
include_directories(${LIBXSLT_INCLUDE_DIRS})
pkg_search_module(OPENSSL openssl REQUIRED)
include_directories(${OPENSSL_INCLUDE_DIRS})
pkg_search_module(CONFIG libconfig REQUIRED)
include_directories(${CONFIG_INCLUDE_DIRS})
pkg_search_module(CRYPTO libcrypto REQUIRED)
include_directories(${CRYPTO_INCLUDE_DIRS})
#use native cmake method as this package is not in pkg-config
if (${RF_BOARD} STREQUAL "OAI_USRP")
find_package(Boost REQUIRED)
include_directories(${LIBBOOST_INCLUDE_DIR})
elseif (${RF_BOARD} STREQUAL "OAI_IRIS")
include_directories("${OPENAIR_TARGETS}/ARCH/IRIS/USERSPACE/LIB/")
include_directories("/usr/local/include/")
set(HW_SOURCE ${HW_SOURCE}
${OPENAIR_TARGETS}/ARCH/IRIS/USERSPACE/LIB/iris_lib.cpp)
LINK_DIRECTORIES("/usr/local/lib")
set(option_HW_lib "-lSoapySDR -rdynamic -ldl")
endif (${RF_BOARD} STREQUAL "OAI_USRP")
pkg_search_module(OPENPGM openpgm-5.1 openpgm-5.2)
if(NOT ${OPENPGM_FOUND})
message("PACKAGE openpgm-5.1 is required by binaries such as oaisim: will fail later if this target is built")
else()
include_directories(${OPENPGM_INCLUDE_DIRS})
endif()
pkg_search_module(NETTLE nettle)
if(NOT ${NETTLE_FOUND})
message( FATAL_ERROR "PACKAGE nettle not found: some targets will fail. Run build_oai -I again!")
else()
include_directories(${NETTLE_INCLUDE_DIRS})
endif()
message ("NETTLE VERSION_INSTALLED = ${NETTLE_VERSION}")
string(REGEX REPLACE "([0-9]+).*" "\\1" NETTLE_VERSION_MAJOR ${NETTLE_VERSION})
string(REGEX REPLACE "[0-9]+\\.([0-9]+).*" "\\1" NETTLE_VERSION_MINOR ${NETTLE_VERSION})
message ("NETTLE_VERSION_MAJOR = ${NETTLE_VERSION_MAJOR}")
message ("NETTLE_VERSION_MINOR = ${NETTLE_VERSION_MINOR}")
if ("${NETTLE_VERSION_MAJOR}" STREQUAL "" OR "${NETTLE_VERSION_MINOR}" STREQUAL "")
message( FATAL_ERROR "The nettle version not detected properly. Try to run build_oai -I again" )
endif()
add_definitions("-DNETTLE_VERSION_MAJOR=${NETTLE_VERSION_MAJOR}")
add_definitions("-DNETTLE_VERSION_MINOR=${NETTLE_VERSION_MINOR}")
pkg_search_module(XPM xpm)
if(NOT ${XPM_FOUND})
message("PACKAGE xpm not found: some targets will fail")
else()
include_directories(${XPM_INCLUDE_DIRS})
endif()
# Atlas is required by some packages, but not found in pkg-config
# So, here are some hacks here. Hope this gets fixed in future!
if(EXISTS "/usr/include/atlas/cblas.h" OR EXISTS "/usr/include/cblas.h")
include_directories("/usr/include/atlas")
LINK_DIRECTORIES("/usr/lib/lapack")
LINK_DIRECTORIES("/usr/lib64")
LINK_DIRECTORIES("/usr/lib64/atlas") #Added because atlas libraries in CentOS 7 are here!
if(EXISTS "/usr/lib64/libblas.so" OR EXISTS "/usr/lib/libblas.so") #Case for CentOS7
list(APPEND ATLAS_LIBRARIES blas)
else() # Case for Ubuntu
list(APPEND ATLAS_LIBRARIES cblas)
endif()
if(EXISTS "/usr/lib/atlas/libtatlas.so" OR EXISTS "/usr/lib64/atlas/libtatlas.so") #Case for CentOS7
list(APPEND ATLAS_LIBRARIES tatlas)
else()
list(APPEND ATLAS_LIBRARIES atlas) #Case for Ubuntu
endif()
list(APPEND ATLAS_LIBRARIES lapack)
# for ubuntu 17.10, directories are different
elseif(EXISTS "/usr/include/x86_64-linux-gnu/cblas.h")
include_directories("/usr/include/x86_64-linux-gnu")
LINK_DIRECTORIES("/usr/lib/x86_64-linux-gnu")
list(APPEND ATLAS_LIBRARIES cblas)
list(APPEND ATLAS_LIBRARIES atlas)
list(APPEND ATLAS_LIBRARIES lapack)
else()
message("No Blas/Atlas libs found, some targets will fail")
endif()
list(APPEND ATLAS_LIBRARIES lapack lapacke) list(APPEND ATLAS_LIBRARIES lapack lapacke)
include_directories ("/usr/include/X11") include_directories ("/usr/include/X11")
...@@ -2641,7 +2641,7 @@ target_link_libraries (measurement_display minimal_lib) ...@@ -2641,7 +2641,7 @@ target_link_libraries (measurement_display minimal_lib)
add_executable(test5Gnas add_executable(test5Gnas
${OPENAIR_DIR}/openair3/TEST/test5Gnas.c ${OPENAIR_DIR}/openair3/TEST/test5Gnas.c
) )
target_link_libraries (test5Gnas ${NETTLE_LIBRARIES} LIB_5GNAS_GNB CONFIG_LIB minimal_lib ) target_link_libraries (test5Gnas LIB_5GNAS_GNB CONFIG_LIB minimal_lib )
# lte-softmodem is both eNB and UE implementation # lte-softmodem is both eNB and UE implementation
...@@ -2685,7 +2685,7 @@ target_link_libraries (lte-softmodem ...@@ -2685,7 +2685,7 @@ target_link_libraries (lte-softmodem
-Wl,--end-group z dl) -Wl,--end-group z dl)
target_link_libraries (lte-softmodem ${LIBXML2_LIBRARIES}) target_link_libraries (lte-softmodem ${LIBXML2_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 pthread m ${CONFIG_LIB} rt crypt ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} sctp ${PROTOBUF_LIB} ${CMAKE_DL_LIBS} ${LIBYAML_LIBRARIES})
target_link_libraries (lte-softmodem ${LIB_LMS_LIBRARIES}) target_link_libraries (lte-softmodem ${LIB_LMS_LIBRARIES})
target_link_libraries (lte-softmodem ${T_LIB}) target_link_libraries (lte-softmodem ${T_LIB})
...@@ -2724,7 +2724,7 @@ target_link_libraries (ocp-enb ...@@ -2724,7 +2724,7 @@ target_link_libraries (ocp-enb
PHY_COMMON PHY PHY_RU LFDS L2 L2_LTE NFAPI_COMMON_LIB NFAPI_LIB NFAPI_VNF_LIB NFAPI_PNF_LIB NFAPI_USER_LIB LFDS7 SIMU_COMMON PHY_COMMON PHY PHY_RU LFDS L2 L2_LTE NFAPI_COMMON_LIB NFAPI_LIB NFAPI_VNF_LIB NFAPI_PNF_LIB NFAPI_USER_LIB LFDS7 SIMU_COMMON
${MSC_LIB} ${RAL_LIB} ${NAS_UE_LIB} ${ITTI_LIB} ${FLPT_MSG_LIB} ${ASYNC_IF_LIB} ${FLEXRAN_AGENT_LIB} ${FSPT_MSG_LIB} ${PROTO_AGENT_LIB} ${MSC_LIB} ${RAL_LIB} ${NAS_UE_LIB} ${ITTI_LIB} ${FLPT_MSG_LIB} ${ASYNC_IF_LIB} ${FLEXRAN_AGENT_LIB} ${FSPT_MSG_LIB} ${PROTO_AGENT_LIB}
-Wl,--end-group z dl) -Wl,--end-group z dl)
target_link_libraries (ocp-enb ${NETTLE_LIBRARIES} ${LIBXML2_LIBRARIES} pthread m ${CONFIG_LIBRARIES} rt crypt ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} sctp ${PROTOBUF_LIB} ${CMAKE_DL_LIBS} ${LIBYAML_LIBRARIES} ${LIB_LMS_LIBRARIES} ${T_LIB}) target_link_libraries (ocp-enb ${LIBXML2_LIBRARIES} pthread m ${CONFIG_LIBRARIES} rt crypt ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} sctp ${PROTOBUF_LIB} ${CMAKE_DL_LIBS} ${LIBYAML_LIBRARIES} ${LIB_LMS_LIBRARIES} ${T_LIB})
add_executable(cu_test add_executable(cu_test
${OPENAIR2_DIR}/LAYER2/PROTO_AGENT/cu_test.c ${OPENAIR2_DIR}/LAYER2/PROTO_AGENT/cu_test.c
...@@ -2796,7 +2796,7 @@ target_link_libraries (lte-uesoftmodem ...@@ -2796,7 +2796,7 @@ target_link_libraries (lte-uesoftmodem
-Wl,--end-group z dl) -Wl,--end-group z dl)
target_link_libraries (lte-uesoftmodem ${LIBXML2_LIBRARIES}) target_link_libraries (lte-uesoftmodem ${LIBXML2_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 pthread m ${CONFIG_LIB} rt crypt ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} sctp ${PROTOBUF_LIB} ${CMAKE_DL_LIBS} ${LIBYAML_LIBRARIES} ${ATLAS_LIBRARIES})
target_link_libraries (lte-uesoftmodem ${LIB_LMS_LIBRARIES}) target_link_libraries (lte-uesoftmodem ${LIB_LMS_LIBRARIES})
target_link_libraries (lte-uesoftmodem ${T_LIB}) target_link_libraries (lte-uesoftmodem ${T_LIB})
...@@ -2838,7 +2838,7 @@ target_link_libraries (nr-softmodem ...@@ -2838,7 +2838,7 @@ target_link_libraries (nr-softmodem
-Wl,--end-group z dl) -Wl,--end-group z dl)
target_link_libraries (nr-softmodem ${LIBXML2_LIBRARIES}) target_link_libraries (nr-softmodem ${LIBXML2_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 pthread m ${CONFIG_LIB} rt crypt ${CRYPTO_LIBRARIES} ${OPENSSL_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 ${LIB_LMS_LIBRARIES})
target_link_libraries (nr-softmodem ${T_LIB}) target_link_libraries (nr-softmodem ${T_LIB})
...@@ -2877,7 +2877,7 @@ target_link_libraries (ocp-gnb ...@@ -2877,7 +2877,7 @@ target_link_libraries (ocp-gnb
X2AP_LIB X2AP_ENB F1AP_LIB F1AP M2AP_LIB M2AP_ENB M3AP_LIB M3AP_ENB SIMU_COMMON X2AP_LIB X2AP_ENB F1AP_LIB F1AP M2AP_LIB M2AP_ENB M3AP_LIB M3AP_ENB SIMU_COMMON
-Wl,--end-group z dl) -Wl,--end-group z dl)
target_link_libraries (ocp-gnb ${LIBXML2_LIBRARIES} ${NETTLE_LIBRARIES}) target_link_libraries (ocp-gnb ${LIBXML2_LIBRARIES} )
target_link_libraries (ocp-gnb pthread m ${CONFIG_LIB} rt crypt ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} sctp ${XFORMS_LIBRARIES} ${PROTOBUF_LIB} ${CMAKE_DL_LIBS} ${LIBYAML_LIBRARIES} ${ATLAS_LIBRARIES}) target_link_libraries (ocp-gnb pthread m ${CONFIG_LIB} rt crypt ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} sctp ${XFORMS_LIBRARIES} ${PROTOBUF_LIB} ${CMAKE_DL_LIBS} ${LIBYAML_LIBRARIES} ${ATLAS_LIBRARIES})
target_link_libraries (ocp-gnb ${LIB_LMS_LIBRARIES}) target_link_libraries (ocp-gnb ${LIB_LMS_LIBRARIES})
target_link_libraries (ocp-gnb ${T_LIB}) target_link_libraries (ocp-gnb ${T_LIB})
...@@ -2922,7 +2922,7 @@ target_link_libraries (nr-uesoftmodem ...@@ -2922,7 +2922,7 @@ target_link_libraries (nr-uesoftmodem
-Wl,--end-group z dl) -Wl,--end-group z dl)
target_link_libraries (nr-uesoftmodem ${LIBXML2_LIBRARIES}) target_link_libraries (nr-uesoftmodem ${LIBXML2_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 pthread m ${CONFIG_LIB} rt crypt ${CRYPTO_LIBRARIES} ${OPENSSL_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 ${LIB_LMS_LIBRARIES})
target_link_libraries (nr-uesoftmodem ${T_LIB}) target_link_libraries (nr-uesoftmodem ${T_LIB})
...@@ -3089,7 +3089,7 @@ add_executable(nr_dlsim ...@@ -3089,7 +3089,7 @@ add_executable(nr_dlsim
${SHLIB_LOADER_SOURCES} ${SHLIB_LOADER_SOURCES}
) )
target_link_libraries(nr_dlsim target_link_libraries(nr_dlsim
-Wl,--start-group UTIL SIMU_COMMON SIMU PHY_COMMON PHY_NR_COMMON PHY_NR PHY_NR_UE SCHED_NR_LIB SCHED_NR_UE_LIB MAC_NR MAC_UE_NR MAC_NR_COMMON RRC_LIB NR_RRC_LIB CONFIG_LIB L2_NR HASHTABLE -Wl,--end-group -Wl,--start-group UTIL SIMU_COMMON SIMU PHY_COMMON PHY_NR_COMMON PHY_NR PHY_NR_UE SCHED_NR_LIB SCHED_NR_UE_LIB MAC_NR MAC_UE_NR MAC_NR_COMMON RRC_LIB NR_RRC_LIB CONFIG_LIB L2_LTE_NR L2_NR HASHTABLE X2AP_ENB X2AP_LIB SECU_CN -Wl,--end-group
m pthread ${ATLAS_LIBRARIES} ${T_LIB} ${ITTI_LIB} dl m pthread ${ATLAS_LIBRARIES} ${T_LIB} ${ITTI_LIB} dl
) )
target_compile_definitions(nr_dlsim PUBLIC -DPHYSICAL_SIMULATOR) target_compile_definitions(nr_dlsim PUBLIC -DPHYSICAL_SIMULATOR)
...@@ -3107,7 +3107,8 @@ add_executable(nr_prachsim ...@@ -3107,7 +3107,8 @@ add_executable(nr_prachsim
${T_SOURCE} ${T_SOURCE}
${SHLIB_LOADER_SOURCES}) ${SHLIB_LOADER_SOURCES})
target_link_libraries(nr_prachsim target_link_libraries(nr_prachsim
-Wl,--start-group UTIL SIMU_COMMON SIMU PHY_COMMON PHY_NR_COMMON PHY_NR PHY_RU PHY_NR_UE MAC_NR_COMMON SCHED_NR_LIB MAC_UE_NR SCHED_NR_UE_LIB RRC_LIB NR_RRC_LIB L2_NR CONFIG_LIB HASHTABLE -Wl,--end-group m pthread ${ATLAS_LIBRARIES} ${T_LIB} ${ITTI_LIB} dl) -Wl,--start-group UTIL SIMU_COMMON SIMU PHY_COMMON PHY_NR_COMMON PHY_NR PHY_RU PHY_NR_UE MAC_NR_COMMON SCHED_NR_LIB SCHED_NR_UE_LIB MAC_NR MAC_UE_NR MAC_NR_COMMON RRC_LIB NR_RRC_LIB CONFIG_LIB L2_LTE_NR L2_NR HASHTABLE X2AP_ENB X2AP_LIB SECU_CN -Wl,--end-group
m pthread ${ATLAS_LIBRARIES} ${T_LIB} ${ITTI_LIB} dl)
add_executable(nr_ulschsim add_executable(nr_ulschsim
${OPENAIR1_DIR}/SIMULATION/NR_PHY/ulschsim.c ${OPENAIR1_DIR}/SIMULATION/NR_PHY/ulschsim.c
...@@ -3137,7 +3138,7 @@ add_executable(nr_ulsim ...@@ -3137,7 +3138,7 @@ add_executable(nr_ulsim
${SHLIB_LOADER_SOURCES} ${SHLIB_LOADER_SOURCES}
) )
target_link_libraries(nr_ulsim target_link_libraries(nr_ulsim
-Wl,--start-group UTIL SIMU_COMMON SIMU PHY_COMMON PHY_NR PHY_NR_COMMON PHY_NR_UE SCHED_NR_LIB SCHED_NR_UE_LIB MAC_NR MAC_UE_NR MAC_NR_COMMON RRC_LIB NR_RRC_LIB CONFIG_LIB L2_NR HASHTABLE -Wl,--end-group -Wl,--start-group UTIL SIMU_COMMON SIMU PHY_COMMON PHY_NR_COMMON PHY_NR PHY_NR_UE SCHED_NR_LIB SCHED_NR_UE_LIB MAC_NR MAC_UE_NR MAC_NR_COMMON RRC_LIB NR_RRC_LIB CONFIG_LIB L2_LTE_NR L2_NR HASHTABLE X2AP_ENB X2AP_LIB SECU_CN -Wl,--end-group
m pthread ${ATLAS_LIBRARIES} ${T_LIB} ${ITTI_LIB} dl m pthread ${ATLAS_LIBRARIES} ${T_LIB} ${ITTI_LIB} dl
) )
target_compile_definitions(nr_ulsim PUBLIC -DPHYSICAL_SIMULATOR) target_compile_definitions(nr_ulsim PUBLIC -DPHYSICAL_SIMULATOR)
...@@ -3172,7 +3173,7 @@ add_executable(test_epc_generate_scenario ...@@ -3172,7 +3173,7 @@ add_executable(test_epc_generate_scenario
${OPENAIR3_DIR}/S1AP/s1ap_eNB_defs.h ${OPENAIR3_DIR}/S1AP/s1ap_eNB_defs.h
) )
target_link_libraries (test_epc_generate_scenario 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_LIB} -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} ${CONFIG_LIB}
) )
add_executable(test_epc_play_scenario add_executable(test_epc_play_scenario
...@@ -3191,7 +3192,7 @@ add_executable(test_epc_play_scenario ...@@ -3191,7 +3192,7 @@ add_executable(test_epc_play_scenario
) )
target_include_directories(test_epc_play_scenario PUBLIC /usr/local/share/asn1c) target_include_directories(test_epc_play_scenario PUBLIC /usr/local/share/asn1c)
target_link_libraries (test_epc_play_scenario 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_NR_COMMON 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} -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_NR_COMMON 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} ${CONFIG_LIB}
) )
...@@ -3211,7 +3212,7 @@ foreach(myExe s1ap ...@@ -3211,7 +3212,7 @@ foreach(myExe s1ap
${OPENAIR3_DIR}/TEST/test_${myExe}.c ${OPENAIR3_DIR}/TEST/test_${myExe}.c
) )
target_link_libraries (test_${myExe} 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_LIB} -Wl,--start-group SECU_CN UTIL LFDS -Wl,--end-group m rt crypt ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} ${CONFIG_LIB}
) )
endforeach(myExe) endforeach(myExe)
......
...@@ -66,8 +66,9 @@ ...@@ -66,8 +66,9 @@
#define inMicroS(a) (((double)(a))/(cpu_freq_GHz*1000.0)) #define inMicroS(a) (((double)(a))/(cpu_freq_GHz*1000.0))
#include "SIMULATION/LTE_PHY/common_sim.h" #include "SIMULATION/LTE_PHY/common_sim.h"
#include <openair2/LAYER2/MAC/mac_vars.h>
#include <openair2/RRC/LTE/rrc_vars.h>
unsigned char NB_eNB_INST=0;
LCHAN_DESC DCCH_LCHAN_DESC,DTCH_DL_LCHAN_DESC,DTCH_UL_LCHAN_DESC; LCHAN_DESC DCCH_LCHAN_DESC,DTCH_DL_LCHAN_DESC,DTCH_UL_LCHAN_DESC;
rlc_info_t Rlc_info_um,Rlc_info_am_config; rlc_info_t Rlc_info_um,Rlc_info_am_config;
...@@ -81,7 +82,6 @@ double cpuf; ...@@ -81,7 +82,6 @@ double cpuf;
int sf_ahead=4 ; int sf_ahead=4 ;
int sl_ahead=0; int sl_ahead=0;
uint8_t nfapi_mode = 0; uint8_t nfapi_mode = 0;
uint16_t NB_UE_INST = 1;
uint64_t downlink_frequency[MAX_NUM_CCs][4]; uint64_t downlink_frequency[MAX_NUM_CCs][4];
// dummy functions // dummy functions
...@@ -188,6 +188,7 @@ int main(int argc, char **argv) ...@@ -188,6 +188,7 @@ int main(int argc, char **argv)
SCM_t channel_model=AWGN;//Rayleigh1_anticorr; SCM_t channel_model=AWGN;//Rayleigh1_anticorr;
NB_UE_INST = 1;
//double pbch_sinr; //double pbch_sinr;
//int pbch_tx_ant; //int pbch_tx_ant;
int N_RB_DL=106,mu=1; int N_RB_DL=106,mu=1;
......
...@@ -45,11 +45,13 @@ ...@@ -45,11 +45,13 @@
#include "PHY/NR_UE_TRANSPORT/nr_transport_proto_ue.h" #include "PHY/NR_UE_TRANSPORT/nr_transport_proto_ue.h"
#include "nr_unitary_defs.h" #include "nr_unitary_defs.h"
#include "OCG_vars.h" #include "OCG_vars.h"
#include <openair2/LAYER2/MAC/mac_vars.h>
#include <openair2/RRC/LTE/rrc_vars.h>
#define NR_PRACH_DEBUG 1 #define NR_PRACH_DEBUG 1
#define PRACH_WRITE_OUTPUT_DEBUG 1 #define PRACH_WRITE_OUTPUT_DEBUG 1
unsigned char NB_eNB_INST=0;
LCHAN_DESC DCCH_LCHAN_DESC,DTCH_DL_LCHAN_DESC,DTCH_UL_LCHAN_DESC; LCHAN_DESC DCCH_LCHAN_DESC,DTCH_DL_LCHAN_DESC,DTCH_UL_LCHAN_DESC;
rlc_info_t Rlc_info_um,Rlc_info_am_config; rlc_info_t Rlc_info_um,Rlc_info_am_config;
...@@ -59,7 +61,6 @@ RAN_CONTEXT_t RC; ...@@ -59,7 +61,6 @@ RAN_CONTEXT_t RC;
RU_t *ru; RU_t *ru;
double cpuf; double cpuf;
extern uint16_t prach_root_sequence_map0_3[838]; extern uint16_t prach_root_sequence_map0_3[838];
uint16_t NB_UE_INST=1;
openair0_config_t openair0_cfg[MAX_CARDS]; openair0_config_t openair0_cfg[MAX_CARDS];
uint8_t nfapi_mode=0; uint8_t nfapi_mode=0;
int sl_ahead = 0; int sl_ahead = 0;
...@@ -114,6 +115,7 @@ int main(int argc, char **argv){ ...@@ -114,6 +115,7 @@ int main(int argc, char **argv){
uint32_t tx_lev = 10000, prach_errors = 0, samp_count; //,tx_lev_dB; uint32_t tx_lev = 10000, prach_errors = 0, samp_count; //,tx_lev_dB;
uint64_t SSB_positions = 0x01, absoluteFrequencyPointA = 640000; uint64_t SSB_positions = 0x01, absoluteFrequencyPointA = 640000;
double DS_TDL = .03; double DS_TDL = .03;
NB_UE_INST=1;
// int8_t interf1=-19,interf2=-19; // int8_t interf1=-19,interf2=-19;
// uint8_t abstraction_flag=0,calibration_flag=0; // uint8_t abstraction_flag=0,calibration_flag=0;
......
...@@ -58,9 +58,11 @@ ...@@ -58,9 +58,11 @@
#define inMicroS(a) (((double)(a))/(cpu_freq_GHz*1000.0)) #define inMicroS(a) (((double)(a))/(cpu_freq_GHz*1000.0))
#include "SIMULATION/LTE_PHY/common_sim.h" #include "SIMULATION/LTE_PHY/common_sim.h"
#include <openair2/LAYER2/MAC/mac_vars.h>
#include <openair2/RRC/LTE/rrc_vars.h>
//#define DEBUG_ULSIM //#define DEBUG_ULSIM
unsigned char NB_eNB_INST=0;
LCHAN_DESC DCCH_LCHAN_DESC,DTCH_DL_LCHAN_DESC,DTCH_UL_LCHAN_DESC; LCHAN_DESC DCCH_LCHAN_DESC,DTCH_DL_LCHAN_DESC,DTCH_UL_LCHAN_DESC;
rlc_info_t Rlc_info_um,Rlc_info_am_config; rlc_info_t Rlc_info_um,Rlc_info_am_config;
...@@ -73,7 +75,6 @@ int sf_ahead=4 ; ...@@ -73,7 +75,6 @@ int sf_ahead=4 ;
int sl_ahead=0; int sl_ahead=0;
double cpuf; double cpuf;
uint8_t nfapi_mode = 0; uint8_t nfapi_mode = 0;
uint16_t NB_UE_INST = 1;
uint64_t downlink_frequency[MAX_NUM_CCs][4]; uint64_t downlink_frequency[MAX_NUM_CCs][4];
...@@ -156,6 +157,7 @@ int main(int argc, char **argv) ...@@ -156,6 +157,7 @@ int main(int argc, char **argv)
uint16_t N_RB_DL = 106, N_RB_UL = 106, mu = 1; uint16_t N_RB_DL = 106, N_RB_UL = 106, mu = 1;
double tx_gain=1.0; double tx_gain=1.0;
double N0=30; double N0=30;
NB_UE_INST = 1;
//unsigned char frame_type = 0; //unsigned char frame_type = 0;
NR_DL_FRAME_PARMS *frame_parms; NR_DL_FRAME_PARMS *frame_parms;
......
...@@ -56,6 +56,8 @@ ...@@ -56,6 +56,8 @@
#include "flexran.pb-c.h" #include "flexran.pb-c.h"
#include "flexran_agent_mac.h" #include "flexran_agent_mac.h"
#include <dlfcn.h> #include <dlfcn.h>
#include <openair2/LAYER2/MAC/mac.h>
#include "T.h" #include "T.h"
......
...@@ -143,7 +143,7 @@ void (*rlc_rrc_data_conf)( ...@@ -143,7 +143,7 @@ void (*rlc_rrc_data_conf)(
const protocol_ctxt_t *const ctxtP, const protocol_ctxt_t *const ctxtP,
const rb_id_t rb_idP, const rb_id_t rb_idP,
const mui_t muiP, const mui_t muiP,
const rlc_tx_status_t statusP); const rlc_tx_status_t statusP) __attribute__ ((aligned(32)));
typedef void (rrc_data_ind_cb_t)( typedef void (rrc_data_ind_cb_t)(
const protocol_ctxt_t *const ctxtP, const protocol_ctxt_t *const ctxtP,
......
...@@ -82,6 +82,7 @@ ...@@ -82,6 +82,7 @@
#include "executables/softmodem-common.h" #include "executables/softmodem-common.h"
#include <openair2/RRC/NR/rrc_gNB_UE_context.h> #include <openair2/RRC/NR/rrc_gNB_UE_context.h>
#include <openair2/X2AP/x2ap_eNB.h>
//#define XER_PRINT //#define XER_PRINT
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment