Commit 5c80ef08 authored by Raphael Defosseux's avatar Raphael Defosseux

Merge remote-tracking branch 'origin/improve_build_nr_lte_merge' into develop_integration_2020_w04

parents 7d26df6e 6cdac7e1
This diff is collapsed.
......@@ -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
......@@ -191,10 +194,41 @@ function main() {
echo_info "Will copy OpenAirInterface files in Linux directories"
shift;;
-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 --trace-expand"
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
......@@ -513,22 +547,17 @@ function main() {
echo_info "3. building the compilation directives ..."
DIR=$OPENAIR_DIR/cmake_targets
if [ "$SIMUS_PHY" = "1" -o "$SIMUS_CORE" = "1" ] ; then
build_dir=phy_simulators
else
if [ "$T_TRACER" = "False" ] ; then
build_dir=ran_build_noLOG
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
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
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
if [ "$eNB" = "1" -o "$UE" = "1" -o "$gNB" = "1" -o "$nrUE" = "1" ] ; then
echo_info "Compiling $exec"
for f in $execlist ; do
echo_info "Compiling $f..."
compilations \
$build_dir $exec \
$exec $dbin/$exec.$REL
$build_dir $f \
$f $dbin/$f.$REL
done
# 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
# 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"
......
......@@ -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) {
......
......@@ -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"
......
......@@ -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
}
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) {
......
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