Commit 4bf4ad8e authored by Robert Schmidt's avatar Robert Schmidt

change build scripts: always compile FlexRAN

parent 54e803e7
......@@ -599,8 +599,6 @@ add_boolean_option(MESSAGE_CHART_GENERATOR False "For generating sequenc
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(FLEXRAN_AGENT_SB_IF False "enable FlexRAN agent to inteface with a SDN controller")
########################
# Include order
##########################
......@@ -789,18 +787,17 @@ include_directories("${OPENAIR_DIR}")
# Utilities Library
################
if (FLEXRAN_AGENT_SB_IF)
# set the version of protobuf messages, V3 not supported yet
add_list1_option(FLPT_VERSION V2 "FLPT MSG protobuf grammar version" V2 V3)
# set the version of protobuf messages, V3 not supported yet
add_list1_option(FLPT_VERSION V2 "FLPT MSG protobuf grammar version" V2 V3)
if (${FLPT_VERSION} STREQUAL "V2")
if (${FLPT_VERSION} STREQUAL "V2")
set (FLPTDIR V2)
elseif (${FLPT_VERSION} STREQUAL "V3")
elseif (${FLPT_VERSION} STREQUAL "V3")
set (FLPTDIR V3)
endif(${FLPT_VERSION} STREQUAL "V2")
endif(${FLPT_VERSION} STREQUAL "V2")
set(FLPT_MSG_DIR ${OPENAIR2_DIR}/ENB_APP/MESSAGES/${FLPTDIR} )
set(FLPT_MSG_FILES
set(FLPT_MSG_DIR ${OPENAIR2_DIR}/ENB_APP/MESSAGES/${FLPTDIR} )
set(FLPT_MSG_FILES
${FLPT_MSG_DIR}/header.proto
${FLPT_MSG_DIR}/flexran.proto
${FLPT_MSG_DIR}/stats_common.proto
......@@ -813,11 +810,11 @@ if (FLEXRAN_AGENT_SB_IF)
${FLPT_MSG_DIR}/control_delegation.proto
)
set(FLPT_C_DIR ${protobuf_generated_dir}/${FLPTDIR})
#message("calling protoc_call=${protoc_call} FLPT_C_DIR=${FLPT_C_DIR} FLPT_MSG_FILES=${FLPT_MSG_FILES}")
execute_process(COMMAND ${protoc_call} ${FLPT_C_DIR} ${FLPT_MSG_DIR} ${FLPT_MSG_FILES})
file(GLOB FLPT_source ${FLPT_C_DIR}/*.c)
set(FLPT_OAI_generated
set(FLPT_C_DIR ${protobuf_generated_dir}/${FLPTDIR})
#message("calling protoc_call=${protoc_call} FLPT_C_DIR=${FLPT_C_DIR} FLPT_MSG_FILES=${FLPT_MSG_FILES}")
execute_process(COMMAND ${protoc_call} ${FLPT_C_DIR} ${FLPT_MSG_DIR} ${FLPT_MSG_FILES})
file(GLOB FLPT_source ${FLPT_C_DIR}/*.c)
set(FLPT_OAI_generated
${FLPT_C_DIR}/header.pb-c.c
${FLPT_C_DIR}/flexran.pb-c.c
${FLPT_C_DIR}/stats_common.pb-c.c
......@@ -830,27 +827,27 @@ if (FLEXRAN_AGENT_SB_IF)
${FLPT_C_DIR}/control_delegation.pb-c.c
)
file(GLOB flpt_h ${FLPT_C_DIR}/*.h)
set(flpt_h ${flpt_h} )
file(GLOB flpt_h ${FLPT_C_DIR}/*.h)
set(flpt_h ${flpt_h} )
add_library(FLPT_MSG
add_library(FLPT_MSG
${FLPT_OAI_generated}
${FLPT_source}
)
set(FLPT_MSG_LIB FLPT_MSG)
#message("prpt c dir is : ${FLPT_C_DIR}")
include_directories (${FLPT_C_DIR})
set(FLPT_MSG_LIB FLPT_MSG)
#message("prpt c dir is : ${FLPT_C_DIR}")
include_directories (${FLPT_C_DIR})
add_library(ASYNC_IF
add_library(ASYNC_IF
${OPENAIR2_DIR}/UTIL/ASYNC_IF/socket_link.c
${OPENAIR2_DIR}/UTIL/ASYNC_IF/link_manager.c
${OPENAIR2_DIR}/UTIL/ASYNC_IF/message_queue.c
${OPENAIR2_DIR}/UTIL/ASYNC_IF/ringbuffer_queue.c
)
set(ASYNC_IF_LIB ASYNC_IF)
include_directories(${OPENAIR2_DIR}/UTIL/ASYNC_IF)
set(ASYNC_IF_LIB ASYNC_IF)
include_directories(${OPENAIR2_DIR}/UTIL/ASYNC_IF)
add_library(FLEXRAN_AGENT
add_library(FLEXRAN_AGENT
${OPENAIR2_DIR}/ENB_APP/flexran_agent_handler.c
${OPENAIR2_DIR}/ENB_APP/flexran_agent_common.c
${OPENAIR2_DIR}/ENB_APP/flexran_agent_ran_api.c
......@@ -865,20 +862,19 @@ if (FLEXRAN_AGENT_SB_IF)
${OPENAIR2_DIR}/ENB_APP/flexran_agent_async.c
${OPENAIR2_DIR}/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac_internal.c
)
set(FLEXRAN_AGENT_LIB FLEXRAN_AGENT)
#include_directories(${OPENAIR2_DIR}/ENB_APP)
set(FLEXRAN_AGENT_LIB FLEXRAN_AGENT)
#include_directories(${OPENAIR2_DIR}/ENB_APP)
set(PROTOBUF_LIB "protobuf-c")
set(PROTOBUF_LIB "protobuf-c")
FIND_PATH(LIBYAML_INCLUDE_DIR NAMES yaml.h)
FIND_LIBRARY(LIBYAML_LIBRARIES NAMES yaml libyaml)
FIND_PATH(LIBYAML_INCLUDE_DIR NAMES yaml.h)
FIND_LIBRARY(LIBYAML_LIBRARIES NAMES yaml libyaml)
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Yaml DEFAULT_MSG LIBYAML_LIBRARIES LIBYAML_INCLUDE_DIR)
MARK_AS_ADVANCED(LIBYAML_INCLUDE_DIR LIBYAML_LIBRARIES)
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Yaml DEFAULT_MSG LIBYAML_LIBRARIES LIBYAML_INCLUDE_DIR)
MARK_AS_ADVANCED(LIBYAML_INCLUDE_DIR LIBYAML_LIBRARIES)
#set(PROTOBUF_LIB "protobuf") #for Cpp
endif()
#set(PROTOBUF_LIB "protobuf") #for Cpp
add_library(HASHTABLE
......
......@@ -42,7 +42,6 @@ conf_nvram_path=$OPENAIR_DIR/openair3/NAS/TOOLS/ue_eurecom_test_sfr.conf
MSC_GEN="False"
XFORMS="True"
FLEXRAN_AGENT_SB_IF="True"
PRINT_STATS="False"
VCD_TIMING="False"
DEADLINE_SCHEDULER_FLAG_USER="False"
......@@ -100,8 +99,6 @@ Options
Specify conf_nvram_path (default \"$conf_nvram_path\")
--UE-gen-nvram [output path]
Specify gen_nvram_path (default \"$gen_nvram_path\")
-a | --agent
Enables agent for software-defined control of the eNB
-r | --3gpp-release
default is Rel14,
Rel8 limits the implementation to 3GPP Release 8 version
......@@ -204,8 +201,7 @@ function main() {
echo_info "Will compile eNB"
shift;;
-a | --agent)
FLEXRAN_AGENT=1
echo_info "Will compile eNB with agent support"
echo_info "FlexRAN support is always compiled into the eNB"
shift;;
--UE)
UE=1
......@@ -465,12 +461,10 @@ function main() {
flash_firmware_bladerf
fi
fi
if [ "$FLEXRAN_AGENT" == "1" ] ; then
echo_info "installing protobuf/protobuf-c for flexran agent support"
install_protobuf_from_source
install_protobuf_c_from_source
fi
fi
if [ "$INSTALL_OPTIONAL" = "1" ] ; then
echo_info "Installing optional packages"
......@@ -517,9 +511,6 @@ function main() {
echo "set ( CMAKE_BUILD_TYPE $CMAKE_BUILD_TYPE )" >> $cmake_file
echo "set ( CFLAGS_PROCESSOR_USER \"$CFLAGS_PROCESSOR_USER\" )" >> $cmake_file
echo "set ( XFORMS $XFORMS )" >> $cmake_file
if [ "$FLEXRAN_AGENT" = "1" ] ; then
echo "set ( FLEXRAN_AGENT_SB_IF $FLEXRAN_AGENT_SB_IF )" >> $cmake_file
fi
echo "set ( RRC_ASN1_VERSION \"${REL}\")" >> $cmake_file
echo "set ( ENABLE_VCD_FIFO $VCD_TIMING )" >> $cmake_file
echo "set ( RF_BOARD \"${HW}\")" >> $cmake_file
......@@ -679,9 +670,6 @@ function main() {
echo "set ( CMAKE_BUILD_TYPE $CMAKE_BUILD_TYPE )" >> $cmake_file
echo "set ( CFLAGS_PROCESSOR_USER \"$CFLAGS_PROCESSOR_USER\" )" >> $cmake_file
echo "set ( XFORMS $XFORMS )" >> $cmake_file
if [ "$FLEXRAN_AGENT" = "1" ] ; then
echo "set ( FLEXRAN_AGENT_SB_IF $FLEXRAN_AGENT_SB_IF )" >> $cmake_file
fi
echo "set ( PRINT_STATS $PRINT_STATS )" >> $cmake_file
echo "set ( RRC_ASN1_VERSION \"${REL}\")" >> $cmake_file
echo "set ( ENABLE_VCD_FIFO $VCD_TIMING )" >> $cmake_file
......@@ -762,9 +750,6 @@ function main() {
cp $DIR/oaisim_mme_build_oai/CMakeLists.template $cmake_file
echo "set ( CMAKE_BUILD_TYPE $CMAKE_BUILD_TYPE )" >> $cmake_file
echo "set ( XFORMS $XFORMS )" >> $cmake_file
if [ "$FLEXRAN_AGENT" = "1" ] ; then
echo "set ( FLEXRAN_AGENT_SB_IF $FLEXRAN_AGENT_SB_IF )" >> $cmake_file
fi
echo "set ( RRC_ASN1_VERSION \"${REL}\")" >> $cmake_file
echo "set ( ENABLE_VCD_FIFO $VCD_TIMING )" >> $cmake_file
echo "set ( T_TRACER $T_TRACER )" >> $cmake_file
......
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