Commit 5fcc9a61 authored by Cedric Roux's avatar Cedric Roux

bugfix: fix compilation of basic simulator

- conf2uedata compilation was not properly started
- success/failure of compilation of UE and eNB
  was not handled properly
parent 351ca5e7
......@@ -933,9 +933,11 @@ fi
if [ "$BASIC_SIMULATOR" = "1" ]; then
echo_info "Build basic simulator"
[ "$CLEAN" = "1" ] && rm -rf $OPENAIR_DIR/cmake_targets/basic_simulator
[ "$CLEAN" = "1" ] && rm -rf $OPENAIR_DIR/cmake_targets/nas_sim_tools/build
mkdir -p $OPENAIR_DIR/cmake_targets/basic_simulator
mkdir -p $OPENAIR_DIR/cmake_targets/basic_simulator/enb
mkdir -p $OPENAIR_DIR/cmake_targets/basic_simulator/ue
mkdir -p $OPENAIR_DIR/cmake_targets/nas_sim_tools/build
# enb
......@@ -962,6 +964,7 @@ fi
echo_info "Build eNB"
echo_info "logs are in $dlog/basic_simulator_enb.txt"
set +e
{
cd $OPENAIR_DIR/cmake_targets/basic_simulator/enb
cmake .
......@@ -969,11 +972,23 @@ fi
ln -sf libtcp_bridge_oai.so liboai_device.so
cd ../..
} > $dlog/basic_simulator_enb.txt 2>&1
set -e
if [ -s $OPENAIR_DIR/cmake_targets/basic_simulator/enb/lte-softmodem -a \
-s $OPENAIR_DIR/cmake_targets/basic_simulator/enb/libcoding.so -a \
-s $OPENAIR_DIR/cmake_targets/basic_simulator/enb/libparams_libconfig.so -a \
-s $OPENAIR_DIR/cmake_targets/basic_simulator/enb/libtcp_bridge_oai.so ] ; then
echo_success "eNB compiled"
check_warnings "$dlog/basic_simulator_enb.txt"
else
echo_error "eNB compilation failed"
exit 1
fi
# ue
echo_info "Compile conf2uedata"
cd $OPENAIR_DIR/cmake_targets/nas_sim_tools/build
eval $CMAKE_CMD
compilations \
nas_sim_tools conf2uedata \
conf2uedata $dbin/conf2uedata
......@@ -1004,6 +1019,7 @@ fi
echo_info "Build UE"
echo_info "logs are in $dlog/basic_simulator_ue.txt"
set +e
{
cd $OPENAIR_DIR/cmake_targets/basic_simulator/ue
cmake .
......@@ -1011,7 +1027,17 @@ fi
ln -sf libtcp_bridge_oai.so liboai_device.so
cd ../..
} > $dlog/basic_simulator_ue.txt 2>&1
set -e
if [ -s $OPENAIR_DIR/cmake_targets/basic_simulator/ue/lte-uesoftmodem -a \
-s $OPENAIR_DIR/cmake_targets/basic_simulator/ue/libcoding.so -a \
-s $OPENAIR_DIR/cmake_targets/basic_simulator/ue/libparams_libconfig.so -a \
-s $OPENAIR_DIR/cmake_targets/basic_simulator/ue/libtcp_bridge_oai.so ] ; then
echo_success "UE compiled"
check_warnings "$dlog/basic_simulator_ue.txt"
else
echo_error "UE compilation failed"
exit 1
fi
echo_info "Generate UE SIM data"
$OPENAIR_DIR/targets/bin/conf2uedata -c $OPENAIR_DIR/openair3/NAS/TOOLS/ue_eurecom_test_sfr.conf -o $OPENAIR_DIR/cmake_targets/basic_simulator/ue
......
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