further improve the oai build tool
git-svn-id: http://svn.eurecom.fr/openair4G/trunk@5974 818b1a75-f10b-46b9-bf7c-635c3b92a50f
This commit is contained in:
@@ -333,6 +333,10 @@ check_install_oai_software() {
|
|||||||
test_install_package sshfs
|
test_install_package sshfs
|
||||||
test_install_package subversion
|
test_install_package subversion
|
||||||
test_install_package valgrind
|
test_install_package valgrind
|
||||||
|
|
||||||
|
# TODO: install the USRP UHD packages
|
||||||
|
|
||||||
|
|
||||||
# uninstall some automatically installed packges
|
# uninstall some automatically installed packges
|
||||||
# we need a newer version
|
# we need a newer version
|
||||||
# test_uninstall_package libnettle4
|
# test_uninstall_package libnettle4
|
||||||
@@ -343,7 +347,6 @@ check_install_oai_software() {
|
|||||||
# check_install_freediamter
|
# check_install_freediamter
|
||||||
# fi
|
# fi
|
||||||
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ $OAI_INSTALLED = 1 ]; then
|
if [ $OAI_INSTALLED = 1 ]; then
|
||||||
touch ./.lock_oaibuild
|
touch ./.lock_oaibuild
|
||||||
@@ -371,6 +374,9 @@ check_install_oai_software() {
|
|||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
else
|
||||||
|
echo_info "skip the package installations"
|
||||||
|
fi
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -496,9 +502,7 @@ compile_ltesoftmodem() {
|
|||||||
cd $OPENAIR_TARGETS/RT/USER
|
cd $OPENAIR_TARGETS/RT/USER
|
||||||
if [ -f Makefile ]; then
|
if [ -f Makefile ]; then
|
||||||
echo "Compiling directives: $SOFTMODEM_DIRECTIVES"
|
echo "Compiling directives: $SOFTMODEM_DIRECTIVES"
|
||||||
if [ $1 = 1 ]; then
|
|
||||||
make cleanall > /dev/null 2>&1
|
make cleanall > /dev/null 2>&1
|
||||||
fi
|
|
||||||
make $SOFTMODEM_DIRECTIVES
|
make $SOFTMODEM_DIRECTIVES
|
||||||
make -j $NUM_CPU $SOFTMODEM_DIRECTIVES
|
make -j $NUM_CPU $SOFTMODEM_DIRECTIVES
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
@@ -518,9 +522,7 @@ compile_oaisim() {
|
|||||||
cd $OPENAIR_TARGETS/SIMU/USER
|
cd $OPENAIR_TARGETS/SIMU/USER
|
||||||
if [ -f Makefile ]; then
|
if [ -f Makefile ]; then
|
||||||
echo "Compiling for oaisim target ($OAISIM_DIRECTIVES)"
|
echo "Compiling for oaisim target ($OAISIM_DIRECTIVES)"
|
||||||
if [ $1 = 1 ]; then
|
|
||||||
make cleanall > /dev/null
|
make cleanall > /dev/null
|
||||||
fi
|
|
||||||
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
|
||||||
@@ -540,9 +542,7 @@ compile_unisim() {
|
|||||||
cd $OPENAIR1_DIR/SIMULATION/LTE_PHY
|
cd $OPENAIR1_DIR/SIMULATION/LTE_PHY
|
||||||
if [ -f Makefile ]; then
|
if [ -f Makefile ]; then
|
||||||
echo "Compiling for UNISIM target ..."
|
echo "Compiling for UNISIM target ..."
|
||||||
if [ $1 = 1 ]; then
|
|
||||||
make cleanall
|
make cleanall
|
||||||
fi
|
|
||||||
make -j $NUM_CPU all
|
make -j $NUM_CPU all
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
echo_error "Build unisim failed, returning"
|
echo_error "Build unisim failed, returning"
|
||||||
@@ -662,10 +662,6 @@ install_ltesoftmodem() {
|
|||||||
else
|
else
|
||||||
echo_warning " 8.1 RTAI modules already inserted"
|
echo_warning " 8.1 RTAI modules already inserted"
|
||||||
fi
|
fi
|
||||||
else
|
|
||||||
if [ $1 = "RT_PREEMPT" ]; then
|
|
||||||
echo_info " 8.1 setup RT_PREMMPT"
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
#HW
|
#HW
|
||||||
if [ $2 = "EXMIMO" ]; then
|
if [ $2 = "EXMIMO" ]; then
|
||||||
@@ -736,12 +732,12 @@ print_help(){
|
|||||||
echo_success "-b : enables S1 interface for eNB (default enabled)"
|
echo_success "-b : enables S1 interface for eNB (default enabled)"
|
||||||
echo_success "-c : enables clean OAI build (default disabled)"
|
echo_success "-c : enables clean OAI build (default disabled)"
|
||||||
echo_success "-d : enables debug mode (default disabled)"
|
echo_success "-d : enables debug mode (default disabled)"
|
||||||
echo_success "-e : sets realtime mode: RTAI, RT_PREEMPT, RT_DISABLED (default RTAI)"
|
echo_success "-e : sets realtime mode: RTAI, NONE (default NONE)"
|
||||||
echo_success "-m : enables build from the makefile (default disabled)"
|
echo_success "-m : enables build from the makefile (default disabled)"
|
||||||
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 sanity check (default disabled)"
|
echo_success "-s : enables OAI sanity check (default disabled)"
|
||||||
echo_success "-t : sets the build target: ALL, SOFTMODEM,OAISIM,UNISIM (default ALL)"
|
echo_success "-t : sets the build target: ALL, SOFTMODEM,OAISIM,UNISIM (default ALL)"
|
||||||
echo_success "-w : sets the hardware platform: EXMIMO, USRP, NONE, (default EXMIMO)"
|
echo_success "-w : sets the hardware platform: EXMIMO, USRP, 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"
|
||||||
}
|
}
|
||||||
|
|||||||
+42
-25
@@ -27,7 +27,7 @@
|
|||||||
#
|
#
|
||||||
################################################################################
|
################################################################################
|
||||||
# file build_oai.bash
|
# file build_oai.bash
|
||||||
# brief
|
# brief OAI automated build tool that can be used to install, compile, run OAI.
|
||||||
# author Navid Nikaein
|
# author Navid Nikaein
|
||||||
# company Eurecom
|
# company Eurecom
|
||||||
# email: navid.nikaein@eurecom.fr
|
# email: navid.nikaein@eurecom.fr
|
||||||
@@ -92,6 +92,7 @@ while getopts "bcdmsxzhe:w:r:t:" OPTION; do
|
|||||||
rm -rf ./.lock_oaibuild
|
rm -rf ./.lock_oaibuild
|
||||||
OAI_CLEAN=1
|
OAI_CLEAN=1
|
||||||
echo "setting clean flag to: $OAI_CLEAN"
|
echo "setting clean flag to: $OAI_CLEAN"
|
||||||
|
echo "check package installation, and recompile OAI"
|
||||||
;;
|
;;
|
||||||
d)
|
d)
|
||||||
DEBUG=1
|
DEBUG=1
|
||||||
@@ -138,7 +139,7 @@ while getopts "bcdmsxzhe:w:r:t:" OPTION; do
|
|||||||
TARGET="ALL"
|
TARGET="ALL"
|
||||||
ENB_S1=1
|
ENB_S1=1
|
||||||
REL="REL8"
|
REL="REL8"
|
||||||
RT="RTAI"
|
RT="NONE"
|
||||||
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
|
||||||
@@ -152,7 +153,7 @@ done
|
|||||||
#####################
|
#####################
|
||||||
# create a bin dir
|
# create a bin dir
|
||||||
#####################
|
#####################
|
||||||
echo_info "3. Creating the bin dir ..."
|
echo_info "1. Creating the bin dir ..."
|
||||||
rm -rf bin
|
rm -rf bin
|
||||||
mkdir -m 777 -p bin
|
mkdir -m 777 -p bin
|
||||||
|
|
||||||
@@ -288,18 +289,20 @@ oaisim_compiled=1
|
|||||||
unisim_compiled=1
|
unisim_compiled=1
|
||||||
|
|
||||||
if [ $TARGET = "ALL" ]; then
|
if [ $TARGET = "ALL" ]; then
|
||||||
echo "############# compile_ltesoftmodem #############"
|
echo "############# compile_ltesoftmodem #############" >> bin/install_log.txt
|
||||||
output=$(compile_ltesoftmodem $OAI_CLEAN )
|
output=$(compile_ltesoftmodem >> bin/install_log.txt 2>&1 )
|
||||||
softmodem_compiled=$?
|
softmodem_compiled=$?
|
||||||
check_for_ltesoftmodem_executable
|
check_for_ltesoftmodem_executable
|
||||||
|
echo_info "7.1 finished ltesoftmodem target : check the installation log file bin/install_log.txt"
|
||||||
|
|
||||||
echo "################ compile_oaisim #################"
|
echo "################ compile_oaisim #################" >> bin/install_log.txt
|
||||||
output=$(compile_oaisim $OAI_CLEAN )
|
output=$(compile_oaisim >> bin/install_log.txt 2>&1 )
|
||||||
oaisim_compiled=$?
|
oaisim_compiled=$?
|
||||||
check_for_oaisim_executable
|
check_for_oaisim_executable
|
||||||
|
echo_info "7.2 finished oaisim target : check the installation log file bin/install_log.txt"
|
||||||
|
|
||||||
echo "################## compile_unisim ##################"
|
echo "################## compile_unisim ##################" >> bin/install_log.txt
|
||||||
output=$(compile_unisim $OAI_CLEAN )
|
output=$(compile_unisim >> bin/install_log.txt 2>&1 )
|
||||||
unisim_compiled=$?
|
unisim_compiled=$?
|
||||||
check_for_dlsim_executable
|
check_for_dlsim_executable
|
||||||
check_for_ulsim_executable
|
check_for_ulsim_executable
|
||||||
@@ -308,24 +311,30 @@ if [ $TARGET = "ALL" ]; then
|
|||||||
check_for_pdcchsim_executable
|
check_for_pdcchsim_executable
|
||||||
check_for_pbchsim_executable
|
check_for_pbchsim_executable
|
||||||
check_for_mbmssim_executable
|
check_for_mbmssim_executable
|
||||||
|
echo_info "7.3 finished unisim target : check the installation log file bin/install_log.txt"
|
||||||
|
|
||||||
|
|
||||||
else
|
else
|
||||||
|
|
||||||
if [ $TARGET = "SOFTMODEM" ]; then
|
if [ $TARGET = "SOFTMODEM" ]; then
|
||||||
echo "################ compile_ltesoftmodem #################"
|
echo "############# compile_ltesoftmodem #############" >> bin/install_log.txt
|
||||||
output=$(compile_ltesoftmodem $OAI_CLEAN )
|
output=$(compile_ltesoftmodem >> bin/install_log.txt 2>&1 )
|
||||||
softmodem_compiled=$?
|
softmodem_compiled=$?
|
||||||
check_for_ltesoftmodem_executable
|
check_for_ltesoftmodem_executable
|
||||||
|
echo_info "7.1 finished ltesoftmodem target: check the installation log file bin/install_log.txt"
|
||||||
|
|
||||||
fi
|
fi
|
||||||
if [ $TARGET = "OAISIM" ]; then
|
if [ $TARGET = "OAISIM" ]; then
|
||||||
echo "################ compile_oaisim ###############"
|
echo "################ compile_oaisim #################" >> bin/install_log.txt
|
||||||
output=$(compile_oaisim $OAI_CLEAN )
|
output=$(compile_oaisim >> bin/install_log.txt 2>&1 )
|
||||||
oaisim_compiled=$?
|
oaisim_compiled=$?
|
||||||
check_for_oaisim_executable
|
check_for_oaisim_executable
|
||||||
|
echo_info "7.2 finished oaisim target: check the installation log file bin/install_log.txt"
|
||||||
|
|
||||||
fi
|
fi
|
||||||
if [ $TARGET = "UNISIM" ]; then
|
if [ $TARGET = "UNISIM" ]; then
|
||||||
echo "################ compile_unisim ###############"
|
echo "################## compile_unisim ##################" >> bin/install_log.txt
|
||||||
output=$(compile_unisim $OAI_CLEAN )
|
output=$(compile_unisim >> bin/install_log.txt 2>&1 )
|
||||||
unisim_compiled=$?
|
unisim_compiled=$?
|
||||||
check_for_dlsim_executable
|
check_for_dlsim_executable
|
||||||
check_for_ulsim_executable
|
check_for_ulsim_executable
|
||||||
@@ -334,6 +343,8 @@ else
|
|||||||
check_for_pdcchsim_executable
|
check_for_pdcchsim_executable
|
||||||
check_for_pbchsim_executable
|
check_for_pbchsim_executable
|
||||||
check_for_mbmssim_executable
|
check_for_mbmssim_executable
|
||||||
|
echo_info "7.3 finished unisim target: check the installation log file bin/install_log.txt"
|
||||||
|
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -345,33 +356,39 @@ fi
|
|||||||
echo_info "8. Installing ..."
|
echo_info "8. Installing ..."
|
||||||
|
|
||||||
if [ $softmodem_compiled = 0 ]; then
|
if [ $softmodem_compiled = 0 ]; then
|
||||||
echo_success "target lte-softmodem built "
|
echo_success "target lte-softmodem built and installed in the bin directory"
|
||||||
echo "target lte-softmodem built " >> bin/${oai_build_date}
|
echo "target lte-softmodem built and installed in the bin directory" >> bin/${oai_build_date}
|
||||||
output=$(install_ltesoftmodem $RT $HW $ENB_S1 )
|
output=$(install_ltesoftmodem $RT $HW $ENB_S1 )
|
||||||
fi
|
fi
|
||||||
if [ $oaisim_compiled = 0 ]; then
|
if [ $oaisim_compiled = 0 ]; then
|
||||||
echo_success "target oaisim built "
|
echo_success "target oaisim built and installed in the bin directory"
|
||||||
echo "target oaisim built " >> bin/${oai_build_date}
|
echo "target oaisim built and installed in the bin directory" >> bin/${oai_build_date}
|
||||||
output=$(install_oaisim $ENB_S1 )
|
output=$(install_oaisim $ENB_S1 )
|
||||||
fi
|
fi
|
||||||
if [ $unisim_compiled = 0 ]; then
|
if [ $unisim_compiled = 0 ]; then
|
||||||
echo_success "target unisim built "
|
echo_success "target unisim built and installed in the bin directory"
|
||||||
echo "target unisim built " >> bin/${oai_build_date}
|
echo "target unisim built and installed in the bin directory" >> bin/${oai_build_date}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo_info "build terminated, binaries are located in bin/"
|
echo_info "build terminated, binaries are located in bin/"
|
||||||
echo_info "build terminated, logs are located in bin/${oai_build_date}"
|
echo_info "build terminated, logs are located in bin/${oai_build_date} and bin/install_log.txt"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
############################################
|
############################################
|
||||||
# testing
|
# testing
|
||||||
############################################
|
############################################
|
||||||
|
|
||||||
if [ $OAI_TEST = 1 ]; then
|
if [ $OAI_TEST = 1 ]; then
|
||||||
echo_info "9. Testing ..."
|
echo_info "10. Testing ..."
|
||||||
python $OPENAIR_TARGETS/TEST/OAI/test01.py
|
python $OPENAIR_TARGETS/TEST/OAI/test01.py
|
||||||
else
|
else
|
||||||
echo_info "9. Bypassing the Tests ..."
|
echo_info "9. Bypassing the Tests ..."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
############################################
|
||||||
|
# run
|
||||||
|
############################################
|
||||||
|
echo_info "10. Running ... To be done"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user