Commit 0b58a7e8 authored by Florian Kaltenberger's avatar Florian Kaltenberger

Merge branch 'develop' into hotfix-81-oaisim

Conflicts:
	cmake_targets/build_oai
	openair1/PHY/LTE_TRANSPORT/initial_sync.c
	openair1/SCHED/phy_procedures_lte_ue.c
parents 38159dfc 3fa926e4
......@@ -36,12 +36,16 @@ set (OPENAIR1_DIR ${OPENAIR_DIR}/openair1)
set (OPENAIR2_DIR ${OPENAIR_DIR}/openair2)
set (OPENAIR3_DIR ${OPENAIR_DIR}/openair3)
set (OPENAIR_TARGETS ${OPENAIR_DIR}/targets)
set (OPENAIR3_DIR ${OPENAIR_DIR}/openair3)
set (OPENAIR3_DIR ${OPENAIR_DIR}/openair3)
set (OPENAIR_CMAKE ${OPENAIR_DIR}/cmake_targets)
set (OPENAIR_BIN_DIR ${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY})
project (OpenAirInterface)
add_subdirectory(${OPENAIR_TARGETS}/ARCH/LMSSDR/USERSPACE/LIB/lms7002m lms7002m)
add_subdirectory(${OPENAIR_TARGETS}/ARCH/LMSSDR/USERSPACE/LIB/lmsSDR lmsSDR)
add_subdirectory(${OPENAIR_TARGETS}/ARCH/LMSSDR/USERSPACE/LIB/Si5351C Si5351C)
###########################################
# macros to define options as there is numerous options in oai
################################################
......@@ -159,14 +163,20 @@ set(CMAKE_C_FLAGS
"${CMAKE_C_FLAGS} -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"
)
set(CMAKE_CXX_FLAGS
"${CMAKE_CXX_FLAGS} ${C_FLAGS_PROCESSOR}"
"${CMAKE_CXX_FLAGS} ${C_FLAGS_PROCESSOR} -std=c++11 "
)
#########################
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-rpath -Wl,${OPENAIR_TARGETS}/bin")
#########################
# set a flag for changes in the source code
# these changes are related to hardcoded path to include .h files
add_definitions(-DCMAKER)
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS} -g -DMALLOC_CHECK_=3")
set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS} -g -DMALLOC_CHECK_=3 -O2")
Message("RF_BOARD is ${RF_BOARD}")
# Below has been put in comment because does not work with
# SVN authentication.
#
......@@ -244,6 +254,9 @@ endif (${RTAI})
set(asn1c_call "${OPENAIR_CMAKE}/tools/generate_asn1")
set(asn1_generated_dir ${OPENAIR_BIN_DIR})
set(protoc_call "${OPENAIR_CMAKE}/tools/generate_protobuf")
set(protobuf_generated_dir ${OPENAIR_BIN_DIR})
# RRC
######
add_list2_option(RRC_ASN1_VERSION "Rel10" "ASN.1 version of RRC interface" "Rel8" "Rel10" "CBA")
......@@ -404,8 +417,55 @@ add_list1_option(NB_ANTENNAS_RX "2" "Number of antennas in reception" "1" "2" "4
add_list1_option(NB_ANTENNAS_TX "2" "Number of antennas in transmission" "1" "2" "4")
add_list1_option(NB_ANTENNAS_TXRX "2" "Number of antennas in ????" "1" "2" "4")
add_list2_option(RF_BOARD "EXMIMO" "RF head type" "False" "EXMIMO" "OAI_USRP" "ETHERNET" "OAI_BLADERF" "CPRIGW")
add_list2_option(RF_BOARD "EXMIMO" "RF head type" "None" "EXMIMO" "OAI_USRP" "OAI_BLADERF" "CPRIGW" "OAI_LMSSDR")
add_list2_option(TRANSP_PRO "None" "Transport protocol type" "None" "ETHERNET")
# include RF devices / transport protocols library modules
######################################################################
include_directories("${OPENAIR_TARGETS}/ARCH/EXMIMO/USERSPACE/LIB/")
include_directories ("${OPENAIR_TARGETS}/ARCH/EXMIMO/DEFS/")
#set (option_HWEXMIMOLIB_lib "-l ")
set(HWLIB_EXMIMO_SOURCE
${OPENAIR_TARGETS}/ARCH/EXMIMO/USERSPACE/LIB/openair0_lib.c
${OPENAIR_TARGETS}/ARCH/EXMIMO/USERSPACE/LIB/gain_control.c
)
add_library(oai_exmimodevif MODULE ${HWLIB_EXMIMO_SOURCE} )
include_directories("${OPENAIR_TARGETS}/ARCH/USRP/USERSPACE/LIB/")
set (option_HWUSRPLIB_lib "-l uhd")
set(HWLIB_USRP_SOURCE
${OPENAIR_TARGETS}/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp
)
add_library(oai_usrpdevif MODULE ${HWLIB_USRP_SOURCE} )
include_directories("${OPENAIR_TARGETS}/ARCH/BLADERF/USERSPACE/LIB/")
set (option_HWBLADERFLIB_lib "-l bladerf")
set(HWLIB_BLADERF_SOURCE
${OPENAIR_TARGETS}/ARCH/BLADERF/USERSPACE/LIB/bladerf_lib.c
)
add_library(oai_bladerfdevif MODULE ${HWLIB_BLADERF_SOURCE} )
include_directories("${OPENAIR_TARGETS}/ARCH/LMSSDR/USERSPACE/LIB/")
set (option_HWLMSSDRLIB_lib "-l LMS_SDR -l LMS7002M -l Si5351C")
set(HWLIB_LMSSDR_SOURCE
${OPENAIR_TARGETS}/ARCH/LMSSDR/USERSPACE/LIB/lms_lib.cpp
)
add_library(oai_lmssdrdevif MODULE ${HWLIB_LMSSDR_SOURCE} )
include_directories("${OPENAIR_TARGETS}/ARCH/ETHERNET/USERSPACE/LIB/")
set(TPLIB_ETHERNET_SOURCE
${OPENAIR_TARGETS}/ARCH/ETHERNET/USERSPACE/LIB/ethernet_lib.c
${OPENAIR_TARGETS}/ARCH/ETHERNET/USERSPACE/LIB/eth_udp.c
${OPENAIR_TARGETS}/ARCH/ETHERNET/USERSPACE/LIB/eth_raw.c
)
add_library(oai_eth_transpro MODULE ${TPLIB_ETHERNET_SOURCE} )
# RF devices / transport protocols settings
######################################################################
if (${RF_BOARD} STREQUAL "EXMIMO")
set(DRIVER2013)
include_directories ("${OPENAIR_TARGETS}/ARCH/EXMIMO/USERSPACE/LIB/")
......@@ -413,6 +473,7 @@ if (${RF_BOARD} STREQUAL "EXMIMO")
set(HW_SOURCE ${HW_SOURCE}
${OPENAIR_TARGETS}/ARCH/EXMIMO/USERSPACE/LIB/openair0_lib.c
${OPENAIR_TARGETS}/ARCH/EXMIMO/USERSPACE/LIB/gain_control.c)
set(option_HW_lib "-rdynamic -ldl")
elseif (${RF_BOARD} STREQUAL "OAI_USRP")
include_directories("${OPENAIR_TARGETS}/ARCH/USRP/USERSPACE/LIB/")
......@@ -420,8 +481,7 @@ elseif (${RF_BOARD} STREQUAL "OAI_USRP")
set(HW_SOURCE ${HW_SOURCE}
${OPENAIR_TARGETS}/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp)
LINK_DIRECTORIES("/opt/lib")
set(option_HW_lib "uhd")
#set(LOWLATENCY False)
set(option_HW_lib "-luhd -rdynamic -ldl")
elseif (${RF_BOARD} STREQUAL "OAI_BLADERF")
include_directories("${OPENAIR_TARGETS}/ARCH/BLADERF/USERSPACE/LIB/")
......@@ -431,24 +491,48 @@ elseif (${RF_BOARD} STREQUAL "OAI_BLADERF")
${OPENAIR_TARGETS}/ARCH/BLADERF/USERSPACE/LIB/bladerf_lib.c
)
LINK_DIRECTORIES("/usr/lib/x86_64-linux-gnu")
set(option_HW_lib "bladeRF")
set(option_HW_lib "bladeRF -rdynamic -ldl")
#set(LOWLATENCY False)
elseif (${RF_BOARD} STREQUAL "ETHERNET")
include_directories ("${OPENAIR_TARGETS}/ARCH/ETHERNET/USERSPACE/LIB")
set(HW_SOURCE ${HW_SOURCE}
${OPENAIR_TARGETS}/ARCH/ETHERNET/USERSPACE/LIB/ethernet_lib.c
)
#set(LOWLATENCY True)
elseif (${RF_BOARD} STREQUAL "OAI_LMSSDR")
include_directories("${OPENAIR_TARGETS}/ARCH/LMSSDR/USERSPACE/LIB")
include_directories("${OPENAIR_TARGETS}/ARCH/LMSSDR/USERSPACE/LIB/lmsSDR")
include_directories("${OPENAIR_TARGETS}/ARCH/LMSSDR/USERSPACE/LIB/lms7002m")
include_directories("${OPENAIR_TARGETS}/ARCH/LMSSDR/USERSPACE/LIB/Si5351C")
include_directories("${OPENAIR_TARGETS}/ARCH/LMSSDR/USERSPACE/LIB/lmsSDR/LMS_StreamBoard")
LINK_DIRECTORIES("/usr/lib/x86_64-linux-gnu")
LINK_DIRECTORIES("${CMAKE_CURRENT_BINARY_DIR}/lmsSDR")
LINK_DIRECTORIES("${CMAKE_CURRENT_BINARY_DIR}/lms7002m")
LINK_DIRECTORIES("${CMAKE_CURRENT_BINARY_DIR}/Si5351C")
set(HW_SOURCE ${HW_SOURCE} ${OPENAIR_TARGETS}/ARCH/LMSSDR/USERSPACE/LIB/lms_lib.cpp)
set(LOWLATENCY False)
set(option_HW_lib "-lLMS_SDR -lLMS7002M -lSi5351C -rdynamic -ldl")
elseif (${RF_BOARD} STREQUAL "CPRIGW")
set(HW_SOURCE ${HW_SOURCE}
${OPENAIR_TARGETS}/ARCH/CPRIGW/USERSPACE/LIB/cprigw_lib.c
)
include_directories("${OPENAIR_TARGETS}/ARCH/CPRIGW/USERSPACE/LIB/")
set(option_HW_lib "-rdynamic dl")
set(option_HW_lib "-rdynamic dl")
endif (${RF_BOARD} STREQUAL "EXMIMO")
if (${TRANSP_PRO} STREQUAL "ETHERNET")
include_directories ("${OPENAIR_TARGETS}/ARCH/ETHERNET/USERSPACE/LIB")
set(TRANSPORT_SOURCE ${TRANSPORT_SOURCE}
${OPENAIR_TARGETS}/ARCH/ETHERNET/USERSPACE/LIB/ethernet_lib.c
${OPENAIR_TARGETS}/ARCH/ETHERNET/USERSPACE/LIB/eth_udp.c
${OPENAIR_TARGETS}/ARCH/ETHERNET/USERSPACE/LIB/eth_raw.c
)
set(option_TP_lib "-rdynamic -ldl")
endif (${TRANSP_PRO} STREQUAL "ETHERNET")
##########################################################
include_directories ("${OPENAIR_TARGETS}/ARCH/COMMON")
Message("LOWLATENCY flag is ${LOWLATENCY}")
......@@ -474,6 +558,9 @@ add_list_string_option(PACKAGE_NAME "NotDefined" "As per attribute name")
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")
add_boolean_option(ENB_AGENT True "enable eNB agent to inteface with a SDN contrller")
########################
# Include order
##########################
......@@ -1403,10 +1490,11 @@ add_definitions(-DASN1_MINIMUM_VERSION=924)
#################################
# add executables for operation
#################################""
#################################
# lte-softmodem is both eNB and UE implementation
###################################################
add_executable(lte-softmodem
${rrc_h}
${s1ap_h}
......@@ -1424,6 +1512,7 @@ add_executable(lte-softmodem
${OPENAIR3_DIR}/NAS/UE/nas_ue_task.c
${GTPU_need_ITTI}
${HW_SOURCE}
${TRANSPORT_SOURCE}
${RTAI_SOURCE}
${XFORMS_SOURCE}
${XFORMS_SOURCE_SOFTMODEM}
......@@ -1431,13 +1520,14 @@ add_executable(lte-softmodem
target_link_libraries (lte-softmodem
-Wl,--start-group
RRC_LIB S1AP_LIB S1AP_ENB GTPV1U SECU_CN SECU_OSA UTIL HASHTABLE SCTP_CLIENT UDP SCHED_LIB PHY LFDS L2 ${MSC_LIB} ${RAL_LIB} ${NAS_UE_LIB} ${ITTI_LIB} ${MIH_LIB}
RRC_LIB S1AP_LIB S1AP_ENB GTPV1U SECU_CN SECU_OSA UTIL HASHTABLE SCTP_CLIENT UDP SCHED_LIB PHY LFDS L2 ${MSC_LIB} ${RAL_LIB} ${NAS_UE_LIB} ${ITTI_LIB} ${MIH_LIB}
-Wl,--end-group )
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 ${option_HW_lib} ${XFORMS_LIBRARIES} )
target_link_libraries (lte-softmodem pthread m ${CONFIG_LIBRARIES} rt crypt ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} ${NETTLE_LIBRARIES} sctp ${option_HW_lib} ${option_TP_lib} ${XFORMS_LIBRARIES} )
target_link_libraries (lte-softmodem ${LIBBOOST_LIBRARIES})
target_link_libraries (lte-softmodem ${LIB_LMS_LIBRARIES})
# lte-softmodem-nos1 is both eNB and UE implementation
###################################################
......@@ -1458,6 +1548,7 @@ add_executable(lte-softmodem-nos1
#${OPENAIR2_DIR}/RRC/NAS/rb_config.c
${OPENAIR1_DIR}/SIMULATION/ETH_TRANSPORT/netlink_init.c
${HW_SOURCE}
${TRANSPORT_SOURCE}
${RTAI_SOURCE}
${XFORMS_SOURCE}
${XFORMS_SOURCE_SOFTMODEM}
......@@ -1468,38 +1559,43 @@ target_link_libraries (lte-softmodem-nos1
-Wl,--end-group )
target_link_libraries (lte-softmodem-nos1 ${LIBXML2_LIBRARIES})
target_link_libraries (lte-softmodem-nos1 pthread m ${CONFIG_LIBRARIES} rt crypt ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} ${NETTLE_LIBRARIES} ${option_HW_lib} ${XFORMS_LIBRARIES} )
target_link_libraries (lte-softmodem-nos1 pthread m ${CONFIG_LIBRARIES} rt crypt ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} ${NETTLE_LIBRARIES} ${option_HW_lib} ${option_TP_lib} ${XFORMS_LIBRARIES} )
target_link_libraries (lte-softmodem-nos1 ${LIBBOOST_LIBRARIES})
target_link_libraries (lte-softmodem-nos1 ${LIB_LMS_LIBRARIES})
# rrh
################################
set(DRIVER2013)
#Note: only on RF type is currently supported for RRH
#Note: only one RF type (USRP) is currently supported for RRH
add_executable(rrh_gw
${OPENAIR_TARGETS}/RT/USER/rrh_gw.c
${OPENAIR_TARGETS}/RT/USER/eNB_transport_IQ.c
${OPENAIR_TARGETS}/RT/USER/UE_transport_IQ.c
${OPENAIR_TARGETS}/RT/USER/rt_wrapper.c
${OPENAIR_TARGETS}/ARCH/COMMON/common_lib.c
${OPENAIR_TARGETS}/ARCH/ETHERNET/USERSPACE/LIB/ethernet_lib.c
${HW_SOURCE}
${TRANSPORT_SOURCE}
)
# assert and common_lib.h
target_include_directories(rrh_gw PRIVATE ${OPENAIR_DIR}/common/utils/itti ${OPENAIR_TARGETS}/ARCH/COMMON ${OPENAIR_TARGETS}/ARCH/ETHERNET/USERSPACE/LIB/ )
target_include_directories(rrh_gw PRIVATE ${OPENAIR_DIR}/common/utils/itti)
target_link_libraries(rrh_gw
-Wl,--start-group
UTIL LFDS
-Wl,--end-group )
target_link_libraries (rrh_gw rt pthread m )
target_link_libraries (rrh_gw ${option_HW_lib} ${LIBBOOST_LIBRARIES} )
target_link_libraries (rrh_gw ${option_HW_lib} ${option_TP_lib} ${LIBBOOST_LIBRARIES} )
target_link_libraries (rrh_gw ${LIB_LMS_LIBRARIES})
#Message("-- default_HW_lib=ETHERNET") # only in case of RRH
Message("-- option_HW_lib=${option_HW_lib}")
Message("-- HW_SOURCE=${HW_SOURCE}")
Message("-- option_TP_lib=${option_TP_lib}")
Message("-- TRANSPORT_SOURCE=${TRANSPORT_SOURCE}")
if (${RF_BOARD} STREQUAL "OAI_LMSSDR")
add_dependencies(lte-softmodem LMS7002M LMS_SDR Si5351C)
add_dependencies(lte-softmodem-nos1 LMS7002M LMS_SDR Si5351C)
add_dependencies(rrh_gw LMS7002M LMS_SDR Si5351C)
endif (${RF_BOARD} STREQUAL "OAI_LMSSDR")
# USIM process
#################
......@@ -1550,6 +1646,7 @@ add_executable(oaisim
${GTPU_need_ITTI}
${OPENAIR_TARGETS}/COMMON/create_tasks.c
${HW_SOURCE}
${TRANSPORT_SOURCE}
${XFORMS_SOURCE}
)
......@@ -1561,7 +1658,7 @@ target_link_libraries (oaisim
-Wl,--end-group )
target_link_libraries (oaisim ${LIBXML2_LIBRARIES} ${LAPACK_LIBRARIES})
target_link_libraries (oaisim pthread m ${CONFIG_LIBRARIES} rt crypt ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} ${NETTLE_LIBRARIES} sctp ${option_HW_lib}
target_link_libraries (oaisim pthread m ${CONFIG_LIBRARIES} rt crypt ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} ${NETTLE_LIBRARIES} sctp ${option_HW_lib} ${option_TP_lib}
${ATLAS_LIBRARIES} ${XFORMS_LIBRARIES} ${OPENPGM_LIBRARIES})
#Force link with forms, regardless XFORMS option
target_link_libraries (oaisim forms)
......@@ -1588,6 +1685,7 @@ add_executable(oaisim_nos1
${OPENAIR2_DIR}/UTIL/OMG/sumo.c
${OPENAIR_TARGETS}/COMMON/create_tasks.c
${HW_SOURCE}
${TRANSPORT_SOURCE}
${XFORMS_SOURCE}
)
target_include_directories(oaisim_nos1 PUBLIC ${OPENAIR_TARGETS}/SIMU/USER)
......@@ -1597,7 +1695,7 @@ target_link_libraries (oaisim_nos1
-Wl,--end-group )
target_link_libraries (oaisim_nos1 ${LIBXML2_LIBRARIES} ${LAPACK_LIBRARIES})
target_link_libraries (oaisim_nos1 pthread m ${CONFIG_LIBRARIES} rt crypt ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} ${NETTLE_LIBRARIES} ${option_HW_lib}
target_link_libraries (oaisim_nos1 pthread m ${CONFIG_LIBRARIES} rt crypt ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} ${NETTLE_LIBRARIES} ${option_HW_lib} ${option_TP_lib}
${ATLAS_LIBRARIES} ${XFORMS_LIBRARIES} ${OPENPGM_LIBRARIES})
#Force link with forms, regardless XFORMS option
target_link_libraries (oaisim_nos1 forms)
......
......@@ -81,7 +81,8 @@
<compile_prog_args>--eNB -w USRP -r Rel10 --noS1 -c </compile_prog_args>
<compile_prog_out>$OPENAIR_DIR/cmake_targets/lte_noS1_build_oai/build/lte-softmodem-nos1
$OPENAIR_DIR/cmake_targets/lte_noS1_build_oai/build/rb_tool
$OPENAIR_DIR/cmake_targets/lte_noS1_build_oai/build/CMakeFiles/nasmesh/nasmesh.ko</compile_prog_out>
$OPENAIR_DIR/cmake_targets/lte_noS1_build_oai/build/CMakeFiles/nasmesh/nasmesh.ko
$OPENAIR_DIR/cmake_targets/lte_noS1_build_oai/build/liboai_usrpdevif.so</compile_prog_out>
<pre_exec></pre_exec>
<pre_exec_args></pre_exec_args>
<main_exec></main_exec>
......@@ -122,7 +123,8 @@
<compile_prog_args>--eNB -w BLADERF -r Rel10 --noS1 -c </compile_prog_args>
<compile_prog_out>$OPENAIR_DIR/cmake_targets/lte_noS1_build_oai/build/lte-softmodem-nos1
$OPENAIR_DIR/cmake_targets/lte_noS1_build_oai/build/rb_tool
$OPENAIR_DIR/cmake_targets/lte_noS1_build_oai/build/CMakeFiles/nasmesh/nasmesh.ko</compile_prog_out>
$OPENAIR_DIR/cmake_targets/lte_noS1_build_oai/build/CMakeFiles/nasmesh/nasmesh.ko
$OPENAIR_DIR/cmake_targets/lte_noS1_build_oai/build/liboai_bladerfdevif.so</compile_prog_out>
<pre_exec></pre_exec>
<pre_exec_args></pre_exec_args>
<main_exec></main_exec>
......@@ -138,10 +140,11 @@
<desc>Build lte_softmodem_noS1.ETHERNET.Rel10</desc>
<pre_compile_prog></pre_compile_prog>
<compile_prog>$OPENAIR_DIR/cmake_targets/build_oai</compile_prog>
<compile_prog_args>--eNB -w ETHERNET -r Rel10 --noS1 -c </compile_prog_args>
<compile_prog_args>--eNB -w None -t ETHERNET -r Rel10 --noS1 -c </compile_prog_args>
<compile_prog_out>$OPENAIR_DIR/cmake_targets/lte_noS1_build_oai/build/lte-softmodem-nos1
$OPENAIR_DIR/cmake_targets/lte_noS1_build_oai/build/rb_tool
$OPENAIR_DIR/cmake_targets/lte_noS1_build_oai/build/CMakeFiles/nasmesh/nasmesh.ko</compile_prog_out>
$OPENAIR_DIR/cmake_targets/lte_noS1_build_oai/build/CMakeFiles/nasmesh/nasmesh.ko
$OPENAIR_DIR/cmake_targets/lte_noS1_build_oai/build/liboai_eth_transpro.so</compile_prog_out>
<pre_exec></pre_exec>
<pre_exec_args></pre_exec_args>
<main_exec></main_exec>
......@@ -160,7 +163,8 @@
<pre_compile_prog></pre_compile_prog>
<compile_prog>$OPENAIR_DIR/cmake_targets/build_oai</compile_prog>
<compile_prog_args>--eNB -w USRP -r Rel10 -c </compile_prog_args>
<compile_prog_out>$OPENAIR_DIR/cmake_targets/lte_build_oai/build/lte-softmodem</compile_prog_out>
<compile_prog_out>$OPENAIR_DIR/cmake_targets/lte_build_oai/build/lte-softmodem
$OPENAIR_DIR/cmake_targets/lte_build_oai/build/liboai_usrpdevif.so</compile_prog_out>
<pre_exec></pre_exec>
<pre_exec_args></pre_exec_args>
<main_exec></main_exec>
......@@ -197,7 +201,8 @@
<pre_compile_prog></pre_compile_prog>
<compile_prog>$OPENAIR_DIR/cmake_targets/build_oai</compile_prog>
<compile_prog_args>--eNB -w BLADERF -r Rel10 -c </compile_prog_args>
<compile_prog_out>$OPENAIR_DIR/cmake_targets/lte_build_oai/build/lte-softmodem</compile_prog_out>
<compile_prog_out>$OPENAIR_DIR/cmake_targets/lte_build_oai/build/lte-softmodem
$OPENAIR_DIR/cmake_targets/lte_build_oai/build/liboai_bladerfdevif.so</compile_prog_out>
<pre_exec></pre_exec>
<pre_exec_args></pre_exec_args>
<main_exec></main_exec>
......@@ -213,8 +218,9 @@
<desc>Build lte_softmodem.ETHERNET.Rel10</desc>
<pre_compile_prog></pre_compile_prog>
<compile_prog>$OPENAIR_DIR/cmake_targets/build_oai</compile_prog>
<compile_prog_args>--eNB -w ETHERNET -r Rel10 -c </compile_prog_args>
<compile_prog_out>$OPENAIR_DIR/cmake_targets/lte_build_oai/build/lte-softmodem</compile_prog_out>
<compile_prog_args>--eNB -w None -t ETHERNET -r Rel10 -c </compile_prog_args>
<compile_prog_out>$OPENAIR_DIR/cmake_targets/lte_build_oai/build/lte-softmodem
$OPENAIR_DIR/cmake_targets/lte_build_oai/build/liboai_eth_transpro.so</compile_prog_out>
<pre_exec></pre_exec>
<pre_exec_args></pre_exec_args>
<main_exec></main_exec>
......@@ -261,11 +267,13 @@
<testCase id="010140" >
<class>compilation</class>
<desc>Build RRH Gateway</desc>
<desc>Build RRH Gateway for USRP(RF) + Ethernet (Transport)</desc>
<pre_compile_prog></pre_compile_prog>
<compile_prog>$OPENAIR_DIR/cmake_targets/build_oai</compile_prog>
<compile_prog_args>--RRH -w USRP -c </compile_prog_args>
<compile_prog_out>$OPENAIR_DIR/cmake_targets/rrh_gw/build/rrh_gw</compile_prog_out>
<compile_prog_args>--RRH -w USRP -t ETHERNET -c </compile_prog_args>
<compile_prog_out>$OPENAIR_DIR/cmake_targets/rrh_gw/build/rrh_gw
$OPENAIR_DIR/cmake_targets/rrh_gw/build/liboai_usrpdevif.so
$OPENAIR_DIR/cmake_targets/rrh_gw/build/liboai_eth_transpro.so</compile_prog_out>
<pre_exec></pre_exec>
<pre_exec_args></pre_exec_args>
<main_exec></main_exec>
......@@ -278,14 +286,16 @@
<testCase id="010141" >
<class>compilation</class>
<desc>Build RRH Gateway</desc>
<desc>Build RRH Gateway for EXMIMO(RF) + Ethernet (Transport)</desc>
<pre_compile_prog></pre_compile_prog>
<compile_prog>$OPENAIR_DIR/cmake_targets/build_oai</compile_prog>
<compile_prog_args>--RRH -w EXMIMO -c </compile_prog_args>
<compile_prog_args>--RRH -w EXMIMO -t ETHNERNET -c </compile_prog_args>
<compile_prog_out>$OPENAIR_DIR/cmake_targets/rrh_gw/build/rrh_gw
$OPENAIR_DIR/cmake_targets/rrh_gw/build/CMakeFiles/openair_rf/openair_rf.ko
$OPENAIR_DIR/cmake_targets/rrh_gw/build/updatefw
$OPENAIR_DIR/cmake_targets/rrh_gw/build/oarf_config_exmimo.oct</compile_prog_out>
$OPENAIR_DIR/cmake_targets/rrh_gw/build/oarf_config_exmimo.oct
$OPENAIR_DIR/cmake_targets/rrh_gw/build/liboai_exmimodevif.so
$OPENAIR_DIR/cmake_targets/rrh_gw/build/liboai_eth_transpro.so</compile_prog_out>
<pre_exec></pre_exec>
<pre_exec_args></pre_exec_args>
<main_exec></main_exec>
......@@ -301,8 +311,10 @@
<desc>Build RRH Gateway</desc>
<pre_compile_prog></pre_compile_prog>
<compile_prog>$OPENAIR_DIR/cmake_targets/build_oai</compile_prog>
<compile_prog_args>--RRH -w BLADERF -c </compile_prog_args>
<compile_prog_out>$OPENAIR_DIR/cmake_targets/rrh_gw/build/rrh_gw</compile_prog_out>
<compile_prog_args>--RRH -w BLADERF -t ETHERNET -c </compile_prog_args>
<compile_prog_out>$OPENAIR_DIR/cmake_targets/rrh_gw/build/rrh_gw
$OPENAIR_DIR/cmake_targets/rrh_gw/build/liboai_bladerfdevif.so
$OPENAIR_DIR/cmake_targets/rrh_gw/build/liboai_eth_transpro.so</compile_prog_out>
<pre_exec></pre_exec>
<pre_exec_args></pre_exec_args>
<main_exec></main_exec>
......@@ -4621,7 +4633,7 @@
targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.bladerfx40.conf frame_type \"FDD\"
targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.bladerfx40.conf nb_antennas_rx 1
targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.bladerfx40.conf nb_antennas_tx 1
targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.bladerfx40.conf pdsch_referenceSignalPower -29
targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.bladerfx40.conf pdsch_referenceSignalPower -26
targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.bladerfx40.conf ENB_INTERFACE_NAME_FOR_S1_MME \"eth0\"
targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.bladerfx40.conf ENB_IPV4_ADDRESS_FOR_S1_MME \"192.168.12.111/24\"
targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.bladerfx40.conf ENB_INTERFACE_NAME_FOR_S1U \"eth0\"
......@@ -4772,7 +4784,7 @@
targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.bladerfx40.conf frame_type \"FDD\"
targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.bladerfx40.conf nb_antennas_rx 1
targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.bladerfx40.conf nb_antennas_tx 1
targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.bladerfx40.conf pdsch_referenceSignalPower -29
targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.bladerfx40.conf pdsch_referenceSignalPower -32
targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.bladerfx40.conf ENB_INTERFACE_NAME_FOR_S1_MME \"eth0\"
targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.bladerfx40.conf ENB_IPV4_ADDRESS_FOR_S1_MME \"192.168.12.111/24\"
targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.bladerfx40.conf ENB_INTERFACE_NAME_FOR_S1U \"eth0\"
......@@ -4847,7 +4859,7 @@
targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.bladerfx40.conf frame_type \"FDD\"
targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.bladerfx40.conf nb_antennas_rx 1
targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.bladerfx40.conf nb_antennas_tx 1
targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.bladerfx40.conf pdsch_referenceSignalPower -29
targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.bladerfx40.conf pdsch_referenceSignalPower -26
targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.bladerfx40.conf ENB_INTERFACE_NAME_FOR_S1_MME \"eth0\"
targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.bladerfx40.conf ENB_IPV4_ADDRESS_FOR_S1_MME \"192.168.12.111/24\"
targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.bladerfx40.conf ENB_INTERFACE_NAME_FOR_S1U \"eth0\"
......@@ -4995,7 +5007,7 @@
targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.bladerfx40.conf frame_type \"FDD\"
targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.bladerfx40.conf nb_antennas_rx 1
targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.bladerfx40.conf nb_antennas_tx 1
targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.bladerfx40.conf pdsch_referenceSignalPower -29
targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.bladerfx40.conf pdsch_referenceSignalPower -32
targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.bladerfx40.conf ENB_INTERFACE_NAME_FOR_S1_MME \"eth0\"
targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.bladerfx40.conf ENB_IPV4_ADDRESS_FOR_S1_MME \"192.168.12.111/24\"
targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.bladerfx40.conf ENB_INTERFACE_NAME_FOR_S1U \"eth0\"
......
......@@ -49,13 +49,14 @@ LOWLATENCY_FLAG_USER="False"
FORCE_LOWLATENCY_FLAG_USER=""
REL="Rel10"
HW="None"
TP="None"
NOS1=0
EPC=0
VERBOSE_COMPILE=0
CFLAGS_PROCESSOR_USER=""
RUN_GROUP=0
TEST_CASE_GROUP=""
BUILD_DOXYGEN=0
trap handle_ctrl_c INT
function print_help() {
......@@ -90,10 +91,13 @@ Options
default is Rel10,
Rel8 limits the implementation to 3GPP Release 8 version
-w | --hardware
EXMIMO, USRP, BLADERF, ETHERNET, None (Default)
EXMIMO, USRP, BLADERF, ETHERNET, LMSSDR, None (Default)
Adds this RF board support (in external packages installation and in compilation)
-t | --transport protocol
ETHERNET , None
Adds this trasport protocol support in compilation
--oaisim
Makes the oaisim simulator. Hardware will be defaulted to "NONE".
Makes the oaisim simulator. Hardware will be defaulted to "None".
--phy_simulators
Makes the unitary tests Layer 1 simulators
--core_simulators
......@@ -115,6 +119,8 @@ Options
Shows detailed compilation instructions in makefile
--cflags_processor
Manually Add CFLAGS of processor if they are not detected correctly by script. Only add these flags if you know your processor supports them. Example flags: -msse3 -msse4.1 -msse4.2 -mavx2
--build-doxygen
Builds doxygen based documentation.
--disable-deadline
Disables deadline scheduler of Linux kernel (>=3.14.x).
--enable-deadline
......@@ -170,23 +176,35 @@ function main() {
shift;;
-r | --3gpp-release)
REL=$2
echo_info "setting release to: $REL"
echo_info "Setting release to: $REL"
shift 2;;
-w | --hardware)
HW="$2" #"${i#*=}"
# Use OAI_USRP as the key word USRP is used inside UHD driver
if [ "$HW" == "EXMIMO" ] ; then
HW="EXMIMO"
fi
if [ "$HW" == "USRP" ] ; then
HW="OAI_USRP"
fi
if [ "$HW" == "BLADERF" ] ; then
HW="OAI_BLADERF"
fi
echo_info "setting hardware to: $HW"
# Use OAI_USRP as the key word USRP is used inside UHD driver
if [ "$HW" != "BLADERF" -a "$HW" != "USRP" -a "$HW" != "LMSSDR" -a "$HW" != "None" -a "$HW" != "EXMIMO" ] ; then
echo_fatal "Unknown HW type $HW will exit..."
else
if [ "$HW" == "USRP" ] ; then
HW="OAI_USRP"
fi
if [ "$HW" == "BLADERF" ] ; then
HW="OAI_BLADERF"
fi
if [ "$HW" == "LMSSDR" ] ; then
HW="OAI_LMSSDR"
fi
echo_info "Setting hardware to: $HW"
fi
shift 2;;
-t | --transport_protocol)
TP="$2" #"${i#*=}"
if [ "$TP" != "ETHERNET" -a "$TP" != "None" ] ; then
echo_fatal "Unknown TP type $TP will exit..."
else
echo_info "Setting transport protocol to: $TP"
fi
shift 2;;
--oaisim)
--oaisim)
oaisim=1
echo_info "Will compile oaisim and drivers nasmesh, ..."
shift;;
......@@ -208,7 +226,7 @@ function main() {
echo_info "executing test cases only in group: $TEST_CASE_GROUP"
shift 2;;
-V | --vcd)
echo_info "setting gtk-wave output"
echo_info "Setting gtk-wave output"
VCD_TIMING=1
EXE_ARGUMENTS="$EXE_ARGUMENTS -V"
shift;;
......@@ -231,8 +249,12 @@ function main() {
shift;;
--cflags_processor)
CFLAGS_PROCESSOR_USER=$2
echo_info "setting CPU FLAGS from USER to: $CFLAGS_PROCESSOR_USER"
echo_info "Setting CPU FLAGS from USER to: $CFLAGS_PROCESSOR_USER"
shift 2;;
--build-doxygen)
BUILD_DOXYGEN=1
echo_info "Will build doxygen support"
shift;;
--disable-deadline)
FORCE_LOWLATENCY_FLAG_USER="False"
echo_info "Disabling the usage of deadline scheduler"
......@@ -241,7 +263,6 @@ function main() {
FORCE_LOWLATENCY_FLAG_USER="True"
echo_info "Enabling the usage of deadline scheduler"
shift 1;;
-h | --help)
print_help
exit 1;;
......@@ -251,7 +272,37 @@ function main() {
break;;
esac
done
#########################################################
# check validity of HW and TP parameters for RRH and eNB
#########################################################
# to be discussed
if [ "$eNB" = "1" ] ; then
if [ "$HW" = "None" -a "$TP" = "None" ] ; then
echo_fatal "Define a local radio head (e.g. -w EXMIMO) or a transport protocol (e.g. -t ETHERNET) to communicate with a remote radio head!"
fi
if [ "$HW" != "None" -a "$TP" != "None" ] ; then
echo_fatal "Currently eNB can not support simultaniously local and remote radio heads!!"
fi
if [ "$HW" = "None" ] ; then
echo_info "No radio head has been selected (HW set to $HW)"
fi
if [ "$TP" = "None" ] ; then
echo_info "No transport protocol has been selected (TP set to $TP)"
fi
fi
if [ "$RRH" = "1" ] ; then
if [ "$TP" = "None" ] ; then
echo_fatal "A transport protocol (e.g. -t ETHERNET) must be defined!"
fi
if [ "$HW" = "None" ] ; then
echo_info "No radio head has been selected (HW set to $HW)"
fi
fi
echo_info "RF HW set to $HW"
#Now we set flags to enable deadline scheduler settings
#By default: USRP: disable,
#By default: BLADERF: enable,
......@@ -265,6 +316,8 @@ function main() {
LOWLATENCY_FLAG_USER="False"
elif [ "$HW" = "OAI_BLADERF" ] ; then
LOWLATENCY_FLAG_USER="False"
elif [ "$HW" = "OAI_LMSSDR" ] ; then
LOWLATENCY_FLAG_USER="False"
elif [ "$HW" = "None" ] ; then
LOWLATENCY_FLAG_USER="False"
else
......@@ -277,6 +330,7 @@ function main() {
echo_info "Flags for Deadline scheduler: $LOWLATENCY_FLAG_USER"
############################################
# setting and printing OAI envs, we should check here
############################################
......@@ -315,7 +369,7 @@ function main() {
check_install_usrp_uhd_driver
fi
if [ "$HW" == "OAI_BLADERF" ] ; then
echo_info "installing packages for BALDERF support"
echo_info "installing packages for BLADERF support"
check_install_bladerf_driver
fi
fi
......@@ -326,9 +380,11 @@ function main() {
fi
if [ "$oaisim" = "1" ] ; then
if [ "$HW" != "ETHERNET" ] ; then
HW="NONE"
fi
#to be discussed
# there is no RF device and no transport protocol
HW="None"
TP="None"
if [ "$XFORMS" == "True" ] ; then
PRINT_STATS="True"
fi
......@@ -362,7 +418,8 @@ function main() {
echo "set ( RRC_ASN1_VERSION \"${REL}\")" >> $cmake_file
echo "set ( ENABLE_VCD_FIFO $VCD_TIMING )" >> $cmake_file
echo "set ( RF_BOARD \"${HW}\")" >> $cmake_file
echo "set(PACKAGE_NAME \"${lte_exec}\")" >> $cmake_file
echo "set ( TRANSP_PRO \"${TP}\")" >> $cmake_file
echo "set(PACKAGE_NAME \"${lte_exec}\")" >> $cmake_file
echo "set (LOWLATENCY \"${LOWLATENCY_FLAG_USER}\" )" >>$cmake_file
echo 'include(${CMAKE_CURRENT_SOURCE_DIR}/../CMakeLists.txt)' >> $cmake_file
cd $DIR/$lte_build_dir/build
......@@ -568,33 +625,124 @@ function main() {
fi
# RRH compilation
##################
#####################
if [ "$RRH" = "1" ] ; then
echo_info "Compiling RRH"
if [ $HW == "ETHERNET" ] ; then
echo_info "RF frontend for RRH is not defined. This mode is used for testing (loopback)."
elif [ $HW != "EXMIMO" -a $HW != "OAI_USRP" -a $HW != "OAI_BLADERF" ] ; then
echo_fatal "Hardware not defined ($HW)"
fi
cmake_file=$DIR/rrh_gw/CMakeLists.txt