Commit e0704547 authored by kaltenbe's avatar kaltenbe

adding a new option --noS1 to build_script that will now either compile the...

adding a new option --noS1 to build_script that will now either compile the softmodem or oaisim with or without the S1 interface (instead of doing both of them)
also for the noS1 target the options -w -x -V -r are now passed from the build script to the CMakeList.txt file and does not need to be set manually anymore
fixed a bug for the EXMIMO tools build



git-svn-id: http://svn.eurecom.fr/openair4G/trunk@7706 818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent 2f3d6bc9
...@@ -96,6 +96,8 @@ Options ...@@ -96,6 +96,8 @@ Options
--install-system-files --install-system-files
Install OpenArInterface required files in Linux system Install OpenArInterface required files in Linux system
(will ask root password) (will ask root password)
--noS1
Compiles oaisim or lte-softmodem without S1 interface, using direct link to IP instead
Usage (first build): Usage (first build):
oaisim (eNB + UE): ./build_oai -I -g --oaisim -x --install-system-files oaisim (eNB + UE): ./build_oai -I -g --oaisim -x --install-system-files
Eurecom EXMIMO + COTS UE : ./build_oai -I -g --eNB --EPC -x --install-system-files Eurecom EXMIMO + COTS UE : ./build_oai -I -g --eNB --EPC -x --install-system-files
...@@ -190,6 +192,10 @@ function main() { ...@@ -190,6 +192,10 @@ function main() {
INSTALL_SYSTEM_FILES=1 INSTALL_SYSTEM_FILES=1
echo_info "Will copy OpenAirInterface files in Linux directories" echo_info "Will copy OpenAirInterface files in Linux directories"
shift;; shift;;
--noS1)
NOS1=1
echo_info "Will compile without S1 interface"
shift;;
-h | --help) -h | --help)
print_help print_help
exit 1;; exit 1;;
...@@ -264,44 +270,48 @@ function main() { ...@@ -264,44 +270,48 @@ function main() {
echo_info "3. building the compilation directives ..." echo_info "3. building the compilation directives ..."
DIR=$OPENAIR_DIR/cmake_targets DIR=$OPENAIR_DIR/cmake_targets
if [ "$NOS1" = "1" ] ; then
lte_build_dir=lte_noS1_build_oai
lte_exec=lte-softmodem-nos1
else
lte_build_dir=lte_build_oai
lte_exec=lte-softmodem
fi
if [ "$eNB" = "1" -o "$UE" = "1" ] ; then if [ "$eNB" = "1" -o "$UE" = "1" ] ; then
# LTE softmodem compilation # LTE softmodem compilation
[ "$CLEAN" = "1" ] && rm -rf $DIR/lte_build_oai/build [ "$CLEAN" = "1" ] && rm -rf $DIR/$lte_build_dir/build
mkdir -p $DIR/lte_build_oai/build mkdir -p $DIR/$lte_build_dir/build
cmake_file=$DIR/lte_build_oai/CMakeLists.txt cmake_file=$DIR/$lte_build_dir/CMakeLists.txt
echo "cmake_minimum_required(VERSION 2.8)" > $cmake_file echo "cmake_minimum_required(VERSION 2.8)" > $cmake_file
if [ "$NOS1" = "1" ] ; then
cat $DIR/$lte_build_dir/CMakeLists.template >> $cmake_file
fi
echo "set ( XFORMS $XFORMS )" >> $cmake_file echo "set ( XFORMS $XFORMS )" >> $cmake_file
echo "set ( RRC_ASN1_VERSION \"${REL}\")" >> $cmake_file echo "set ( RRC_ASN1_VERSION \"${REL}\")" >> $cmake_file
echo "set ( ENABLE_VCD_FIFO $VCD_TIMING )" >> $cmake_file echo "set ( ENABLE_VCD_FIFO $VCD_TIMING )" >> $cmake_file
echo "set ( RF_BOARD \"${HW}\")" >> $cmake_file echo "set ( RF_BOARD \"${HW}\")" >> $cmake_file
echo 'set(PACKAGE_NAME "\"lte-softmodem\"")' >> $cmake_file echo "set(PACKAGE_NAME \"${lte_exec}\")" >> $cmake_file
echo 'include(${CMAKE_CURRENT_SOURCE_DIR}/../CMakeLists.txt)' >> $cmake_file echo 'include(${CMAKE_CURRENT_SOURCE_DIR}/../CMakeLists.txt)' >> $cmake_file
cd $DIR/lte_build_oai/build cd $DIR/$lte_build_dir/build
cmake .. cmake ..
echo_info "Compiling LTE softmodem" echo_info "Compiling $lte_exec"
compilations \ compilations \
lte_build_oai lte-softmodem \ $lte_build_dir $lte_exec \
lte-softmodem $dbin/lte-softmodem.$REL $lte_exec $dbin/$lte_exec.$REL
# LTE softmodem (no S1 interface) compilation if [ "$NOS1" = "1" ] ; then
[ "$CLEAN" = "1" ] && rm -rf $DIR/lte_noS1_build_oai/build
mkdir -p $DIR/lte_noS1_build_oai/build
cd $DIR/lte_noS1_build_oai/build
cmake ..
echo_info "Compiling LTE softmodem (w/o S1 interface)"
compilations \ compilations \
lte_noS1_build_oai lte-softmodem-nos1 \ $lte_build_dir nasmesh \
lte-softmodem-nos1 $dbin/lte-softmodem-nos1
compilations \
lte_noS1_build_oai nasmesh \
CMakeFiles/nasmesh/nasmesh.ko $dbin/nasmesh.ko CMakeFiles/nasmesh/nasmesh.ko $dbin/nasmesh.ko
compilations \ compilations \
lte_noS1_build_oai rb_tool \ $lte_build_dir rb_tool \
rb_tool $dbin/rb_tool rb_tool $dbin/rb_tool
cp $OPENAIR_DIR/cmake_targets/tools/init_nas_nos1 $dbin cp $OPENAIR_DIR/cmake_targets/tools/init_nas_nos1 $dbin
fi fi
fi
if [ "$UE" = 1 ] ; then if [ "$UE" = 1 ] ; then
# ue_ip driver compilation # ue_ip driver compilation
...@@ -375,26 +385,54 @@ function main() { ...@@ -375,26 +385,54 @@ function main() {
if [ "$HW" = "EXMIMO" -a "$EPC" = "0" ] ; then if [ "$HW" = "EXMIMO" -a "$EPC" = "0" ] ; then
echo_info "Compiling Express MIMO 2 board drivers" echo_info "Compiling Express MIMO 2 board drivers"
mkdir -p $DIR/lte_noS1_build_oai/build mkdir -p $DIR/$lte_build_dir/build
cd $DIR/lte_noS1_build_oai/build cd $DIR/$lte_build_dir/build
cmake .. cmake ..
compilations \ compilations \
lte_noS1_build_oai openair_rf \ $lte_build_dir openair_rf \
CMakeFiles/openair_rf/openair_rf.ko $dbin/openair_rf.ko CMakeFiles/openair_rf/openair_rf.ko $dbin/openair_rf.ko
compilations \ compilations \
lte_noS1_build_oai updatefw \ $lte_build_dir updatefw \
updatefw $dbin/updatefw updatefw $dbin/updatefw
make -C $OPENAIR_DIR/cmake_targets/lte_noS1_build_oai/build oarf > $dlog/oarf.txt 2>&1 make -C $OPENAIR_DIR/cmake_targets/$lte_build_dir/build oarf > $dlog/oarf.txt 2>&1
cp $OPENAIR_DIR/cmake_targets/lte_noS1_build_oai/build/*.oct $dbin cp $OPENAIR_DIR/cmake_targets/$lte_build_dir/build/*.oct $dbin
if [ -s $dbin/oarf_config_exmimo.oct ] ; then
echo_success "oarf tools compiled" echo_success "oarf tools compiled"
else
echo_error "oarf tools compilation failed"
fi
cp $OPENAIR_DIR/cmake_targets/tools/init_exmimo2 $dbin cp $OPENAIR_DIR/cmake_targets/tools/init_exmimo2 $dbin
fi fi
if [ "$oaisim" = "1" ] ; then if [ "$oaisim" = "1" ] ; then
dconf=$OPENAIR_DIR/targets/bin dconf=$OPENAIR_DIR/targets/bin
if [ "$NOS1" = "1" ] ; then
oaisim_build_dir=oaisim_noS1_build_oai
oaisim_exec=oaisim_nos1
else
oaisim_build_dir=oaisim_build_oai
oaisim_exec=oaisim
fi
[ "$CLEAN" = "1" ] && rm -rf $DIR/at_commands/build echo_info "Compiling $oaisim_exec ($oaisim_build_dir)"
cmake_file=$DIR/$oaisim_build_dir/CMakeLists.txt
cp $DIR/$oaisim_build_dir/CMakeLists.template $cmake_file
echo "set ( XFORMS $XFORMS )" >> $cmake_file
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
echo 'include(${CMAKE_CURRENT_SOURCE_DIR}/../CMakeLists.txt)' >> $cmake_file
[ "$CLEAN" = "1" ] && rm -rf $DIR/$oaisim_build_dir/build
mkdir -p $DIR/$oaisim_build_dir/build
cd $DIR/$oaisim_build_dir/build
cmake ..
compilations \
$oaisim_build_dir $oaisim_exec \
$oaisim_exec $dbin/$oaisim_exec.$REL
if [ "$NOS1" != "1" ] ; then
[ "$CLEAN" = "1" ] && rm -rf $DIR/at_commands/build
echo_info "Compiling at_nas_ue" echo_info "Compiling at_nas_ue"
mkdir -p $DIR/at_commands/build mkdir -p $DIR/at_commands/build
cd $DIR/at_commands/build cd $DIR/at_commands/build
...@@ -403,22 +441,6 @@ function main() { ...@@ -403,22 +441,6 @@ function main() {
at_commands at_nas_ue \ at_commands at_nas_ue \
at_nas_ue $dbin/at_nas_ue at_nas_ue $dbin/at_nas_ue
echo_info "Compiling oaisim"
cmake_file=$DIR/oaisim_build_oai/CMakeLists.txt
cp $DIR/oaisim_build_oai/CMakeLists.template $cmake_file
echo "set ( XFORMS $XFORMS )" >> $cmake_file
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
echo 'include(${CMAKE_CURRENT_SOURCE_DIR}/../CMakeLists.txt)' >> $cmake_file
[ "$CLEAN" = "1" ] && rm -rf $DIR/oaisim_build_oai/build
mkdir -p $DIR/oaisim_build_oai/build
cd $DIR/oaisim_build_oai/build
cmake ..
compilations \
oaisim_build_oai oaisim \
oaisim $dbin/oaisim.$REL
# ue_ip driver compilation # ue_ip driver compilation
echo_info "Compiling UE specific part (ue_ip driver and usim tools)" echo_info "Compiling UE specific part (ue_ip driver and usim tools)"
compilations \ compilations \
...@@ -442,35 +464,22 @@ function main() { ...@@ -442,35 +464,22 @@ function main() {
else else
echo_warning "not generated UE NAS files: binaries not found" echo_warning "not generated UE NAS files: binaries not found"
fi fi
else
echo_info "Compiling oaisim_nos1"
cmake_file=$DIR/oaisim_noS1_build_oai/CMakeLists.txt
cp $DIR/oaisim_noS1_build_oai/CMakeLists.template $cmake_file
echo "set ( XFORMS $XFORMS )" >> $cmake_file
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
echo 'include(${CMAKE_CURRENT_SOURCE_DIR}/../CMakeLists.txt)' >> $cmake_file
[ "$CLEAN" = "1" ] && rm -rf $DIR/oaisim_noS1_build_oai/build
mkdir -p $DIR/oaisim_noS1_build_oai/build
cd $DIR/oaisim_noS1_build_oai/build
cmake ..
compilations \
oaisim_noS1_build_oai oaisim_nos1 \
oaisim_nos1 $dbin/oaisim_nos1.$REL
compilations \ compilations \
oaisim_noS1_build_oai rb_tool \ $oaisim_build_dir rb_tool \
rb_tool $dbin/rb_tool rb_tool $dbin/rb_tool
# nasmesh driver compilation # nasmesh driver compilation
compilations \ compilations \
oaisim_noS1_build_oai nasmesh \ $oaisim_build_dir nasmesh \
CMakeFiles/nasmesh/nasmesh.ko $dbin/nasmesh.ko CMakeFiles/nasmesh/nasmesh.ko $dbin/nasmesh.ko
#oai_nw_drv #oai_nw_drv
compilations \ compilations \
oaisim_noS1_build_oai oai_nw_drv \ $oaisim_build_dir oai_nw_drv \
CMakeFiles/oai_nw_drv/oai_nw_drv.ko $dbin/oai_nw_drv.ko CMakeFiles/oai_nw_drv/oai_nw_drv.ko $dbin/oai_nw_drv.ko
fi
cmake_file=$DIR/oaisim_mme_build_oai/CMakeLists.txt cmake_file=$DIR/oaisim_mme_build_oai/CMakeLists.txt
cp $DIR/oaisim_mme_build_oai/CMakeLists.template $cmake_file cp $DIR/oaisim_mme_build_oai/CMakeLists.template $cmake_file
......
cmake_minimum_required(VERSION 2.8)
set(XFORMS True)
set(RRC_ASN1_VERSION "Rel10")
set(ENABLE_VCD_FIFO False )
set(RF_BOARD "ETHERNET")
set(ENABLE_ITTI True) set(ENABLE_ITTI True)
set(ENABLE_USE_MME False) set(ENABLE_USE_MME False)
set(PDCP_USE_NETLINK True) set(PDCP_USE_NETLINK True)
...@@ -12,6 +7,3 @@ set(PDCP_USE_NETLINK_QUEUES False) ...@@ -12,6 +7,3 @@ set(PDCP_USE_NETLINK_QUEUES False)
set(LINUX True) set(LINUX True)
set(SECU False) set(SECU False)
set(NAS_UE False) set(NAS_UE False)
set(LOWLATENCY False)
set(PACKAGE_NAME "\"lte-softmodem-nos1\"")
include(${CMAKE_CURRENT_SOURCE_DIR}/../CMakeLists.txt)
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