Commit e5b9466b authored by thomasl's avatar thomasl

More targets implemented

git-svn-id: http://svn.eurecom.fr/openair4G/trunk@6823 818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent eaa9d0fc
This diff is collapsed.
...@@ -80,17 +80,14 @@ Options ...@@ -80,17 +80,14 @@ Options
The configuration file to install The configuration file to install
-I | --install-external-packages -I | --install-external-packages
Installs required packages such as LibXML, asn1.1 compiler, freediameter, ... Installs required packages such as LibXML, asn1.1 compiler, freediameter, ...
This option will require root password
-g | --run-with-gdb -g | --run-with-gdb
Add debugging symbols to compilation directives Add debugging symbols to compilation directives
-eNB --eNB
Makes the eNB LTE softmodem Makes the eNB LTE softmodem
-UE --UE
Makes the UE softmodem Makes the UE softmodem
-oaisim --EPC
Makes the oaisim simulator
-unit_simulators
Makes the unitary tests Layer 1 simulators
-EPC
Makes the EPC Makes the EPC
-r | --3gpp-release -r | --3gpp-release
default is Rel10, default is Rel10,
...@@ -98,13 +95,22 @@ Options ...@@ -98,13 +95,22 @@ Options
-w | --hardware -w | --hardware
EXMIMO (Default), USRP, None EXMIMO (Default), USRP, None
Adds this RF board support (in external packages installation and in compilation) Adds this RF board support (in external packages installation and in compilation)
--oaisim
Makes the oaisim simulator
--phy_simulators
Makes the unitary tests Layer 1 simulators
--core_simulators
Makes the core security features unitary simulators
-s | --check -s | --check
runs a set of auto-tests based on simulators and several compilation tests runs a set of auto-tests based on simulators and several compilation tests
-V | --vcd -V | --vcd
Adds a debgging facility to the binary files: GUI with major internal synchronization events Adds a debgging facility to the binary files: GUI with major internal synchronization events
-x | --xforms -x | --xforms
Adds a software oscilloscope feature to the produced binaries Adds a software oscilloscope feature to the produced binaries
Typical Options for a quick startup with a COTS UE and Eurecom RF board: build_oai.bash -I -g -eNB -EPC -x' --install-system-files
Install OpenArInterface required files in Linux system
(will ask root password)
Typical Options for a quick startup with a COTS UE and Eurecom RF board: build_oai.bash -I -g -eNB -EPC -x --install-system-files'
} }
########################### ###########################
...@@ -142,20 +148,16 @@ clean_all_files() { ...@@ -142,20 +148,16 @@ clean_all_files() {
################################### ###################################
compilations() { compilations() {
cd $OPENAIR_DIR/cmake_targets/$1 cd $OPENAIR_DIR/cmake_targets/$1/build
{ {
[ "$CLEAN" = "1" ] && rm -rf build
mkdir -p build
cd build
rm -f $3 rm -f $3
cmake ..
make -j4 $2 make -j4 $2
} > $5 2>&1 } > $dlog/$2.$REL.txt 2>&1
if [ -s $3 ] ; then if [ -s $3 ] ; then
cp $3 $4 cp $3 $dbin/$2.$REL
echo_success "$6" echo_success "$2 compiled"
else else
echo_error "$7" echo_error "$2 compilation failed"
fi fi
} }
...@@ -164,6 +166,22 @@ run_tests() { ...@@ -164,6 +166,22 @@ run_tests() {
grep grep
} }
test_compile() {
mkdir -p $tdir/$1/build
cd $tdir/$1/build
{
cmake ..
rm -f $3
make -j4 $2
} > $tdir/log/$1.txt
if [ -s $3 ] ; then
cp $3 $tdir/bin/$3.$1
echo_success "$1 test compiled"
else
echo_error "$1 test compilation failed"
fi
}
run_compilation_autotests() { run_compilation_autotests() {
tdir=$OPENAIR_DIR/cmake_targets/autotests tdir=$OPENAIR_DIR/cmake_targets/autotests
mkdir -p $tdir/bin $tdir/log mkdir -p $tdir/bin $tdir/log
...@@ -173,71 +191,48 @@ run_compilation_autotests() { ...@@ -173,71 +191,48 @@ run_compilation_autotests() {
fi fi
compilations \ compilations \
test.0101 oaisim \ test.0101 oaisim \
oaisim $tdir/bin/oaisim.r8 \ oaisim $tdir/bin/oaisim.r8
$tdir/log/test0101.txt \
"test 0101:oaisim Rel8 passed" \
"test 0101:oaisim Rel8 failed"
compilations \ compilations \
test.0102 oaisim \ test.0102 oaisim \
oaisim $tdir/bin/oaisim.r8.nas \ oaisim $tdir/bin/oaisim.r8.nas
$tdir/log/test0102.oaisim.txt \
"test 0102:oaisim Rel8 nas passed" \
"test 0102:oaisim Rel8 nas failed"
compilations \ compilations \
test.0103 oaisim \ test.0103 oaisim \
oaisim $tdir/bin/oaisim.r8.rf \ oaisim $tdir/bin/oaisim.r8.rf
$tdir/log/test0103.txt \
"test 0103:oaisim rel8 rf passed" \
"test 0103:oaisim rel8 rf failed"
compilations \ compilations \
test.0104 dlsim \ test.0104 dlsim \
dlsim $tdir/bin/dlsim \ dlsim $tdir/bin/dlsim
$tdir/log/test0104.txt \
"test 0104:dlsim passed" \
"test 0104:dlsim failed"
compilations \ compilations \
test.0104 ulsim \ test.0104 ulsim \
ulsim $tdir/bin/ulsim \ ulsim $tdir/bin/ulsim
$tdir/log/test0105.txt \
"test 0105: ulsim passed" \
"test 0105: ulsim failed"
compilations \ compilations \
test.0106 oaisim \ test.0106 oaisim \
oaisim $tdir/bin/oaisim.r8.itti \ oaisim $tdir/bin/oaisim.r8.itti
$tdir/log/test0106.txt \
"test 0103:oaisim rel8 itti passed" \
"test 0103:oaisim rel8 itti failed"
compilations \ compilations \
test.0107 oaisim \ test.0107 oaisim \
oaisim $tdir/bin/oaisim.r10 \ oaisim $tdir/bin/oaisim.r10
$tdir/log/test0107.txt \
"test 0103:oaisim rel10 passed" \
"test 0103:oaisim rel10 failed"
compilations \ compilations \
test.0108 oaisim \ test.0108 oaisim \
oaisim $tdir/bin/oaisim.r10.itti \ oaisim $tdir/bin/oaisim.r10.itti
$tdir/log/test0108.txt \
"test 0108:oaisim rel10 itti passed" \
"test 0108:oaisim rel10 itti failed"
compilations \ compilations \
test.0114 oaisim \ test.0114 oaisim \
oaisim $tdir/bin/oaisim.r8.itti.ral \ oaisim $tdir/bin/oaisim.r8.itti.ral
$tdir/log/test0114.txt \
"test 0114:oaisim rel8 itti ral passed" \
"test 0114:oaisim rel8 itti ral failed"
compilations \ compilations \
test.0115 oaisim \ test.0115 oaisim \
oaisim $tdir/bin/oaisim.r10.itti.ral \ oaisim $tdir/bin/oaisim.r10.itti.ral
$tdir/log/test0115.txt \
"test 0114:oaisim rel10 itti ral passed" \
"test 0114:oaisim rel10 itti ral failed"
compilations \ compilations \
test.0102 nasmesh \ test.0102 nasmesh \
CMakeFiles/nasmesh/nasmesh.ko $tdir/bin/nasmesh.ko \ CMakeFiles/nasmesh/nasmesh.ko $tdir/bin/nasmesh.ko
$tdir/log/test0120.txt \
"test 0120: nasmesh.ko passed" \
"test 0120: nasmesk.ko failed"
} }
########################################## ##########################################
...@@ -414,11 +409,17 @@ check_install_oai_software() { ...@@ -414,11 +409,17 @@ check_install_oai_software() {
$SUDO apt-get install -y libgnutls-dev nettle-dev nettle-bin $SUDO apt-get install -y libgnutls-dev nettle-dev nettle-bin
fi fi
install_freediameter_from_source install_freediameter_from_source
check_install_asn1c install_asn1c_from_source
} }
check_install_asn1c(){ install_asn1c_from_source(){
$SUDO $OPENAIR_TARGETS/SCRIPTS/install_asn1c_0.9.24.modified.bash mkdir /tmp/asn1c-r1516
cd /tmp/asn1c-r1516
svn co https://github.com/vlm/asn1c/trunk /tmp/asn1c-r1516 -r 1516
patch -p0 < $OPENAIRCN_DIR/S1AP/MESSAGES/ASN1/asn1cpatch.p0
./configure
make
$SUDO make install
} }
################################################# #################################################
...@@ -429,17 +430,19 @@ compile_hss() { ...@@ -429,17 +430,19 @@ compile_hss() {
if [ "$CLEAN" = "1" ]; then if [ "$CLEAN" = "1" ]; then
echo_info "build a clean HSS" echo_info "build a clean HSS"
rm -rfv obj* m4 .autom4* configure rm -rf obj* m4 .autom4* configure
fi fi
echo_success "Invoking autogen" echo_success "Invoking autogen"
./autogen.sh || return 1 ./autogen.sh || return 1
mkdir -p objs ; cd objs mkdir -p objs ; cd objs
echo_success "Invoking configure" echo_success "Invoking configure"
./configure || return 1 ../configure || return 1
if [ -f Makefile ]; then if [ -f Makefile ]; then
echo_success "Compiling..." echo_success "Compiling..."
make -j4 make -j4
# seems a bug in hss compilation: run make twice to work around
make -j4
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
echo_error "Build failed, exiting" echo_error "Build failed, exiting"
return 1 return 1
...@@ -452,62 +455,27 @@ compile_hss() { ...@@ -452,62 +455,27 @@ compile_hss() {
return 1 return 1
} }
compile_nas_tools() {
export NVRAM_DIR=$OPENAIR_TARGETS/bin
cd $NVRAM_DIR
if [ ! -f /tmp/nas_cleaned ]; then
echo_success "make --directory=$OPENAIRCN_DIR/NAS/EURECOM-NAS/tools veryveryclean"
make --directory=$OPENAIRCN_DIR/NAS/EURECOM-NAS/tools veryveryclean
fi
echo_success "make --directory=$OPENAIRCN_DIR/NAS/EURECOM-NAS/tools all"
make --directory=$OPENAIRCN_DIR/NAS/EURECOM-NAS/tools all
rm .ue.nvram
rm .usim.nvram
touch /tmp/nas_cleaned
}
TDB() { TDB() {
if [ $2 = "USRP" ]; then if [ $2 = "USRP" ]; then
echo_info " 8.2 [USRP] " echo_info " 8.2 [USRP] "
fi fi
# ENB_S1
if [ $3 = 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
}
# arg1 is ENB_S1 'boolean'
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
else
compile_ue_ip_nw_driver
install_nas_tools
fi
}
install_nas_tools() { install_nas_tools() {
cd $OPENAIR_TARGETS/bin cd $1
if [ ! -f .ue.nvram ]; then if [ ! -f .ue.nvram ]; then
echo_success "generate .ue_emm.nvram .ue.nvram" echo_success "generate .ue_emm.nvram .ue.nvram"
$OPENAIRCN_DIR/NAS/EURECOM-NAS/bin/ue_data --gen ./ue_data --gen
fi fi
if [ ! -f .usim.nvram ]; then if [ ! -f .usim.nvram ]; then
echo_success "generate .usim.nvram" echo_success "generate .usim.nvram"
$OPENAIRCN_DIR/NAS/EURECOM-NAS/bin/usim_data --gen ./usim_data --gen
fi fi
$OPENAIRCN_DIR/NAS/EURECOM-NAS/bin/ue_data --print ./ue_data --print
$OPENAIRCN_DIR/NAS/EURECOM-NAS/bin/usim_data --print ./usim_data --print
} }
install_nasmesh(){ install_nasmesh(){
...@@ -537,8 +505,6 @@ create_hss_database(){ ...@@ -537,8 +505,6 @@ create_hss_database(){
echo_fatal "Usage: $0 dbuser dbpass hssuser hsspass databasename" echo_fatal "Usage: $0 dbuser dbpass hssuser hsspass databasename"
rv=1 rv=1
fi fi
set_openair_env
# removed % # removed %
#Q1="GRANT ALL PRIVILEGES ON *.* TO '$3'@'%' IDENTIFIED BY '$4' WITH GRANT OPTION;" #Q1="GRANT ALL PRIVILEGES ON *.* TO '$3'@'%' IDENTIFIED BY '$4' WITH GRANT OPTION;"
...@@ -553,7 +519,6 @@ create_hss_database(){ ...@@ -553,7 +519,6 @@ create_hss_database(){
echo_success "$3 permissions succeeded" echo_success "$3 permissions succeeded"
fi fi
Q1="CREATE DATABASE IF NOT EXISTS ${BTICK}$5${BTICK};" Q1="CREATE DATABASE IF NOT EXISTS ${BTICK}$5${BTICK};"
SQL="${Q1}" SQL="${Q1}"
$MYSQL -u $3 --password=$4 -e "$SQL" $MYSQL -u $3 --password=$4 -e "$SQL"
...@@ -564,7 +529,6 @@ create_hss_database(){ ...@@ -564,7 +529,6 @@ create_hss_database(){
echo_success "$5 creation succeeded" echo_success "$5 creation succeeded"
fi fi
# test if tables have been created # test if tables have been created
mysql -u $3 --password=$4 -e "desc $5.users" > /dev/null 2>&1 mysql -u $3 --password=$4 -e "desc $5.users" > /dev/null 2>&1
...@@ -577,7 +541,6 @@ create_hss_database(){ ...@@ -577,7 +541,6 @@ create_hss_database(){
echo_success "$5 tables creation succeeded" echo_success "$5 tables creation succeeded"
fi fi
fi fi
return 0 return 0
} }
...@@ -585,14 +548,12 @@ create_hss_database(){ ...@@ -585,14 +548,12 @@ create_hss_database(){
# set_openair_env # set_openair_env
############################### ###############################
set_openair_env(){ set_openair_env(){
fullpath=`readlink -f $BASH_SOURCE` fullpath=`readlink -f $BASH_SOURCE`
[ -f "/.$fullpath" ] || fullpath=`readlink -f $PWD/$fullpath` [ -f "/.$fullpath" ] || fullpath=`readlink -f $PWD/$fullpath`
openair_path=${fullpath%/cmake_targets/*} openair_path=${fullpath%/cmake_targets/*}
openair_path=${openair_path%/targets/*} openair_path=${openair_path%/targets/*}
openair_path=${openair_path%/openair-cn/*} openair_path=${openair_path%/openair-cn/*}
openair_path=${openair_path%/openair[123]/*} openair_path=${openair_path%/openair[123]/*}
export OPENAIR_DIR=$openair_path export OPENAIR_DIR=$openair_path
export OPENAIR_HOME=$openair_path export OPENAIR_HOME=$openair_path
export OPENAIR1_DIR=$openair_path/openair1 export OPENAIR1_DIR=$openair_path/openair1
...@@ -600,6 +561,5 @@ set_openair_env(){ ...@@ -600,6 +561,5 @@ set_openair_env(){
export OPENAIR3_DIR=$openair_path/openair3 export OPENAIR3_DIR=$openair_path/openair3
export OPENAIRCN_DIR=$openair_path/openair-cn export OPENAIRCN_DIR=$openair_path/openair-cn
export OPENAIR_TARGETS=$openair_path/targets export OPENAIR_TARGETS=$openair_path/targets
} }
This diff is collapsed.
...@@ -21,6 +21,7 @@ set ( ENABLE_USE_GTPU_IN_KERNEL True ) ...@@ -21,6 +21,7 @@ set ( ENABLE_USE_GTPU_IN_KERNEL True )
set ( ENABLE_USE_MME False ) set ( ENABLE_USE_MME False )
set ( ENABLE_VCD_FIFO False ) set ( ENABLE_VCD_FIFO False )
set ( ENB_MODE False ) set ( ENB_MODE False )
set ( EPC_BUILD True )
set ( EXMIMO_IOT False ) set ( EXMIMO_IOT False )
set ( HARD_RT False ) set ( HARD_RT False )
set ( JUMBO_FRAME False ) set ( JUMBO_FRAME False )
...@@ -37,7 +38,7 @@ set ( MIH_C_MEDIEVAL_EXTENSIONS False ) ...@@ -37,7 +38,7 @@ set ( MIH_C_MEDIEVAL_EXTENSIONS False )
set ( MSG_PRINT False ) set ( MSG_PRINT False )
set ( MU_RECEIVER False ) set ( MU_RECEIVER False )
set ( NAS_ADDRESS_FIX False ) set ( NAS_ADDRESS_FIX False )
set ( NAS_MME False ) set ( NAS_MME True )
set ( NAS_NETLINK False ) set ( NAS_NETLINK False )
set ( NAS_UE False ) set ( NAS_UE False )
set ( NB_ANTENNAS_RX "2" ) set ( NB_ANTENNAS_RX "2" )
......
...@@ -9,5 +9,6 @@ set(MU_RECIEVER Flase) ...@@ -9,5 +9,6 @@ set(MU_RECIEVER Flase)
set(RANDOM_BF False) set(RANDOM_BF False)
set(PBS_SIM False) set(PBS_SIM False)
set(PERFECT_CE False) set(PERFECT_CE False)
set(NAS_UE False)
include(${CMAKE_CURRENT_SOURCE_DIR}/../CMakeLists.txt) 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