Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
dyyu
openairinterface5G
Commits
19bfa12c
Commit
19bfa12c
authored
Apr 10, 2015
by
gauthier
Browse files
branch LG_PRE_RELEASE_0.3 reintegration
git-svn-id:
http://svn.eurecom.fr/openair4G/trunk@7108
818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent
8fbd1a22
Changes
16
Hide whitespace changes
Inline
Side-by-side
cmake_targets/tools/build_epc
0 → 100755
View file @
19bfa12c
#!/bin/bash
################################################################################
# OpenAirInterface
# Copyright(c) 1999 - 2014 Eurecom
#
# OpenAirInterface is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) anylater version.
#
#
# OpenAirInterface is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with OpenAirInterface.The full GNU General Public License is
# included in this distribution in the file called "COPYING". If not,
# see <http://www.gnu.org/licenses/>.
#
# Contact Information
# OpenAirInterface Admin: openair_admin@eurecom.fr
# OpenAirInterface Tech : openair_tech@eurecom.fr
# OpenAirInterface Dev : openair4g-devel@eurecom.fr
#
# Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE
#
################################################################################
# file build_epc
# brief
# author Lionel Gauthier
# company Eurecom
# email: lionel.gauthier@eurecom.fr
#
################################
# include helper functions
################################
THIS_SCRIPT_PATH
=
$(
dirname
$(
readlink
-f
$0
))
source
$THIS_SCRIPT_PATH
/build_helper
function
help
()
{
echo_error
" "
echo_error
"Usage: build_epc [OPTION]..."
echo_error
"Build the EPC executable."
echo_error
" "
echo_error
"Options:"
echo_error
"Mandatory arguments to long options are mandatory for short options too."
echo_error
" -c, --clean Clean the build generated files (build from scratch)"
echo_error
" -d, --debug Compile with debug informations."
echo_error
" -h, --help Print this help."
echo_error
" -H, --hss hostname HSS hostname (with FQDN), default is this host (hostname)."
echo_error
" -i, --check-installed-software Check installed software packages necessary to build and run EPC (support Ubuntu 14.04)."
echo_error
" -r, --realm realm Realm of the MME (if not specified, is extracted from this host FQDN)."
echo_error
" -s, --transport-sctp-only Diameter use SCTP only (TCP disabled)."
echo_error
" -S, --s6a-server MME act as a server on s6a interface (useful when HSS and MME/EPC run on the same host)."
echo_error
" -t, --transport-tcp-only Diameter use TCP only (SCTP disabled)."
echo_error
" -T, --transport-prefer-tcp Diameter prefer TCP."
echo_error
" -v, --verbose Build process verbose."
}
function
main
()
{
local
-i
clean
=
0
local
-i
verbose
=
0
local
-i
s6a_server
=
0
local
cmake_args
=
" "
local
make_args
=
"-j
$NUM_CPU
"
local
realm
=
""
local
hss_fqdn
=
""
local
hss_hostname
=
""
local
hss_ip
=
""
local
REL
=
"Rel10"
until
[
-z
"
$1
"
]
do
case
"
$1
"
in
-c
|
--clean
)
clean
=
1
echo
"Clean the build generated files (build from scratch)"
shift
;
;;
-d
|
--debug
)
cmake_args
=
"
$cmake_args
-DDEBUG=1"
echo
"Compile with debug informations"
shift
;
;;
-h
|
--help
)
help
shift
;
exit
0
;;
-H
|
--hss
)
hss_fqdn
=
$2
cmake_args
=
"
$cmake_args
-DHSS_FQDN=
$hss_fqdn
"
shift
2
;
;;
-i
|
--check-installed-software
)
echo
"Check installed software packages necessary to build and run EPC (support Ubuntu 14.04):"
check_install_epc_software
exit
0
;;
-r
|
--realm
)
echo
"Realm:
$2
"
realm
=
$2
cmake_args
=
"
$cmake_args
-DREALM=
$realm
"
shift
2
;
;;
-s
|
--transport-sctp-only
)
echo
"Diameter use SCTP (TCP disabled), this is the default option."
cmake_args
=
"
$cmake_args
-DTRANSPORT_option=No_TCP"
shift
;
;;
-S
|
--s6a-server
)
echo
"MME act as a server on s6a"
s6a_server
=
1
cmake_args
=
"
$cmake_args
-DMME_S6A_IS_SERVER=1"
shift
1
;
;;
-t
|
--transport-tcp-only
)
echo
"Diameter use TCP (SCTP disabled)."
cmake_args
=
"
$cmake_args
-DTRANSPORT_option=No_SCTP"
shift
;
;;
-T
|
--transport-prefer-tcp
)
echo
"Diameter prefer TCP (TCP, SCTP enabled)."
cmake_args
=
"
$cmake_args
-DTRANSPORT_PREFER_TCP_option=Prefer_TCP"
shift
;
;;
-v
|
--verbose
)
echo
"Make build process verbose"
cmake_args
=
"
$cmake_args
-DCMAKE_VERBOSE_MAKEFILE=ON"
make_args
=
"VERBOSE=1
$make_args
"
verbose
=
1
shift
;
;;
*
)
echo
"Unknown option
$1
"
help
exit
1
;;
esac
done
# extra arguments processing
if
[[
z
$hss_fqdn
=
z
]]
;
then
hss_fqdn
=
`
hostname
--fqdn
`
cmake_args
=
"
$cmake_args
-DHSS_FQDN=
$hss_fqdn
"
if
[[
z
$realm
=
z
]]
;
then
realm
=
$hss_fqdn
realm
=
${
realm
#*.
}
cmake_args
=
"
$cmake_args
-DREALM=
$realm
"
fi
else
if
[[
z
$realm
=
z
]]
;
then
realm
=
${
hss_fqdn
#*.
}
cmake_args
=
"
$cmake_args
-DREALM=
$realm
"
fi
fi
hss_hostname
=
${
hss_fqdn
%%.*
}
cmake_args
=
"
$cmake_args
-DHSS_HOSTNAME=
$hss_hostname
"
hss_ip
=
`
resolveip
--silent
$hss_hostname
`
if
[[
z
$hss_ip
=
z
]]
;
then
hss_ip
=
`
resolveip
--silent
$hss_fqdn
`
fi
if
[[
z
$hss_ip
=
z
]]
;
then
echo_abort
"Unable to get HSS IP addr of
$hss_fqdn
"
fi
cmake_args
=
"
$cmake_args
-DHSS_IP=
$hss_ip
"
set_openair_env
if
[[
$verbose
-eq
1
]]
;
then
cecho
"OPENAIR_DIR =
$OPENAIR_DIR
"
$green
fi
# for conf files copy in this bash script
if
[
-d
/usr/lib/freeDiameter
]
;
then
export
FREEDIAMETER_PREFIX
=
/usr
else
if
[
-d
/usr/local/lib/freeDiameter
]
;
then
export
FREEDIAMETER_PREFIX
=
/usr/local
else
echo_fatal
"FreeDiameter prefix not found, install freeDiameter if EPC, HSS"
fi
fi
local
dbin
=
$OPENAIR_DIR
/targets/bin
local
dlog
=
$OPENAIR_DIR
/cmake_targets/log
local
dconf
=
$OPENAIR_DIR
/targets/bin
mkdir
-m
777
-p
$dbin
$dlog
##############################################################################
# Compile userspace executable
##############################################################################
rm
-f
$OPENAIR_DIR
/targets/bin/mme_gw
cd
$OPENAIR_DIR
/cmake_targets/epc_build_oai
if
[
$clean
-ne
0
]
;
then
if
[[
$verbose
-eq
1
]]
;
then
echo
"Cleaning EPC"
fi
rm
-Rf
build 2>&1
rm
-Rf
$OPENAIR_TARGETS
/CMAKE/EPC/MME_GW/build 2>&1
rm
-f
/usr/local/etc/freeDiameter/mme
*
2>&1
rm
-f
/usr/local/etc/freeDiameter/epc
*
2>&1
rm
-f
/usr/etc/freeDiameter/mme
*
2>&1
rm
-f
/usr/etc/freeDiameter/epc
*
2>&1
rm
-f
$OPENAIR_DIR
/targets/bin/xt_GTPU
*
.ko 2>&1
(
cd
$OPENAIRCN_DIR
/GTPV1-U/GTPUAH
&&
make clean
)
(
cd
$OPENAIRCN_DIR
/GTPV1-U/GTPURH
&&
make clean
)
rm
-f
$OPENAIRCN_DIR
/GTPV1-U/GTPUAH/Bin/
*
2>&1
rm
-f
/lib/xtables/libxt_GTPU
*
.so 2>&1
mkdir
-m
777
-p
-v
build
fi
##############################################################################
# Compile kernel modules
##############################################################################
# NO CMAKE FOR THAT, THIS CODE CAN DISAPEAR
#cd $OPENAIRCN_DIR/GTPV1-U/GTPUAH;
#make
#if [ $? -ne 0 ]; then
# echo_error "Build GTPUAH module failed, exiting"
# return 1
#else
# $SUDO cp -pfv ./Bin/libxt_*.so /lib/xtables
# $SUDO cp -pfv ./Bin/*.ko $OPENAIR_TARGETS/bin
#fi
#cd $OPENAIRCN_DIR/GTPV1-U/GTPURH;
#make
#if [ $? -ne 0 ]; then
# echo_error "Build GTPURH module failed, exiting"
# return 1
#else
# $SUDO cp -pfv ./Bin/libxt_*.so /lib/xtables
# $SUDO cp -pfv ./Bin/*.ko $OPENAIR_TARGETS/bin
#fi
##############################################################################
# Compile EPC
##############################################################################
cd
$OPENAIR_DIR
/cmake_targets/epc_build_oai
#cd $OPENAIR_TARGETS/CMAKE/EPC/MME_GW
if
[
!
-d
./build
]
;
then
mkdir
-m
777
-p
-v
build
fi
cmake_file
=
./CMakeLists.txt
cp
$OPENAIR_DIR
/cmake_targets/epc_build_oai/CMakeLists.template
$cmake_file
echo
'include(${CMAKE_CURRENT_SOURCE_DIR}/../CMakeLists.txt)'
>>
$cmake_file
cd
./build
cmake
$cmake_args
..
#make $make_args -j $NUM_CPU
#make install
compilations
\
epc_build_oai mme_gw
\
mme_gw
$dbin
/mme_gw.
$REL
# Only integrated mme+sgw+pgw is operational today
# compilations \
# epc_build_oai oai_sgw \
# oai_sgw $dbin/oai_sgw.$REL
compilations
\
epc_build_oai xt_GTPUAH_lib
\
libxt_GTPUAH_lib.so
$dbin
compilations
\
epc_build_oai xt_GTPURH_lib
\
libxt_GTPURH_lib.so
$dbin
compilations
\
epc_build_oai xt_GTPURH
\
CMakeFiles/xt_GTPURH/xt_GTPURH.ko
$dbin
compilations
\
epc_build_oai xt_GTPUAH
\
CMakeFiles/xt_GTPUAH/xt_GTPUAH.ko
$dbin
echo_info
"Copying iptables libraries into system directory: /lib/xtables"
if
[
-f
$dbin
/libxt_GTPURH_lib.so
]
;
then
$SUDO
rm
-f
/lib/xtables/libxt_GTPURH.so /lib/xtables/libxt_GTPUAH.so
$SUDO
ln
-s
$dbin
/libxt_GTPURH_lib.so /lib/xtables/libxt_GTPURH.so
$SUDO
ln
-s
$dbin
/libxt_GTPUAH_lib.so /lib/xtables/libxt_GTPUAH.so
else
echo_fatal
"not installed GTP-U iptables: binaries not found"
fi
# Do EPC
if
[
-f
$OPENAIR_DIR
/cmake_targets/epc_build_oai/build/mme_fd.conf
]
;
then
cp
-uv
$OPENAIR_DIR
/cmake_targets/epc_build_oai/build/epc
*
.conf
$dconf
$SUDO
cp
-uv
$OPENAIR_DIR
/cmake_targets/epc_build_oai/build/mme_fd.conf
$FREEDIAMETER_PREFIX
/etc/freeDiameter
else
echo_fatal
"not installed EPC config files: not found"
fi
}
main
"
$@
"
cmake_targets/tools/build_helper
.bash
→
cmake_targets/tools/build_helper
View file @
19bfa12c
...
...
@@ -26,7 +26,7 @@
# Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE
#
################################################################################
# file build_
cmake.bash
# file build_
helper
# brief
# author Laurent Thomas
#
...
...
@@ -65,53 +65,7 @@ echo_warning() { cecho "$*" $yellow ;}
echo_success() { cecho "$*" $green ;}
echo_info() { cecho "$*" $blue ;}
print_help
()
{
echo_info
'
This program installs OpenAirInterface Software
You should have ubuntu 14.xx, updated, and the Linux kernel >= 3.14
Options
-h
This help
-c | --clean
Erase all files made by previous compilation, installation"
--clean-kernel
Erase previously installed features in kernel: iptables, drivers, ...
-I | --install-external-packages
Installs required packages such as LibXML, asn1.1 compiler, freediameter, ...
This option will require root password
--install-optional-packages
Install useful but not mandatory packages such as valgrind
-g | --run-with-gdb
Add debugging symbols to compilation directives
--eNB
Makes the eNB LTE softmodem
--UE
Makes the UE softmodem
--EPC
Makes the EPC
-r | --3gpp-release
default is Rel10,
Rel8 limits the implementation to 3GPP Release 8 version
-w | --hardware
EXMIMO (Default), USRP, None
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
runs a set of auto-tests based on simulators and several compilation tests
-V | --vcd
Adds a debgging facility to the binary files: GUI with major internal synchronization events
-x | --xforms
Adds a software oscilloscope feature to the produced binaries
--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'
}
###########################
# Cleaners
...
...
@@ -141,7 +95,7 @@ clean_kernel() {
clean_all_files() {
set_openair_env
dir=$OPENAIR_DIR/cmake_targets
rm
-rf
$dir
/log
$OPENAIR_DIR
/targets/bin
rm -rf $dir/log $OPENAIR_DIR/targets/bin
/*
rm -rf $dir/lte_build_oai $dir/lte-simulators/build
rm -rf $dir/epc_build_oai/build $dir/epc_build_oai/CMakeLists.txt
rm -rf $dir/oaisim_build_oai/build $dir/oaisim_build_oai/CMakeLists.txt
...
...
@@ -184,7 +138,7 @@ make_one_cert() {
make_certs(){
fqdn=$1
certs_dir
=
/usr/local/etc
/freeDiameter
certs_dir=
$FREEDIAMETER_PREFIX
/freeDiameter
# certificates are stored in diameter config directory
if [ ! -d $certs_dir ]; then
echo "Creating non existing directory: $certs_dir"
...
...
@@ -244,9 +198,9 @@ install_gnutls_from_source(){
rm -rf /tmp/gnutls-3.1.23.tar.xz /tmp/gnutls-3.1.23
}
install_freediameter_from_source
()
{
install_
1.1.5_
freediameter_from_source() {
cd /tmp
echo
"Downloading freeDiameter archive"
echo "Downloading
1.1.5
freeDiameter archive"
rm -rf /tmp/1.1.5.tar.gz* /tmp/freeDiameter-1.1.5
wget http://www.freediameter.net/hg/freeDiameter/archive/1.1.5.tar.gz
tar xzf 1.1.5.tar.gz
...
...
@@ -262,6 +216,24 @@ install_freediameter_from_source() {
rm -rf /tmp/1.1.5.tar.gz /tmp/freeDiameter-1.1.5
}
install_freediameter_from_source() {
cd /tmp
echo "Downloading 1.2.0 freeDiameter archive"
rm -rf /tmp/1.2.0.tar.gz* /tmp/freeDiameter-1.2.0
wget http://www.freediameter.net/hg/freeDiameter/archive/1.2.0.tar.gz
tar xzf 1.2.0.tar.gz
cd freeDiameter-1.2.0
patch -p1 < $OPENAIRCN_DIR/S6A/freediameter/freediameter-1.2.0.patch
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr ../
echo "Compiling freeDiameter"
make -j4
#make test
$SUDO make install
rm -rf /tmp/1.2.0.tar.gz /tmp/freeDiameter-1.2.0
}
check_install_usrp_uhd_driver(){
v=$(lsb_release -cs)
$SUDO apt-add-repository "deb http://files.ettus.com/binaries/uhd/repo/uhd/ubuntu/$v $v main"
...
...
@@ -339,6 +311,7 @@ check_install_oai_software() {
libxml2 \
libxml2-dev \
linux-headers-`uname -r` \
mscgen \
mysql-client \
mysql-server \
openssh-client \
...
...
@@ -456,7 +429,6 @@ set_openair_env(){
openair_path=${openair_path%/openair-cn/*}
openair_path=${openair_path%/openair[123]/*}
export OPENAIR_DIR=$openair_path
export
OPENAIR_HOME
=
$openair_path
export OPENAIR1_DIR=$openair_path/openair1
export OPENAIR2_DIR=$openair_path/openair2
export OPENAIR3_DIR=$openair_path/openair3
...
...
cmake_targets/tools/build_hss
0 → 100755
View file @
19bfa12c
#!/bin/bash
################################################################################
# OpenAirInterface
# Copyright(c) 1999 - 2014 Eurecom
#
# OpenAirInterface is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) anylater version.
#
#
# OpenAirInterface is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with OpenAirInterface.The full GNU General Public License is
# included in this distribution in the file called "COPYING". If not,
# see <http://www.gnu.org/licenses/>.
#
# Contact Information
# OpenAirInterface Admin: openair_admin@eurecom.fr
# OpenAirInterface Tech : openair_tech@eurecom.fr
# OpenAirInterface Dev : openair4g-devel@eurecom.fr
#
# Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE
#
################################################################################
# file build_hss
# brief
# author Lionel Gauthier
# company Eurecom
# email: lionel.gauthier@eurecom.fr
#
################################
# include helper functions
################################
THIS_SCRIPT_PATH
=
$(
dirname
$(
readlink
-f
$0
))
source
$THIS_SCRIPT_PATH
/build_helper
function
help
()
{
echo_error
" "
echo_error
"Usage: build_hss [OPTION]..."
echo_error
"Build the experimental HSS executable."
echo_error
" "
echo_error
"Options:"
echo_error
"Mandatory arguments to long options are mandatory for short options too."
echo_error
" -b, --s6a-bind-addr-list addr_list Optionaly, s6a server bind addresses can be specified here"
echo_error
" -c, --clean Clean the build generated files (build from scratch)"
echo_error
" -d, --debug Compile with debug informations."
echo_error
" -f, --fqdn fqdn HSS Fully Qualified Domain Name (if not specified default is
`
hostname
--fqdn
`
)."
echo_error
" -h, --help Print this help."
echo_error
" -i, --check-installed-software Check installed software packages necessary to build and run HSS (support Ubuntu 14.04)."
echo_error
" -k, --operator-key key Operator key of the HSS (if not specified, default is 11111111111111111111111111111111, see CMakelists.txt)."
echo_error
" -m, --connect-to-mme fqdn MME act as a S6A server, HSS as a client (reversed situation but allows MME and HSS be on the same host) ."
echo_error
" -r, --realm realm Realm of the HSS (optional parameter)."
echo_error
" -s, --transport-sctp-only Diameter use SCTP (TCP disabled)."
echo_error
" -t, --transport-tcp-only Diameter use TCP (SCTP disabled)."
echo_error
" -T, --transport-prefer-tcp Diameter prefer TCP."
echo_error
" -v, --verbose Build process verbose."
}
function
main
()
{
local
-i
clean
=
0
local
-i
verbose
=
0
local
cmake_args
=
" "
local
make_args
=
"-j
$NUM_CPU
"
local
realm
=
""
local
hss_hostname
=
""
local
mme_hostname
=
""
local
mme_ip
=
""
local
mme_fqdn
=
""
until
[
-z
"
$1
"
]
;
do
case
"
$1
"
in
-b
|
--s6a-bind-addr-list
)
echo
"S6A server bind addresses:
$2
"
cmake_args
=
"
$cmake_args
-DFD_SERVER_IP_BIND_LIST=
$2
"
shift
2
;
;;
-c
|
--clean
)
clean
=
1
echo
"Clean the build generated files (build from scratch)"
shift
;
;;
-d
|
--debug
)
cmake_args
=
"
$cmake_args
-DDEBUG=1"
echo
"Compile with debug informations"
shift
;
;;
-f
|
--fqdn
)
echo
"FQDN of the HSS:
$2
"
cmake_args
=
"
$cmake_args
-DHSS_FQDN=
$2
"
shift
2
;
;;
-h
|
--help
)
help
exit
0
;;
-i
|
--check-installed-software
)
echo
"Check installed software packages necessary to build and run HSS (support Ubuntu 14.04):"
check_install_hss_software
exit
0
;;
-I
|
--install-hss-files
)
echo
"Install HSS files: .conf files, database (if you want to reinstall database, drop it by hand before)."
cmake_args
=
"
$cmake_args
-DINSTALL_HSS_FILES=1"
shift
;
;;
-k
|
--operator-key
)
echo
"Operator key of the HSS:
$2
"
cmake_args
=
"
$cmake_args
-DOPERATOR_key=
$2
"
shift
2
;
;;
-m
|
--connect-to-mme
)
mme_fqdn
=
$2
shift
2
;
;;
-r
|
--realm
)
echo
"Realm of the HSS:
$2
"
cmake_args
=
"
$cmake_args
-DREALM=
$2
"
shift
2
;
;;
-s
|
--transport-sctp-only
)
echo
"Diameter use SCTP (TCP disabled), this is the default option."
cmake_args
=
"
$cmake_args
-DTRANSPORT_option=No_TCP"
shift
;
;;
-t
|
--transport-tcp-only
)
echo
"Diameter use TCP (SCTP disabled)."
cmake_args
=
"
$cmake_args
-DTRANSPORT_option=No_SCTP"
shift
;
;;
-T
|
--transport-prefer-tcp
)
echo
"Diameter prefer TCP (TCP, SCTP enabled)."
cmake_args
=
"
$cmake_args
-DTRANSPORT_PREFER_TCP_option=Prefer_TCP"
shift
;
;;
-v
|
--verbose
)
echo
"Make build process verbose"
cmake_args
=
"
$cmake_args
-DCMAKE_VERBOSE_MAKEFILE=ON"
make_args
=
"VERBOSE=1
$make_args
"
verbose
=
1
shift
;
;;
*
)
echo
"Unknown option
$1
"
help
exit
1
;;
esac
done
# extra arguments processing
if
[[
z
$hss_fqdn
=
z
]]
;
then
hss_fqdn
=
`
hostname
--fqdn
`
cmake_args
=
"
$cmake_args
-DHSS_FQDN=
$hss_fqdn
"
if
[[
z
$realm
=
z
]]
;
then
realm
=
$hss_fqdn
realm
=
${
realm
#*.
}
cmake_args
=
"
$cmake_args
-DREALM=
$realm
"
fi
fi
if
[[
z
$mme_fqdn
!=
z
]]
;
then
cmake_args
=
"
$cmake_args
-DMME_FQDN=
$mme_fqdn
"
mme_hostname
=
${
mme_fqdn
%%.*
}
cmake_args
=
"
$cmake_args
-DMME_HOSTNAME=
$mme_hostname
"
mme_ip
=
`
resolveip
--silent
$mme_hostname
`
if
[[
z
$mme_ip
=
z
]]
;
then
mme_ip
=
`
resolveip
--silent
$mme_fqdn
`
fi
if
[[
z
$mme_ip
=
z
]]
;
then
echo_fatal
"Unable to get MME IP addr of
$mme_fqdn
"
fi
cmake_args
=
"
$cmake_args
-DHSS_CONNECT_TO_MME=1 -DMME_IP=
$mme_ip
"
fi
set_openair_env
if
[[
$verbose
-eq
1
]]
;
then
cecho
"OPENAIR_DIR =
$OPENAIR_DIR
"
$green
fi
if
[[
z
$OPENAIR_DIR
=
z
]]
;
then
echo_fatal
"OPENAIR_DIR env variable not set, exiting"