* Add autoinstall for the USRP UHD driver
* add OSA log configuration through config file (see enb.band7.exmimo2.conf git-svn-id: http://svn.eurecom.fr/openair4G/trunk@6144 818b1a75-f10b-46b9-bf7c-635c3b92a50f
This commit is contained in:
@@ -190,6 +190,8 @@
|
|||||||
#define ENB_CONFIG_STRING_GTPU_LOG_VERBOSITY "gtpu_log_verbosity"
|
#define ENB_CONFIG_STRING_GTPU_LOG_VERBOSITY "gtpu_log_verbosity"
|
||||||
#define ENB_CONFIG_STRING_UDP_LOG_LEVEL "udp_log_level"
|
#define ENB_CONFIG_STRING_UDP_LOG_LEVEL "udp_log_level"
|
||||||
#define ENB_CONFIG_STRING_UDP_LOG_VERBOSITY "udp_log_verbosity"
|
#define ENB_CONFIG_STRING_UDP_LOG_VERBOSITY "udp_log_verbosity"
|
||||||
|
#define ENB_CONFIG_STRING_OSA_LOG_LEVEL "osa_log_level"
|
||||||
|
#define ENB_CONFIG_STRING_OSA_LOG_VERBOSITY "osa_log_verbosity"
|
||||||
|
|
||||||
|
|
||||||
#define KHz (1000UL)
|
#define KHz (1000UL)
|
||||||
@@ -363,6 +365,9 @@ static void enb_config_display(void) {
|
|||||||
printf( "\tRLC log level: \t%s\n", map_int_to_str(log_level_names,enb_properties.properties[i]->rlc_log_level));
|
printf( "\tRLC log level: \t%s\n", map_int_to_str(log_level_names,enb_properties.properties[i]->rlc_log_level));
|
||||||
printf( "\tPDCP log level: \t%s\n", map_int_to_str(log_level_names,enb_properties.properties[i]->pdcp_log_level));
|
printf( "\tPDCP log level: \t%s\n", map_int_to_str(log_level_names,enb_properties.properties[i]->pdcp_log_level));
|
||||||
printf( "\tRRC log level: \t%s\n", map_int_to_str(log_level_names,enb_properties.properties[i]->rrc_log_level));
|
printf( "\tRRC log level: \t%s\n", map_int_to_str(log_level_names,enb_properties.properties[i]->rrc_log_level));
|
||||||
|
printf( "\tUDP log level: \t%s\n", map_int_to_str(log_level_names,enb_properties.properties[i]->udp_log_level));
|
||||||
|
printf( "\tGTP log level: \t%s\n", map_int_to_str(log_level_names,enb_properties.properties[i]->gtpu_log_level));
|
||||||
|
printf( "\tOSA log level: \t%s\n", map_int_to_str(log_level_names,enb_properties.properties[i]->osa_log_level));
|
||||||
|
|
||||||
printf( "\n--------------------------------------------------------\n");
|
printf( "\n--------------------------------------------------------\n");
|
||||||
}
|
}
|
||||||
@@ -557,6 +562,8 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP) {
|
|||||||
char* gtpu_log_verbosity = NULL;
|
char* gtpu_log_verbosity = NULL;
|
||||||
char* udp_log_level = NULL;
|
char* udp_log_level = NULL;
|
||||||
char* udp_log_verbosity = NULL;
|
char* udp_log_verbosity = NULL;
|
||||||
|
char* osa_log_level = NULL;
|
||||||
|
char* osa_log_verbosity = NULL;
|
||||||
|
|
||||||
memset((char*) (enb_properties.properties), 0 , MAX_ENB * sizeof(Enb_properties_t *));
|
memset((char*) (enb_properties.properties), 0 , MAX_ENB * sizeof(Enb_properties_t *));
|
||||||
memset((char*)active_enb, 0 , MAX_ENB * sizeof(char*));
|
memset((char*)active_enb, 0 , MAX_ENB * sizeof(char*));
|
||||||
@@ -1821,6 +1828,21 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP) {
|
|||||||
enb_properties.properties[enb_properties_index]->udp_log_verbosity = LOG_MED;
|
enb_properties.properties[enb_properties_index]->udp_log_verbosity = LOG_MED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(config_setting_lookup_string(subsetting, ENB_CONFIG_STRING_OSA_LOG_LEVEL, (const char **)&osa_log_level)) {
|
||||||
|
if ((enb_properties.properties[enb_properties_index]->osa_log_level = map_str_to_int(log_level_names,osa_log_level)) == -1 )
|
||||||
|
enb_properties.properties[enb_properties_index]->osa_log_level = LOG_INFO;
|
||||||
|
//printf( "\tOSA log level :\t%s->%d\n",osa_log_level,enb_properties.properties[enb_properties_index]->osa_log_level);
|
||||||
|
} else {
|
||||||
|
enb_properties.properties[enb_properties_index]->osa_log_level = LOG_INFO;
|
||||||
|
}
|
||||||
|
if(config_setting_lookup_string(subsetting, ENB_CONFIG_STRING_OSA_LOG_VERBOSITY, (const char **)&osa_log_verbosity)) {
|
||||||
|
if ((enb_properties.properties[enb_properties_index]->osa_log_verbosity = map_str_to_int(log_verbosity_names,osa_log_verbosity)) == -1)
|
||||||
|
enb_properties.properties[enb_properties_index]->osa_log_verbosity = LOG_MED;
|
||||||
|
//printf( "\tOSA log verbosity:\t%s->%d\n",osa_log_verbosity,enb_properties.properties[enb_properties_index]->gosa_log_verbosity);
|
||||||
|
} else {
|
||||||
|
enb_properties.properties[enb_properties_index]->osa_log_verbosity = LOG_MED;
|
||||||
|
}
|
||||||
|
|
||||||
} else { // not configuration is given
|
} else { // not configuration is given
|
||||||
enb_properties.properties[enb_properties_index]->glog_level = LOG_INFO;
|
enb_properties.properties[enb_properties_index]->glog_level = LOG_INFO;
|
||||||
enb_properties.properties[enb_properties_index]->glog_verbosity = LOG_MED;
|
enb_properties.properties[enb_properties_index]->glog_verbosity = LOG_MED;
|
||||||
@@ -1840,6 +1862,8 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP) {
|
|||||||
enb_properties.properties[enb_properties_index]->gtpu_log_verbosity = LOG_MED;
|
enb_properties.properties[enb_properties_index]->gtpu_log_verbosity = LOG_MED;
|
||||||
enb_properties.properties[enb_properties_index]->udp_log_level = LOG_INFO;
|
enb_properties.properties[enb_properties_index]->udp_log_level = LOG_INFO;
|
||||||
enb_properties.properties[enb_properties_index]->udp_log_verbosity = LOG_MED;
|
enb_properties.properties[enb_properties_index]->udp_log_verbosity = LOG_MED;
|
||||||
|
enb_properties.properties[enb_properties_index]->osa_log_level = LOG_INFO;
|
||||||
|
enb_properties.properties[enb_properties_index]->osa_log_verbosity = LOG_MED;
|
||||||
}
|
}
|
||||||
|
|
||||||
enb_properties_index += 1;
|
enb_properties_index += 1;
|
||||||
|
|||||||
@@ -208,6 +208,8 @@ typedef struct Enb_properties_s {
|
|||||||
int16_t gtpu_log_verbosity;
|
int16_t gtpu_log_verbosity;
|
||||||
int16_t udp_log_level;
|
int16_t udp_log_level;
|
||||||
int16_t udp_log_verbosity;
|
int16_t udp_log_verbosity;
|
||||||
|
int16_t osa_log_level;
|
||||||
|
int16_t osa_log_verbosity;
|
||||||
|
|
||||||
} Enb_properties_t;
|
} Enb_properties_t;
|
||||||
|
|
||||||
|
|||||||
@@ -150,6 +150,13 @@ eNBs =
|
|||||||
pdcp_log_verbosity ="medium";
|
pdcp_log_verbosity ="medium";
|
||||||
rrc_log_level ="debug";
|
rrc_log_level ="debug";
|
||||||
rrc_log_verbosity ="medium";
|
rrc_log_verbosity ="medium";
|
||||||
|
gtpu_log_level ="error";
|
||||||
|
gtpu_log_verbosity ="medium";
|
||||||
|
udp_log_level ="error";
|
||||||
|
udp_log_verbosity ="medium";
|
||||||
|
osa_log_level ="warn";
|
||||||
|
osa_log_verbosity ="low";
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -374,6 +374,10 @@ int16_t gtpu_log_verbosity = LOG_MED;
|
|||||||
int16_t udp_log_level = LOG_DEBUG;
|
int16_t udp_log_level = LOG_DEBUG;
|
||||||
int16_t udp_log_verbosity = LOG_MED;
|
int16_t udp_log_verbosity = LOG_MED;
|
||||||
#endif
|
#endif
|
||||||
|
#if defined (ENABLE_SECURITY)
|
||||||
|
int16_t osa_log_level = LOG_INFO;
|
||||||
|
int16_t osa_log_verbosity = LOG_MED;
|
||||||
|
#endif
|
||||||
|
|
||||||
unsigned int build_rflocal(int txi, int txq, int rxi, int rxq)
|
unsigned int build_rflocal(int txi, int txq, int rxi, int rxq)
|
||||||
{
|
{
|
||||||
@@ -2817,6 +2821,10 @@ static void get_options (int argc, char **argv) {
|
|||||||
udp_log_level = enb_properties->properties[i]->udp_log_level;
|
udp_log_level = enb_properties->properties[i]->udp_log_level;
|
||||||
udp_log_verbosity = enb_properties->properties[i]->udp_log_verbosity;
|
udp_log_verbosity = enb_properties->properties[i]->udp_log_verbosity;
|
||||||
#endif
|
#endif
|
||||||
|
#if defined (ENABLE_SECURITY)
|
||||||
|
osa_log_level = enb_properties->properties[i]->osa_log_level;
|
||||||
|
osa_log_verbosity = enb_properties->properties[i]->osa_log_verbosity;
|
||||||
|
#endif
|
||||||
|
|
||||||
// adjust the log
|
// adjust the log
|
||||||
for (CC_id=0; CC_id<MAX_NUM_CCs; CC_id++) {
|
for (CC_id=0; CC_id<MAX_NUM_CCs; CC_id++) {
|
||||||
@@ -2949,7 +2957,7 @@ int main(int argc, char **argv) {
|
|||||||
set_comp_log(SCTP, LOG_INFO, LOG_HIGH, 1);
|
set_comp_log(SCTP, LOG_INFO, LOG_HIGH, 1);
|
||||||
# endif
|
# endif
|
||||||
#if defined(ENABLE_SECURITY)
|
#if defined(ENABLE_SECURITY)
|
||||||
set_comp_log(OSA, LOG_DEBUG, LOG_HIGH, 1);
|
set_comp_log(OSA, osa_log_level, osa_log_verbosity, 1);
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
set_comp_log(ENB_APP, LOG_INFO, LOG_HIGH, 1);
|
set_comp_log(ENB_APP, LOG_INFO, LOG_HIGH, 1);
|
||||||
|
|||||||
@@ -46,6 +46,7 @@ BUILD_FROM_MAKEFILE=0
|
|||||||
SUDO=''
|
SUDO=''
|
||||||
PW=''
|
PW=''
|
||||||
UBUNTU_REL=`lsb_release -r | cut -f2`
|
UBUNTU_REL=`lsb_release -r | cut -f2`
|
||||||
|
UBUNTU_REL_NAME=`lsb_release -cs`
|
||||||
|
|
||||||
set_build_from_makefile(){
|
set_build_from_makefile(){
|
||||||
BUILD_FROM_MAKEFILE=$1
|
BUILD_FROM_MAKEFILE=$1
|
||||||
@@ -278,11 +279,20 @@ check_s6a_certificate() {
|
|||||||
return 1
|
return 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
check_install_usrp_uhd_driver(){
|
||||||
|
if [ ! -f /etc/apt/sources.list.d/ettus.list ] ; then
|
||||||
|
$SUDO bash -c 'echo "deb http://files.ettus.com/binaries/uhd/repo/uhd/ubuntu/`lsb_release -cs` `lsb_release -cs` main" >> /etc/apt/sources.list.d/ettus.list'
|
||||||
|
$SUDO apt-get update
|
||||||
|
fi
|
||||||
|
$SUDO apt-get install -t $UBUNTU_REL_NAME uhd
|
||||||
|
#test_install_package uhd
|
||||||
|
}
|
||||||
|
|
||||||
check_install_oai_software() {
|
check_install_oai_software() {
|
||||||
|
|
||||||
if [ ! -f ./.lock_oaibuild ]; then
|
if [ ! -f ./.lock_oaibuild ]; then
|
||||||
$SUDO apt-get update
|
$SUDO apt-get update
|
||||||
if [ $UBUNTU_REL = "12.04" ]; then
|
if [ $UBUNTU_REL = "12.04" ]; then
|
||||||
test_uninstall_package nettle-dev
|
test_uninstall_package nettle-dev
|
||||||
test_uninstall_package nettle-bin
|
test_uninstall_package nettle-bin
|
||||||
else
|
else
|
||||||
@@ -356,6 +366,8 @@ check_install_oai_software() {
|
|||||||
test_install_package graphviz
|
test_install_package graphviz
|
||||||
|
|
||||||
# TODO: install the USRP UHD packages
|
# TODO: install the USRP UHD packages
|
||||||
|
# if [ $1 = "USRP" ] ; then
|
||||||
|
|
||||||
# test_install_package libboost-all-dev
|
# test_install_package libboost-all-dev
|
||||||
|
|
||||||
if [ $OAI_INSTALLED = 1 ]; then
|
if [ $OAI_INSTALLED = 1 ]; then
|
||||||
@@ -923,7 +935,7 @@ print_help(){
|
|||||||
echo_success "-r : sets the release: REL8, REL10 (default REL8)"
|
echo_success "-r : sets the release: REL8, REL10 (default REL8)"
|
||||||
echo_success "-s : enables OAI testing and sanity check (default disabled)"
|
echo_success "-s : enables OAI testing and sanity check (default disabled)"
|
||||||
echo_success "-t : sets the eNB build target: ALL, SOFTMODEM,OAISIM,UNISIM (default ALL)"
|
echo_success "-t : sets the eNB build target: ALL, SOFTMODEM,OAISIM,UNISIM (default ALL)"
|
||||||
echo_success "-w : sets the hardware platform: EXMIMO, USRP, ETHERNET NONE, (default EXMIMO)"
|
echo_success "-w : sets the hardware platform: EXMIMO, USRP (also installs UHD driver), ETHERNET, NONE, (default EXMIMO)"
|
||||||
echo_success "-x : enables xforms (default disabled)"
|
echo_success "-x : enables xforms (default disabled)"
|
||||||
echo_success "-z : sets the default build options"
|
echo_success "-z : sets the default build options"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -297,6 +297,9 @@ build_enb(){
|
|||||||
echo_info "6. Checking the installation ..."
|
echo_info "6. Checking the installation ..."
|
||||||
|
|
||||||
check_install_oai_software
|
check_install_oai_software
|
||||||
|
if [ $HW = "USRP" ]; then
|
||||||
|
check_install_usrp_uhd_driver
|
||||||
|
fi
|
||||||
check_install_asn1c
|
check_install_asn1c
|
||||||
|
|
||||||
############################################
|
############################################
|
||||||
|
|||||||
Reference in New Issue
Block a user