Commit eb690c89 authored by Rohit Gupta's avatar Rohit Gupta
Browse files

merge develop + resolve conflicts

parents 47a460f8 fc4314e0
...@@ -36,7 +36,7 @@ set (OPENAIR1_DIR ${OPENAIR_DIR}/openair1) ...@@ -36,7 +36,7 @@ set (OPENAIR1_DIR ${OPENAIR_DIR}/openair1)
set (OPENAIR2_DIR ${OPENAIR_DIR}/openair2) set (OPENAIR2_DIR ${OPENAIR_DIR}/openair2)
set (OPENAIR3_DIR ${OPENAIR_DIR}/openair3) set (OPENAIR3_DIR ${OPENAIR_DIR}/openair3)
set (OPENAIR_TARGETS ${OPENAIR_DIR}/targets) 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_CMAKE ${OPENAIR_DIR}/cmake_targets)
set (OPENAIR_BIN_DIR ${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}) set (OPENAIR_BIN_DIR ${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY})
...@@ -161,6 +161,11 @@ set(CMAKE_C_FLAGS ...@@ -161,6 +161,11 @@ set(CMAKE_C_FLAGS
set(CMAKE_CXX_FLAGS set(CMAKE_CXX_FLAGS
"${CMAKE_CXX_FLAGS} ${C_FLAGS_PROCESSOR}" "${CMAKE_CXX_FLAGS} ${C_FLAGS_PROCESSOR}"
) )
#########################
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-rpath -Wl,${OPENAIR_TARGETS}/bin")
#########################
# set a flag for changes in the source code # set a flag for changes in the source code
# these changes are related to hardcoded path to include .h files # these changes are related to hardcoded path to include .h files
add_definitions(-DCMAKER) add_definitions(-DCMAKER)
...@@ -244,6 +249,9 @@ endif (${RTAI}) ...@@ -244,6 +249,9 @@ endif (${RTAI})
set(asn1c_call "${OPENAIR_CMAKE}/tools/generate_asn1") set(asn1c_call "${OPENAIR_CMAKE}/tools/generate_asn1")
set(asn1_generated_dir ${OPENAIR_BIN_DIR}) set(asn1_generated_dir ${OPENAIR_BIN_DIR})
set(protoc_call "${OPENAIR_CMAKE}/tools/generate_protobuf")
set(protobuf_generated_dir ${OPENAIR_BIN_DIR})
# RRC # RRC
###### ######
add_list2_option(RRC_ASN1_VERSION "Rel10" "ASN.1 version of RRC interface" "Rel8" "Rel10" "CBA") add_list2_option(RRC_ASN1_VERSION "Rel10" "ASN.1 version of RRC interface" "Rel8" "Rel10" "CBA")
...@@ -404,8 +412,47 @@ add_list1_option(NB_ANTENNAS_RX "2" "Number of antennas in reception" "1" "2" "4 ...@@ -404,8 +412,47 @@ 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_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_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")
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/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") if (${RF_BOARD} STREQUAL "EXMIMO")
set(DRIVER2013) set(DRIVER2013)
include_directories ("${OPENAIR_TARGETS}/ARCH/EXMIMO/USERSPACE/LIB/") include_directories ("${OPENAIR_TARGETS}/ARCH/EXMIMO/USERSPACE/LIB/")
...@@ -413,6 +460,7 @@ if (${RF_BOARD} STREQUAL "EXMIMO") ...@@ -413,6 +460,7 @@ if (${RF_BOARD} STREQUAL "EXMIMO")
set(HW_SOURCE ${HW_SOURCE} set(HW_SOURCE ${HW_SOURCE}
${OPENAIR_TARGETS}/ARCH/EXMIMO/USERSPACE/LIB/openair0_lib.c ${OPENAIR_TARGETS}/ARCH/EXMIMO/USERSPACE/LIB/openair0_lib.c
${OPENAIR_TARGETS}/ARCH/EXMIMO/USERSPACE/LIB/gain_control.c) ${OPENAIR_TARGETS}/ARCH/EXMIMO/USERSPACE/LIB/gain_control.c)
set(option_HW_lib "-rdynamic -ldl")
elseif (${RF_BOARD} STREQUAL "OAI_USRP") elseif (${RF_BOARD} STREQUAL "OAI_USRP")
include_directories("${OPENAIR_TARGETS}/ARCH/USRP/USERSPACE/LIB/") include_directories("${OPENAIR_TARGETS}/ARCH/USRP/USERSPACE/LIB/")
...@@ -420,8 +468,7 @@ elseif (${RF_BOARD} STREQUAL "OAI_USRP") ...@@ -420,8 +468,7 @@ elseif (${RF_BOARD} STREQUAL "OAI_USRP")
set(HW_SOURCE ${HW_SOURCE} set(HW_SOURCE ${HW_SOURCE}
${OPENAIR_TARGETS}/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp) ${OPENAIR_TARGETS}/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp)
LINK_DIRECTORIES("/opt/lib") LINK_DIRECTORIES("/opt/lib")
set(option_HW_lib "uhd") set(option_HW_lib "-luhd -rdynamic -ldl")
#set(LOWLATENCY False)
elseif (${RF_BOARD} STREQUAL "OAI_BLADERF") elseif (${RF_BOARD} STREQUAL "OAI_BLADERF")
include_directories("${OPENAIR_TARGETS}/ARCH/BLADERF/USERSPACE/LIB/") include_directories("${OPENAIR_TARGETS}/ARCH/BLADERF/USERSPACE/LIB/")
...@@ -431,24 +478,32 @@ elseif (${RF_BOARD} STREQUAL "OAI_BLADERF") ...@@ -431,24 +478,32 @@ elseif (${RF_BOARD} STREQUAL "OAI_BLADERF")
${OPENAIR_TARGETS}/ARCH/BLADERF/USERSPACE/LIB/bladerf_lib.c ${OPENAIR_TARGETS}/ARCH/BLADERF/USERSPACE/LIB/bladerf_lib.c
) )
LINK_DIRECTORIES("/usr/lib/x86_64-linux-gnu") 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 "CPRIGW") #to ask
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 "CPRIGW")
set(HW_SOURCE ${HW_SOURCE} set(HW_SOURCE ${HW_SOURCE}
${OPENAIR_TARGETS}/ARCH/CPRIGW/USERSPACE/LIB/cprigw_lib.c ${OPENAIR_TARGETS}/ARCH/CPRIGW/USERSPACE/LIB/cprigw_lib.c
) )
include_directories("${OPENAIR_TARGETS}/ARCH/CPRIGW/USERSPACE/LIB/") 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") 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") include_directories ("${OPENAIR_TARGETS}/ARCH/COMMON")
Message("LOWLATENCY flag is ${LOWLATENCY}") Message("LOWLATENCY flag is ${LOWLATENCY}")
...@@ -474,6 +529,9 @@ add_list_string_option(PACKAGE_NAME "NotDefined" "As per attribute name") ...@@ -474,6 +529,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 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_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(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 # Include order
########################## ##########################
...@@ -1403,10 +1461,11 @@ add_definitions(-DASN1_MINIMUM_VERSION=924) ...@@ -1403,10 +1461,11 @@ add_definitions(-DASN1_MINIMUM_VERSION=924)
################################# #################################
# add executables for operation # add executables for operation
#################################"" #################################
# lte-softmodem is both eNB and UE implementation # lte-softmodem is both eNB and UE implementation
################################################### ###################################################
add_executable(lte-softmodem add_executable(lte-softmodem
${rrc_h} ${rrc_h}
${s1ap_h} ${s1ap_h}
...@@ -1424,6 +1483,7 @@ add_executable(lte-softmodem ...@@ -1424,6 +1483,7 @@ add_executable(lte-softmodem
${OPENAIR3_DIR}/NAS/UE/nas_ue_task.c ${OPENAIR3_DIR}/NAS/UE/nas_ue_task.c
${GTPU_need_ITTI} ${GTPU_need_ITTI}
${HW_SOURCE} ${HW_SOURCE}
${TRANSPORT_SOURCE}
${RTAI_SOURCE} ${RTAI_SOURCE}
${XFORMS_SOURCE} ${XFORMS_SOURCE}
${XFORMS_SOURCE_SOFTMODEM} ${XFORMS_SOURCE_SOFTMODEM}
...@@ -1436,7 +1496,7 @@ target_link_libraries (lte-softmodem ...@@ -1436,7 +1496,7 @@ target_link_libraries (lte-softmodem
target_link_libraries (lte-softmodem ${LIBXML2_LIBRARIES}) 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 ${LIBBOOST_LIBRARIES})
# lte-softmodem-nos1 is both eNB and UE implementation # lte-softmodem-nos1 is both eNB and UE implementation
...@@ -1458,6 +1518,7 @@ add_executable(lte-softmodem-nos1 ...@@ -1458,6 +1518,7 @@ add_executable(lte-softmodem-nos1
#${OPENAIR2_DIR}/RRC/NAS/rb_config.c #${OPENAIR2_DIR}/RRC/NAS/rb_config.c
${OPENAIR1_DIR}/SIMULATION/ETH_TRANSPORT/netlink_init.c ${OPENAIR1_DIR}/SIMULATION/ETH_TRANSPORT/netlink_init.c
${HW_SOURCE} ${HW_SOURCE}
${TRANSPORT_SOURCE}
${RTAI_SOURCE} ${RTAI_SOURCE}
${XFORMS_SOURCE} ${XFORMS_SOURCE}
${XFORMS_SOURCE_SOFTMODEM} ${XFORMS_SOURCE_SOFTMODEM}
...@@ -1468,38 +1529,36 @@ target_link_libraries (lte-softmodem-nos1 ...@@ -1468,38 +1529,36 @@ target_link_libraries (lte-softmodem-nos1
-Wl,--end-group ) -Wl,--end-group )
target_link_libraries (lte-softmodem-nos1 ${LIBXML2_LIBRARIES}) 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 ${LIBBOOST_LIBRARIES})
# rrh # rrh
################################ ################################
set(DRIVER2013) #Note: only one RF type (USRP) is currently supported for RRH
#Note: only on RF type is currently supported for RRH
add_executable(rrh_gw add_executable(rrh_gw
${OPENAIR_TARGETS}/RT/USER/rrh_gw.c ${OPENAIR_TARGETS}/RT/USER/rrh_gw.c
${OPENAIR_TARGETS}/RT/USER/eNB_transport_IQ.c ${OPENAIR_TARGETS}/RT/USER/eNB_transport_IQ.c
${OPENAIR_TARGETS}/RT/USER/UE_transport_IQ.c ${OPENAIR_TARGETS}/RT/USER/UE_transport_IQ.c
${OPENAIR_TARGETS}/RT/USER/rt_wrapper.c ${OPENAIR_TARGETS}/RT/USER/rt_wrapper.c
${OPENAIR_TARGETS}/ARCH/COMMON/common_lib.c ${OPENAIR_TARGETS}/ARCH/COMMON/common_lib.c
${OPENAIR_TARGETS}/ARCH/ETHERNET/USERSPACE/LIB/ethernet_lib.c
${HW_SOURCE} ${HW_SOURCE}
${TRANSPORT_SOURCE}
) )
# assert and common_lib.h # assert
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 target_link_libraries(rrh_gw
-Wl,--start-group -Wl,--start-group
UTIL LFDS UTIL LFDS
-Wl,--end-group ) -Wl,--end-group )
target_link_libraries (rrh_gw rt pthread m ) 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} )
#Message("-- default_HW_lib=ETHERNET") # only in case of RRH
Message("-- option_HW_lib=${option_HW_lib}") Message("-- option_HW_lib=${option_HW_lib}")
Message("-- HW_SOURCE=${HW_SOURCE}") Message("-- HW_SOURCE=${HW_SOURCE}")
Message("-- option_TP_lib=${option_TP_lib}")
Message("-- TRANSPORT_SOURCE=${TRANSPORT_SOURCE}")
# USIM process # USIM process
################# #################
...@@ -1550,6 +1609,7 @@ add_executable(oaisim ...@@ -1550,6 +1609,7 @@ add_executable(oaisim
${GTPU_need_ITTI} ${GTPU_need_ITTI}
${OPENAIR_TARGETS}/COMMON/create_tasks.c ${OPENAIR_TARGETS}/COMMON/create_tasks.c
${HW_SOURCE} ${HW_SOURCE}
${TRANSPORT_SOURCE}
${XFORMS_SOURCE} ${XFORMS_SOURCE}
) )
...@@ -1561,7 +1621,7 @@ target_link_libraries (oaisim ...@@ -1561,7 +1621,7 @@ target_link_libraries (oaisim
-Wl,--end-group ) -Wl,--end-group )
target_link_libraries (oaisim ${LIBXML2_LIBRARIES} ${LAPACK_LIBRARIES}) 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}) ${ATLAS_LIBRARIES} ${XFORMS_LIBRARIES} ${OPENPGM_LIBRARIES})
#Force link with forms, regardless XFORMS option #Force link with forms, regardless XFORMS option
target_link_libraries (oaisim forms) target_link_libraries (oaisim forms)
...@@ -1588,6 +1648,7 @@ add_executable(oaisim_nos1 ...@@ -1588,6 +1648,7 @@ add_executable(oaisim_nos1
${OPENAIR2_DIR}/UTIL/OMG/sumo.c ${OPENAIR2_DIR}/UTIL/OMG/sumo.c
${OPENAIR_TARGETS}/COMMON/create_tasks.c ${OPENAIR_TARGETS}/COMMON/create_tasks.c
${HW_SOURCE} ${HW_SOURCE}
${TRANSPORT_SOURCE}
${XFORMS_SOURCE} ${XFORMS_SOURCE}
) )
target_include_directories(oaisim_nos1 PUBLIC ${OPENAIR_TARGETS}/SIMU/USER) target_include_directories(oaisim_nos1 PUBLIC ${OPENAIR_TARGETS}/SIMU/USER)
...@@ -1597,7 +1658,7 @@ target_link_libraries (oaisim_nos1 ...@@ -1597,7 +1658,7 @@ target_link_libraries (oaisim_nos1
-Wl,--end-group ) -Wl,--end-group )
target_link_libraries (oaisim_nos1 ${LIBXML2_LIBRARIES} ${LAPACK_LIBRARIES}) 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}) ${ATLAS_LIBRARIES} ${XFORMS_LIBRARIES} ${OPENPGM_LIBRARIES})
#Force link with forms, regardless XFORMS option #Force link with forms, regardless XFORMS option
target_link_libraries (oaisim_nos1 forms) target_link_libraries (oaisim_nos1 forms)
......
This diff is collapsed.
...@@ -49,6 +49,7 @@ LOWLATENCY_FLAG_USER="False" ...@@ -49,6 +49,7 @@ LOWLATENCY_FLAG_USER="False"
FORCE_LOWLATENCY_FLAG_USER="" FORCE_LOWLATENCY_FLAG_USER=""
REL="Rel10" REL="Rel10"
HW="EXMIMO" HW="EXMIMO"
TP="None"
NOS1=0 NOS1=0
EPC=0 EPC=0
VERBOSE_COMPILE=0 VERBOSE_COMPILE=0
...@@ -90,10 +91,13 @@ Options ...@@ -90,10 +91,13 @@ Options
default is Rel10, default is Rel10,
Rel8 limits the implementation to 3GPP Release 8 version Rel8 limits the implementation to 3GPP Release 8 version
-w | --hardware -w | --hardware
EXMIMO (Default), USRP, BLADERF, ETHERNET, None EXMIMO (Default), USRP, BLADERF, None
Adds this RF board support (in external packages installation and in compilation) 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 --oaisim
Makes the oaisim simulator. Hardware will be defaulted to "NONE". Makes the oaisim simulator. Hardware will be defaulted to "None".
--phy_simulators --phy_simulators
Makes the unitary tests Layer 1 simulators Makes the unitary tests Layer 1 simulators
--core_simulators --core_simulators
...@@ -172,20 +176,32 @@ function main() { ...@@ -172,20 +176,32 @@ function main() {
shift;; shift;;
-r | --3gpp-release) -r | --3gpp-release)
REL=$2 REL=$2
echo_info "setting release to: $REL" echo_info "Setting release to: $REL"
shift 2;; shift 2;;
-w | --hardware) -w | --hardware)
HW="$2" #"${i#*=}" HW="$2" #"${i#*=}"
# Use OAI_USRP as the key word USRP is used inside UHD driver # Use OAI_USRP as the key word USRP is used inside UHD driver
if [ "$HW" == "USRP" ] ; then if [ "$HW" != "BLADERF" -a "$HW" != "USRP" -a "$HW" != "None" -a "$HW" != "EXMIMO" ] ; then
HW="OAI_USRP" echo_fatal "Unknown HW type $HW will exit..."
fi else
if [ "$HW" == "BLADERF" ] ; then if [ "$HW" == "USRP" ] ; then
HW="OAI_BLADERF" HW="OAI_USRP"
fi fi
echo_info "setting hardware to: $HW" if [ "$HW" == "BLADERF" ] ; then
HW="OAI_BLADERF"
fi
echo_info "Setting hardware to: $HW"
fi
shift 2;; shift 2;;
--oaisim) -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=1 oaisim=1
echo_info "Will compile oaisim and drivers nasmesh, ..." echo_info "Will compile oaisim and drivers nasmesh, ..."
shift;; shift;;
...@@ -207,7 +223,7 @@ function main() { ...@@ -207,7 +223,7 @@ function main() {
echo_info "executing test cases only in group: $TEST_CASE_GROUP" echo_info "executing test cases only in group: $TEST_CASE_GROUP"
shift 2;; shift 2;;
-V | --vcd) -V | --vcd)
echo_info "setting gtk-wave output" echo_info "Setting gtk-wave output"
VCD_TIMING=1 VCD_TIMING=1
EXE_ARGUMENTS="$EXE_ARGUMENTS -V" EXE_ARGUMENTS="$EXE_ARGUMENTS -V"
shift;; shift;;
...@@ -230,7 +246,7 @@ function main() { ...@@ -230,7 +246,7 @@ function main() {
shift;; shift;;
--cflags_processor) --cflags_processor)
CFLAGS_PROCESSOR_USER=$2 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;; shift 2;;
--build-doxygen) --build-doxygen)
BUILD_DOXYGEN=1 BUILD_DOXYGEN=1
...@@ -253,6 +269,35 @@ function main() { ...@@ -253,6 +269,35 @@ function main() {
break;; break;;
esac esac
done 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
#Now we set flags to enable deadline scheduler settings #Now we set flags to enable deadline scheduler settings
#By default: USRP: disable, #By default: USRP: disable,
...@@ -279,6 +324,7 @@ function main() { ...@@ -279,6 +324,7 @@ function main() {
echo_info "Flags for Deadline scheduler: $LOWLATENCY_FLAG_USER" echo_info "Flags for Deadline scheduler: $LOWLATENCY_FLAG_USER"
############################################ ############################################
# setting and printing OAI envs, we should check here # setting and printing OAI envs, we should check here
############################################ ############################################
...@@ -317,7 +363,7 @@ function main() { ...@@ -317,7 +363,7 @@ function main() {
check_install_usrp_uhd_driver check_install_usrp_uhd_driver
fi fi
if [ "$HW" == "OAI_BLADERF" ] ; then if [ "$HW" == "OAI_BLADERF" ] ; then
echo_info "installing packages for BALDERF support" echo_info "installing packages for BLADERF support"
check_install_bladerf_driver check_install_bladerf_driver
fi fi
fi fi
...@@ -328,9 +374,11 @@ function main() { ...@@ -328,9 +374,11 @@ function main() {
fi fi
if [ "$oaisim" = "1" ] ; then if [ "$oaisim" = "1" ] ; then
if [ "$HW" != "ETHERNET" ] ; then #to be discussed
HW="NONE" # there is no RF device and no transport protocol
fi HW="None"
TP="None"
if [ "$XFORMS" == "True" ] ; then if [ "$XFORMS" == "True" ] ; then
PRINT_STATS="True" PRINT_STATS="True"
fi fi
...@@ -364,7 +412,8 @@ function main() { ...@@ -364,7 +412,8 @@ function main() {
echo "set ( RRC_ASN1_VERSION \"${REL}\")" >> $cmake_file echo "set ( RRC_ASN1_VERSION \"${REL}\")" >> $cmake_file
echo "set ( ENABLE_VCD_FIFO $VCD_TIMING )" >> $cmake_file echo "set ( ENABLE_VCD_FIFO $VCD_TIMING )" >> $cmake_file
echo "set ( RF_BOARD \"${HW}\")" >> $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 "set (LOWLATENCY \"${LOWLATENCY_FLAG_USER}\" )" >>$cmake_file
echo 'include(${CMAKE_CURRENT_SOURCE_DIR}/../CMakeLists.txt)' >> $cmake_file echo 'include(${CMAKE_CURRENT_SOURCE_DIR}/../CMakeLists.txt)' >> $cmake_file
cd $DIR/$lte_build_dir/build cd $DIR/$lte_build_dir/build
...@@ -570,31 +619,97 @@ function main() { ...@@ -570,31 +619,97 @@ function main() {
fi fi
# RRH compilation # RRH compilation
################## #####################
if [ "$RRH" = "1" ] ; then 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
echo "cmake_minimum_required(VERSION 2.8)" > $cmake_file
echo "set(ENABLE_VCD_FIFO $VCD_TIMING )" >> $cmake_file
echo "set(ENABLE_ITTI False )" >> $cmake_file
echo "set(RF_BOARD \"${HW}\")" >> $cmake_file
echo 'set(PACKAGE_NAME "\"rrh_gw\"")' >> $cmake_file
echo "set(LOWLATENCY \"${LOWLATENCY_FLAG_USER}\")" >>$cmake_file
echo 'include(${CMAKE_CURRENT_SOURCE_DIR}/../CMakeLists.txt)' >> $cmake_file
[ "$CLEAN" = "1" ] && rm -rf $DIR/rrh_gw/build rrh_exec=rrh_gw
mkdir -p $DIR/rrh_gw/build rrh_build_dir=rrh_gw
cd $DIR/rrh_gw/build
cmake .. echo_info "Compiling $rrh_exec ..."
compilations \
rrh_gw rrh_gw \ [ "$CLEAN" = "1" ] && rm -rf $DIR/rrh_gw/build
rrh_gw $dbin/rrh_gw mkdir -p $DIR/$rrh_build_dir/build
cmake_file=$DIR/$rrh_build_dir/CMakeLists.txt
echo "cmake_minimum_required(VERSION 2.8)" > $cmake_file
echo "set(ENABLE_VCD_FIFO $VCD_TIMING )" >> $cmake_file