Commit 3afaeb33 authored by Navid Nikaein's avatar Navid Nikaein

* update the oai build script


git-svn-id: http://svn.eurecom.fr/openair4G/trunk@5784 818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent e861524b
...@@ -15,8 +15,8 @@ ...@@ -15,8 +15,8 @@
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with OpenAirInterface.The full GNU General Public License is along with OpenAirInterface.The full GNU General Public License is
included in this distribution in the file called "COPYING". If not, included in this distribution in the file called "COPYING". If not,
see <http://www.gnu.org/licenses/>. see <http://www.gnu.org/licenses/>.
Contact Information Contact Information
OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Admin: openair_admin@eurecom.fr
......
...@@ -429,7 +429,9 @@ rlc_um_segment_10 (rlc_um_entity_t *rlc_pP,frame_t frameP) ...@@ -429,7 +429,9 @@ rlc_um_segment_10 (rlc_um_entity_t *rlc_pP,frame_t frameP)
pdu_remaining_size - sdu_mngt_p->sdu_remaining_size); pdu_remaining_size - sdu_mngt_p->sdu_remaining_size);
#endif #endif
#ifdef USER_MODE #ifdef USER_MODE
#ifndef EXMIMO
assert(1!=1); assert(1!=1);
#endif
#endif #endif
memcpy(data, data_sdu_p, sdu_mngt_p->sdu_remaining_size); memcpy(data, data_sdu_p, sdu_mngt_p->sdu_remaining_size);
// free SDU // free SDU
......
...@@ -911,7 +911,7 @@ rrc_ue_process_radioResourceConfigDedicated(module_id_t ue_mod_idP, frame_t fram ...@@ -911,7 +911,7 @@ rrc_ue_process_radioResourceConfigDedicated(module_id_t ue_mod_idP, frame_t fram
); );
for (cnt=0;cnt<radioResourceConfigDedicated->srb_ToAddModList->list.count;cnt++) { for (cnt=0;cnt<radioResourceConfigDedicated->srb_ToAddModList->list.count;cnt++) {
// connection_reestablishment_ind.num_srb+=1;
SRB_id = radioResourceConfigDedicated->srb_ToAddModList->list.array[cnt]->srb_Identity; SRB_id = radioResourceConfigDedicated->srb_ToAddModList->list.array[cnt]->srb_Identity;
LOG_D(RRC,"[UE %d]: Frame %d SRB config cnt %d (SRB%ld)\n",ue_mod_idP,frameP,cnt,SRB_id); LOG_D(RRC,"[UE %d]: Frame %d SRB config cnt %d (SRB%ld)\n",ue_mod_idP,frameP,cnt,SRB_id);
if (SRB_id == 1) { if (SRB_id == 1) {
......
ifdef EPC ifdef ENB_S1
ENABLE_ITTI=1 ENABLE_ITTI=1
USE_MME=R10 USE_MME=R10
DISABLE_XER_PRINT=1 DISABLE_XER_PRINT=1
......
...@@ -4,8 +4,8 @@ include $(OPENAIR_TARGETS)/Makerules ...@@ -4,8 +4,8 @@ include $(OPENAIR_TARGETS)/Makerules
default: lte-softmodem default: lte-softmodem
all: lte-softmodem lte-enb all: lte-softmodem lte-enb
include $(OPENAIR_TARGETS)/Makefile.common
include $(OPENAIR_TARGETS)/Makedirectives include $(OPENAIR_TARGETS)/Makedirectives
include $(OPENAIR_TARGETS)/Makefile.common
GCCVERSION = $(shell gcc --version | grep ^gcc | sed 's/^.* //g') GCCVERSION = $(shell gcc --version | grep ^gcc | sed 's/^.* //g')
ifeq "$(GCCVERSION)" "4.4.3" ifeq "$(GCCVERSION)" "4.4.3"
......
...@@ -44,14 +44,14 @@ fi ...@@ -44,14 +44,14 @@ fi
sudo rmmod nasmesh sudo rmmod nasmesh
sudo insmod $OPENAIR2_DIR/NAS/DRIVER/MESH/nasmesh.ko sudo insmod $OPENAIR2_DIR/NAS/DRIVER/MESH/nasmesh.ko
if [ "$1" = "eNB" ]; then #if [ "$1" = "eNB" ]; then
echo "bring up oai0 interface for enb" # echo "bring up oai0 interface for enb"
sudo ifconfig oai0 10.0.1.1 netmask 255.255.255.0 broadcast 10.0.1.255 # sudo ifconfig oai0 10.0.1.1 netmask 255.255.255.0 broadcast 10.0.1.255
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c0 -i0 -z0 -s 10.0.1.1 -t 10.0.1.9 -r 1 # $OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c0 -i0 -z0 -s 10.0.1.1 -t 10.0.1.9 -r 1
else #else
if [ "$1" = "UE" ]; then # if [ "$1" = "UE" ]; then
echo "bring up oai0 interface for UE" # echo "bring up oai0 interface for UE"
sudo ifconfig oai0 10.0.1.9 netmask 255.255.255.0 broadcast 10.0.1.255 # sudo ifconfig oai0 10.0.1.9 netmask 255.255.255.0 broadcast 10.0.1.255
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c0 -i0 -z0 -s 10.0.1.9 -t 10.0.1.1 -r 1 # $OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c0 -i0 -z0 -s 10.0.1.9 -t 10.0.1.1 -r 1
fi # fi
fi #fi
...@@ -3,8 +3,8 @@ include $(OPENAIR_TARGETS)/Makerules ...@@ -3,8 +3,8 @@ include $(OPENAIR_TARGETS)/Makerules
default: oaisim default: oaisim
include $(OPENAIR_TARGETS)/Makefile.common
include $(OPENAIR_TARGETS)/Makedirectives include $(OPENAIR_TARGETS)/Makedirectives
include $(OPENAIR_TARGETS)/Makefile.common
TOP_DIR = $(OPENAIR1_DIR) TOP_DIR = $(OPENAIR1_DIR)
OPENAIR1_TOP = $(OPENAIR1_DIR) OPENAIR1_TOP = $(OPENAIR1_DIR)
......
...@@ -194,7 +194,7 @@ def execute(oai, user, pw, host, logfile,logdir,debug): ...@@ -194,7 +194,7 @@ def execute(oai, user, pw, host, logfile,logdir,debug):
conf = '-a -c26' conf = '-a -c26'
trace = logdir + '/log_' + host + case + test + '.txt' trace = logdir + '/log_' + host + case + test + '.txt'
tee = ' 2>&1 | tee ' + trace tee = ' 2>&1 | tee ' + trace
oai.send_expect('./oaisim.rel8.' + host + ' ' + conf + tee, ' DL and UL loss rate below 10% ', 500) oai.send_expect('./oaisim.rel8.' + host + ' ' + conf + tee, ' DL and UL loss rate below 10 ', 500)
except log.err, e: except log.err, e:
log.fail(case, test, name, conf, e.value, diag, logfile,trace) log.fail(case, test, name, conf, e.value, diag, logfile,trace)
else: else:
......
...@@ -40,22 +40,28 @@ ROOT_UID=0 ...@@ -40,22 +40,28 @@ ROOT_UID=0
E_NOTROOT=67 E_NOTROOT=67
NUM_CPU=`cat /proc/cpuinfo | grep processor | wc -l` NUM_CPU=`cat /proc/cpuinfo | grep processor | wc -l`
OAI_INSTALLED=1 OAI_INSTALLED=1
PWD=`pwd`
check_for_root_rights() { check_for_root_rights() {
if [[ $EUID -ne 0 ]]; then if [[ $EUID -eq 0 ]]; then
echo_warning "Running as a sudoers" 1>&2 echo "Run as a sudoers"
return 1 return 1
else else
echo_success "Running as a root" 1>&2 echo "Run as a root"
return 0 return 0
fi fi
} }
output=$(check_for_root_rights 2>&1) output=$(check_for_root_rights)
result=$? result=$?
SUDO='' SUDO=''
PW=''
if [ $result -ne 1 ]; then if [ $result -ne 1 ]; then
SUDO='sudo -E' # echo "Please provide your password :"
# read -s PW
# SUDO="echo $PW | sudo -S -E "
SUDO="sudo -S -E "
else
echo "root"
fi fi
test_install_package() { test_install_package() {
...@@ -72,6 +78,17 @@ test_install_package() { ...@@ -72,6 +78,17 @@ test_install_package() {
fi fi
} }
test_uninstall_package() {
if [ $# -eq 1 ]; then
dpkg -s "$1" > /dev/null 2>&1 && {
$SUDO apt-get remove --assume-yes $1
echo "$1 is uninstalled."
} || {
echo "$1 is not installed."
}
fi
}
test_command_install_script() { test_command_install_script() {
# usage: test_command_install_script searched_binary script_to_be_invoked_if_binary_not_found # usage: test_command_install_script searched_binary script_to_be_invoked_if_binary_not_found
command -v $1 >/dev/null 2>&1 || { echo_warning "Program $1 is not installed. Trying installing it." >&2; bash $2; command -v $1 >/dev/null 2>&1 || { echo_fatal "Program $1 is not installed. Aborting." >&2; };} command -v $1 >/dev/null 2>&1 || { echo_warning "Program $1 is not installed. Trying installing it." >&2; bash $2; command -v $1 >/dev/null 2>&1 || { echo_fatal "Program $1 is not installed. Aborting." >&2; };}
...@@ -101,14 +118,15 @@ check_for_machine_type(){ ...@@ -101,14 +118,15 @@ check_for_machine_type(){
#################################################### ####################################################
make_certs(){ make_certs(){
echo "creating the certificate" # for certtificate generation
rm -rf demoCA rm -rf demoCA
mkdir demoCA mkdir -m 777 -p demoCA
echo 01 > demoCA/serial echo 01 > demoCA/serial
touch demoCA/index.txt touch demoCA/index.txt
echo "creating the certificate"
user=$(whoami) user=$(whoami)
HOSTNAME=$(hostname -f) HOSTNAME=$(hostname -f)
...@@ -137,17 +155,13 @@ make_certs(){ ...@@ -137,17 +155,13 @@ make_certs(){
check_install_freediamter(){ check_install_freediamter(){
if [ -f install_log.txt ]; then
$SUDO rm -f tmp/install_log.txt
fi
if [ ! -d /usr/local/src/ ]; then if [ ! -d /usr/local/src/ ]; then
echo "/usr/local/src/ doesn't exist please create one" echo "/usr/local/src/ doesn't exist please create one"
exit -1 exit -1
fi fi
if [ ! -w /usr/local/src/ ]; then if [ ! -w /usr/local/src/ ]; then
echo "You don't have permissions to write to /usr/local/src/, inslalling as a sudoer" echo "You don't have permissions to write to /usr/local/src/, installing as a sudoer"
# exit -1 # exit -1
fi fi
...@@ -164,10 +178,11 @@ check_install_freediamter(){ ...@@ -164,10 +178,11 @@ check_install_freediamter(){
if [ -d nettle-2.5 ]; then if [ -d nettle-2.5 ]; then
$SUDO rm -rf nettle-2.5/ $SUDO rm -rf nettle-2.5/
fi fi
$SUDO wget ftp://ftp.lysator.liu.se/pub/security/lsh/nettle-2.5.tar.gz $SUDO wget ftp://ftp.lysator.liu.se/pub/security/lsh/nettle-2.5.tar.gz
$SUDO gunzip nettle-2.5.tar.gz $SUDO gunzip nettle-2.5.tar.gz
echo "Uncompressing nettle archive" $SUDO echo "Uncompressing nettle archive"
$SUDO tar -xf nettle-2.5.tar $SUDO tar -xf nettle-2.5.tar
cd nettle-2.5/ cd nettle-2.5/
$SUDO ./configure --disable-openssl --enable-shared --prefix=/usr $SUDO ./configure --disable-openssl --enable-shared --prefix=/usr
...@@ -188,10 +203,12 @@ check_install_freediamter(){ ...@@ -188,10 +203,12 @@ check_install_freediamter(){
if [ -d gnutls-3.1.0/ ]; then if [ -d gnutls-3.1.0/ ]; then
$SUDO rm -rf gnutls-3.1.0/ $SUDO rm -rf gnutls-3.1.0/
fi fi
test_uninstall_package libgnutls-dev
$SUDO wget ftp://ftp.gnutls.org/gcrypt/gnutls/v3.1/gnutls-3.1.0.tar.xz $SUDO wget ftp://ftp.gnutls.org/gcrypt/gnutls/v3.1/gnutls-3.1.0.tar.xz
$SUDO tar -xf gnutls-3.1.0.tar.xz $SUDO tar -xf gnutls-3.1.0.tar.xz
echo "Uncompressing gnutls archive" echo "Uncompressing gnutls archive ($PWD)"
cd gnutls-3.1.0/ cd gnutls-3.1.0/
$SUDO ./configure --prefix=/usr $SUDO ./configure --prefix=/usr
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
...@@ -334,6 +351,9 @@ check_install_oai_software() { ...@@ -334,6 +351,9 @@ check_install_oai_software() {
test_install_package valgrind test_install_package valgrind
test_install_package vlan test_install_package vlan
test_install_package doxygen test_install_package doxygen
# uninstall some automatically installed packges
# we need a newer version
# test_uninstall_package libnettle4
fi fi
echo "$OPENAIR_TARGETS/bin/install_log.txt" echo "$OPENAIR_TARGETS/bin/install_log.txt"
...@@ -491,8 +511,8 @@ compile_epc() { ...@@ -491,8 +511,8 @@ compile_epc() {
compile_ltesoftmodem() { compile_ltesoftmodem() {
cd $OPENAIR_TARGETS/RT/USER cd $OPENAIR_TARGETS/RT/USER
if [ -f Makefile ]; then if [ -f Makefile ]; then
echo_success "Compiling for EXMIMO target (default)..." echo "Compiling for EXMIMO target (default)..."
echo_success "Compiling directives: $SOFTMODEM_DIRECTIVES" echo "Compiling directives: $SOFTMODEM_DIRECTIVES"
make cleanall > /dev/null 2>&1 make cleanall > /dev/null 2>&1
make $SOFTMODEM_DIRECTIVES make $SOFTMODEM_DIRECTIVES
make -j $NUM_CPU $SOFTMODEM_DIRECTIVES make -j $NUM_CPU $SOFTMODEM_DIRECTIVES
...@@ -512,9 +532,8 @@ compile_ltesoftmodem() { ...@@ -512,9 +532,8 @@ compile_ltesoftmodem() {
compile_oaisim() { compile_oaisim() {
cd $OPENAIR_TARGETS/SIMU/USER cd $OPENAIR_TARGETS/SIMU/USER
if [ -f Makefile ]; then if [ -f Makefile ]; then
echo_success "Compiling for oaisim target ..." echo "Compiling for oaisim target ($OAISIM_DIRECTIVES)"
echo_success "Compiling directives: $OAISIM_DIRECTIVES" make cleanall > /dev/null
make cleanall > /dev/null
make $OAISIM_DIRECTIVES make $OAISIM_DIRECTIVES
make -j $NUM_CPU $OAISIM_DIRECTIVES make -j $NUM_CPU $OAISIM_DIRECTIVES
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
...@@ -533,7 +552,7 @@ compile_oaisim() { ...@@ -533,7 +552,7 @@ compile_oaisim() {
compile_unisim() { compile_unisim() {
cd $OPENAIR1_DIR/SIMULATION/LTE_PHY cd $OPENAIR1_DIR/SIMULATION/LTE_PHY
if [ -f Makefile ]; then if [ -f Makefile ]; then
echo_success "Compiling for CHANNELSIM target ..." echo "Compiling for UNISIM target ..."
make cleanall make cleanall
make -j $NUM_CPU all make -j $NUM_CPU all
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
...@@ -634,6 +653,59 @@ check_for_mbmssim_executable() { ...@@ -634,6 +653,59 @@ check_for_mbmssim_executable() {
echo_error "Please make sure that the OAI mbmssim is compiled" echo_error "Please make sure that the OAI mbmssim is compiled"
fi fi
} }
################################################
# 1. check if the executable functions exist
###############################################
install_ltesoftmodem_() {
if [ $1 = "RTAI" ] ; then
if [ ! -f /tmp/init_rt_done.tmp ]; then
echo_warning "Step1: insert RTAI modules"
insmod /usr/realtime/modules/rtai_hal.ko > /dev/null 2>&1
insmod /usr/realtime/modules/rtai_sched.ko > /dev/null 2>&1
insmod /usr/realtime/modules/rtai_sem.ko > /dev/null 2>&1
insmod /usr/realtime/modules/rtai_fifos.ko > /dev/null 2>&1
insmod /usr/realtime/modules/rtai_mbx.ko > /dev/null 2>&1
touch /tmp/init_rt_done.tmp
chmod 666 /tmp/init_rt_done.tmp
else
echo_warning "RTAI modules already inserted"
fi
else
if [ $1 = "RT_PREEMPT" ]; then
echo_warning "Step1: setup RT_PREMMPT"
fi
fi
echo_warning "Step2: creating RTAI fifos"
for i in `seq 0 64`; do
have_rtfX=`ls /dev/ |grep -c rtf$$i`;
if [ "$$have_rtfX" -eq 0 ] ;then
mknod -m 666 /dev/rtf$$i c 150 $$i;
fi;
done
echo_warning "Step3: build lte-softmodemdrivers"
cd $OPENAIR_TARGETS/ARCH/EXMIMO/DRIVER/eurecom && make clean && make || exit 1
cd $OPENAIR_TARGETS/ARCH/EXMIMO/USERSPACE/OAI_FW_INIT && make clean && make || exit 1
if [ $2 = 0 ]; then
cd $OPENAIR2_DIR && make clean && make nasmesh_netlink.ko || exit 1
cd $OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL && make clean && make || exit 1
fi
echo_warning "Step4: setup RF card"
cd $OPENAIR_TARGETS/RT/USER
bash ./init_exmimo2.sh
}
install_oaisim() {
if [ $1 = 0 ]; then
cd $OPENAIR2_DIR && make clean && make nasmesh_netlink.ko || exit 1
cd $OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL && make clean && make || exit 1
fi
}
############################### ###############################
## echo and family ## echo and family
############################### ###############################
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
# OpenAirInterface is free software: you can redistribute it and/or modify # OpenAirInterface is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by # it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or # the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version. # (at your option) anylater version.
# #
# #
# OpenAirInterface is distributed in the hope that it will be useful, # OpenAirInterface is distributed in the hope that it will be useful,
...@@ -40,26 +40,23 @@ ...@@ -40,26 +40,23 @@
THIS_SCRIPT_PATH=$(dirname $(readlink -f $0)) THIS_SCRIPT_PATH=$(dirname $(readlink -f $0))
. $THIS_SCRIPT_PATH/build_helper.bash . $THIS_SCRIPT_PATH/build_helper.bash
################### #####################
# create a bin dir # create a bin dir
###################3 #####################
echo_warning "1. Creating the bin dir..." echo_warning "1. Creating the bin dir..."
rm -rf bin rm -rf bin
mkdir bin mkdir -m 777 -p bin
chmod 777 -R bin
build_date=`date +%Y_%m_%d` build_date=`date +%Y_%m_%d`
oai_build_date="oai_built_${build_date}" oai_build_date="oai_built_${build_date}"
touch bin/${oai_build_date} touch bin/${oai_build_date}
################################ ################################
# cleanup first # cleanup first
################################ ################################
echo_warning "2. Cleaning ..." echo_warning "2. Cleaning ..."
$SUDO kill -9 `ps -ef | grep oaisim | awk '{print $2}'` output=$($SUDO kill -9 `ps -ef | grep oaisim | awk '{print $2}'` )
$SUDO kill -9 `ps -ef | grep lte-softmodem | awk '{print $2}'` $SUDO kill -9 `ps -ef | grep lte-softmodem | awk '{print $2}'`
$SUDO kill -9 `ps -ef | grep dlsim | awk '{print $2}'` $SUDO kill -9 `ps -ef | grep dlsim | awk '{print $2}'`
$SUDO kill -9 `ps -ef | grep ulsim | awk '{print $2}'` $SUDO kill -9 `ps -ef | grep ulsim | awk '{print $2}'`
...@@ -81,22 +78,27 @@ fi ...@@ -81,22 +78,27 @@ fi
echo_warning "3. Setup the parameters" echo_warning "3. Setup the parameters"
HW="EXMIMO" # EXMIMO, USRP, NONE HW="EXMIMO" # EXMIMO, USRP, NONE
TARGET="NONE" # ALL, SOFTMODEM, OAISIM, UNISIM, NONE TARGET="ALL" # ALL, SOFTMODEM, OAISIM, UNISIM, NONE
EPC=1 ENB_S1=1
REL="REL8" # REL8, REL10 REL="REL8" # REL8, REL10
RT="RTAI" # RTAI, RT_PREMPT or RT_DISABLED RT="RTAI" # RTAI, RT_PREMPT or RT_DISABLED
DEBUG=0 DEBUG=0
ENB_CONFIG_FILE=$OPENAIR_TARGETS/"PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.conf" ENB_CONFIG_FILE=$OPENAIR_TARGETS/"PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.conf"
OAI_TEST=0 OAI_TEST=0
# script is not currently handling these params # script is not currently handling these params
EPC=0 # flag to build EPC
XFORMS=0 XFORMS=0
ITTI_ANALYZER=0 ITTI_ANALYZER=0
VCD_TIMING=0 VCD_TIMING=0
WIRESHARK=0 WIRESHARK=0
TIME_MEAS=0 TIME_MEAS=0
DEV=0
EMULATION_DEV_INTERFACE="eth0" EMULATION_DEV_INTERFACE="eth0"
EMULATION_MULTICAST_GROUP=1 EMULATION_MULTICAST_GROUP=1
...@@ -106,16 +108,10 @@ EMULATION_DEV_ADDRESS=`ifconfig $EMULATION_DEV_INTERFACE | grep 'inet addr:'| gr ...@@ -106,16 +108,10 @@ EMULATION_DEV_ADDRESS=`ifconfig $EMULATION_DEV_INTERFACE | grep 'inet addr:'| gr
# Check the PARAMETERS # Check the PARAMETERS
###################################### ######################################
echo_success "Parameters : HW=$HW, TARGET=$TARGET, ENB_S1=$ENB_S1, REL=$REL, RT=$RT, DEBUG=$DEBUG"
if [ $TARGET != "SOFTMODEM" ]; then
RT="RT_DISABLED"
HW="NONE"
fi
echo_success "Parameters : HW=$HW, TARGET=$TARGET, EPC=$EPC, REL=$REL, RT=$RT, DEBUG=$DEBUG"
echo_success "ENB_CONFIG_FILE: $ENB_CONFIG_FILE" echo_success "ENB_CONFIG_FILE: $ENB_CONFIG_FILE"
echo "Parameters : HW=$HW, TARGET=$TARGET, EPC=$EPC, REL=$REL, RT=$RT, DEBUG=$DEBUG" >> bin/${oai_build_date} echo "Parameters : HW=$HW, TARGET=$TARGET, ENB_S1=$ENB_S1, REL=$REL, RT=$RT, DEBUG=$DEBUG" >> bin/${oai_build_date}
echo "ENB_CONFIG_FILE: $ENB_CONFIG_FILE" >> bin/${oai_build_date} echo "ENB_CONFIG_FILE: $ENB_CONFIG_FILE" >> bin/${oai_build_date}
############################################ ############################################
...@@ -124,12 +120,12 @@ echo "ENB_CONFIG_FILE: $ENB_CONFIG_FILE" >> bin/${oai_build_date} ...@@ -124,12 +120,12 @@ echo "ENB_CONFIG_FILE: $ENB_CONFIG_FILE" >> bin/${oai_build_date}
echo_warning "4. building the compilation directives ..." echo_warning "4. building the compilation directives ..."
SOFTMODEM_DIRECTIVES="EPC=$EPC DEBUG=$DEBUG XFORMS=$XFORMS " SOFTMODEM_DIRECTIVES="ENB_S1=$ENB_S1 DEBUG=$DEBUG XFORMS=$XFORMS "
OAISIM_DIRECTIVES="EPC=$EPC DEBUG=$DEBUG XFORMS=$XFORMS " OAISIM_DIRECTIVES="ENB_S1=$ENB_S1 DEBUG=$DEBUG XFORMS=$XFORMS "
if [ $HW = "USRP" ]; then if [ $HW = "USRP" ]; then
SOFTMODEM_DIRECTIVES="$SOFTMODEM_DIRECTIVES USRP=1 " SOFTMODEM_DIRECTIVES="$SOFTMODEM_DIRECTIVES USRP=1 "
fi fi
if [ $EPC -eq 0 ]; then if [ $ENB_S1 -eq 0 ]; then
SOFTMODEM_DIRECTIVES="$SOFTMODEM_DIRECTIVES NAS=1 " SOFTMODEM_DIRECTIVES="$SOFTMODEM_DIRECTIVES NAS=1 "
OAISIM_DIRECTIVES="$OAISIM_DIRECTIVES NAS=1 " OAISIM_DIRECTIVES="$OAISIM_DIRECTIVES NAS=1 "
fi fi
...@@ -141,9 +137,13 @@ else ...@@ -141,9 +137,13 @@ else
OAISIM_DIRECTIVES="$OAISIM_DIRECTIVES Rel10=1 " OAISIM_DIRECTIVES="$OAISIM_DIRECTIVES Rel10=1 "
fi fi
if [ $RT = "RTAI" ]; then if [ $RT = "RTAI" ]; then
SOFTMODEM_DIRECTIVES="$SOFTMODEM_DIRECTIVES HARD_RT=1 " if [ ! -f /usr/realtime/modules ]; then
else SOFTMODEM_DIRECTIVES="$SOFTMODEM_DIRECTIVES HARD_RT=1 "
SOFTMODEM_DIRECTIVES="$SOFTMODEM_DIRECTIVES RTAI=0 " else
echo_success "RTAI doesn't seem to be installed"
RT="RT_PREMPT"
SOFTMODEM_DIRECTIVES="$SOFTMODEM_DIRECTIVES RTAI=0 "
fi
fi fi
output=$(check_for_machine_type 2>&1) output=$(check_for_machine_type 2>&1)
...@@ -244,32 +244,21 @@ else ...@@ -244,32 +244,21 @@ else
fi fi
############################################
# testing
############################################
if [ $OAI_TEST = 1 ]; then
echo_warning "8. Testing ..."
python $OPENAIR_TARGETS/TEST/OAI/test01.py
else
echo_warning "8. Bypassing the Tests ..."
fi
############################################ ############################################
# terminate # install
############################################ ############################################
echo_warning "9. Terminating ..." echo_warning "8. Installing ..."
if [ $softmodem_compiled = 0 ]; then if [ $softmodem_compiled = 0 ]; then
echo "target lte-softmodem built " echo "target lte-softmodem built "
echo "target lte-softmodem built " >> bin/${oai_build_date} echo "target lte-softmodem built " >> bin/${oai_build_date}
install_ltesoftmodem $RT $ENB_S1
fi fi
if [ $oaisim_compiled = 0 ]; then if [ $oaisim_compiled = 0 ]; then
echo "target oaisim built " echo "target oaisim built "
echo "target oaisim built " >> bin/${oai_build_date} echo "target oaisim built " >> bin/${oai_build_date}
install_oaisim $ENB_S1
fi fi
if [ $unisim_compiled = 0 ]; then if [ $unisim_compiled = 0 ]; then
echo "target unisim built " echo "target unisim built "
...@@ -279,7 +268,19 @@ fi ...@@ -279,7 +268,19 @@ fi
echo "build terminated, see logs is $OPENAIR_TARGETS/bin/install_log.txt" echo "build terminated, see logs is $OPENAIR_TARGETS/bin/install_log.txt"
############################################
# testing
############################################
if [ $OAI_TEST = 1 ]; then
echo_warning "9. Testing ..."
python $OPENAIR_TARGETS/TEST/OAI/test01.py
else
echo_warning "9. Bypassing the Tests ..."
fi
......
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