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
oai
openairinterface5G
Commits
e5b9466b
Commit
e5b9466b
authored
Mar 17, 2015
by
thomasl
Browse files
More targets implemented
git-svn-id:
http://svn.eurecom.fr/openair4G/trunk@6823
818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent
eaa9d0fc
Changes
5
Hide whitespace changes
Inline
Side-by-side
cmake_targets/CMakeLists.txt
View file @
e5b9466b
...
...
@@ -115,7 +115,7 @@ set(CMAKE_BUILD_TYPE "RelWithDebInfo")
#
set
(
CMAKE_C_FLAGS
"
${
CMAKE_C_FLAGS
}
-msse4.2 -std=gnu99 -Wall -Wstrict-prototypes -fno-strict-aliasing -rdynamic -funroll-loops -Wno-packed-bitfield-compat -fPIC"
)
"
${
CMAKE_C_FLAGS
}
-msse4.2 -std=gnu99 -Wall -Wstrict-prototypes -fno-strict-aliasing -rdynamic -funroll-loops -Wno-packed-bitfield-compat -fPIC
"
)
# add autotools definitions that were maybe used!
set
(
CMAKE_C_FLAGS
"
${
CMAKE_C_FLAGS
}
-DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_FCNTL_H=1 -DHAVE_ARPA_INET_H=1 -DHAVE_SYS_TIME_H=1 -DHAVE_SYS_SOCKET_H=1 -DHAVE_STRERROR=1 -DHAVE_SOCKET=1 -DHAVE_MEMSET=1 -DHAVE_GETTIMEOFDAY=1 -DHAVE_STDLIB_H=1 -DHAVE_MALLOC=1 -DHAVE_LIBSCTP"
...
...
@@ -172,6 +172,7 @@ if (${ENABLE_ITTI})
${
ITTI_DIR
}
/timer.c
)
set
(
ITTI_LIB ITTI
)
set
(
GTPU_need_ITTI
${
OPENAIRCN_DIR
}
/GTPV1-U/gtpv1u_eNB.c
)
set
(
EXMIMO_IOT
)
endif
(
${
ENABLE_ITTI
}
)
...
...
@@ -357,6 +358,7 @@ add_boolean_option(ENABLE_USE_PCAP_FOR_SGI False "SGI option")
add_boolean_option
(
ENABLE_USE_RAW_SOCKET_FOR_SGI False
"As per name"
)
add_boolean_option
(
ENABLE_VCD_FIFO True
"Seems legacy: always true now"
)
add_boolean_option
(
ENB_MODE True
"???"
)
add_boolean_option
(
EPC_BUILD False
"???"
)
add_boolean_option
(
HARD_RT False
"???"
)
add_boolean_option
(
JUMBO_FRAME True
"???"
)
add_boolean_option
(
LARGE_SCALE False
"specific to oaisim: defines max eNB=2 and max UE=120"
)
...
...
@@ -430,9 +432,7 @@ if(ENB_MODE)
include_directories
(
"
${
OPENAIR2_DIR
}
/UTIL/LOG"
)
include_directories
(
"
${
OPENAIRCN_DIR
}
/COMMON"
)
include_directories
(
"
${
OPENAIRCN_DIR
}
/UTILS"
)
message
(
"openair2 first"
)
else
()
message
(
openair-cn first
)
include_directories
(
"
${
OPENAIRCN_DIR
}
/COMMON"
)
include_directories
(
"
${
OPENAIRCN_DIR
}
/UTILS"
)
include_directories
(
"
${
OPENAIR2_DIR
}
/COMMON"
)
...
...
@@ -453,7 +453,6 @@ include_directories("${OPENAIR3_DIR}/RAL-LTE/INTERFACE-802.21/INCLUDE")
include_directories
(
"
${
OPENAIR3_DIR
}
/RAL-LTE/LTE_RAL_ENB/INCLUDE"
)
include_directories
(
"
${
OPENAIR3_DIR
}
/RAL-LTE/LTE_RAL_UE/INCLUDE"
)
include_directories
(
"
${
OPENAIR_DIR
}
/common/utils"
)
include_directories
(
"
${
OPENAIR_DIR
}
/common/utils/collection/hashtable"
)
include_directories
(
"
${
OPENAIR_DIR
}
/common/utils/itti"
)
include_directories
(
"
${
OPENAIRCN_DIR
}
/NAS/EURECOM-NAS/src/api/network"
)
include_directories
(
"
${
OPENAIRCN_DIR
}
/NAS/EURECOM-NAS/src/include"
)
...
...
@@ -495,28 +494,13 @@ include_directories("${OPENAIRCN_DIR}/SGI")
include_directories
(
"
${
OPENAIRCN_DIR
}
/S6A"
)
include_directories
(
"
${
OPENAIR_DIR
}
"
)
# define where are the source files
##################################
#add_subdirectory (${OPENAIR_DIR} .)
# define libraries
#add_library(MathFunctions mysqrt.cxx)
function
(
add_whole_dir dir lib_name
)
file
(
GLOB mylist
${
dir
}
)
add_library
(
${
lib_name
}
${
mylist
}
)
endfunction
(
add_whole_dir
)
function
(
add_whole_tree dir lib_name
)
file
(
GLOB_RECURSE mylist
"
${
dir
}
/*.c"
)
add_library
(
${
lib_name
}
${
mylist
}
)
endfunction
(
add_whole_tree
)
# Utilities Library
################
add_library
(
HASHTABLE
${
OPENAIR_DIR
}
/
common/utils/collection/hashtable
/hashtable.c
${
OPENAIR_DIR
}
/
common/utils/collection/hashtable
/obj_hashtable.c
${
OPENAIR
CN
_DIR
}
/
UTILS/HASHTABLE
/hashtable.c
${
OPENAIR
CN
_DIR
}
/
UTILS/HASHTABLE
/obj_hashtable.c
)
include_directories
(
${
OPENAIRCN_DIR
}
/UTILS/HASHTABLE
)
set
(
UTIL_SRC
${
OPENAIR2_DIR
}
/UTIL/CLI/cli.c
...
...
@@ -585,7 +569,8 @@ add_library(SECU_CN ${SECU_CN_SRC})
# Scheduler
################################"
add_whole_dir
(
${
OPENAIR1_DIR
}
/SCHED/*.c SCHED_LIB
)
file
(
GLOB SCHED_SRC
${
OPENAIR1_DIR
}
/SCHED/*.c
)
add_library
(
SCHED_LIB
${
SCHED_SRC
}
)
# Layer 1
#############################
...
...
@@ -877,7 +862,6 @@ target_compile_definitions(xt_GTPURH_lib PRIVATE
-DIPTVERSION=
${
IPTVERSION
}
-DIPTABLES_VERSION_STRING=
${
IPTABLES_VERSION_STRING
}
)
set
(
SGI_DIR
${
OPENAIRCN_DIR
}
/SGI
)
set
(
SGI_SRC
${
SGI_DIR
}
/sgi_task.c
...
...
@@ -899,7 +883,6 @@ if (ENABLE_USE_NETFILTER_FOR_SGI)
endif
()
add_library
(
SGI
${
SGI_SRC
}
)
set
(
SCTP_SRC
${
OPENAIRCN_DIR
}
/SCTP/sctp_common.c
${
OPENAIRCN_DIR
}
/SCTP/sctp_eNB_task.c
...
...
@@ -928,6 +911,7 @@ add_library(S11
${
S11_DIR
}
/s11_sgw_session_manager.c
${
S11_DIR
}
/s11_sgw_bearer_manager.c
)
include_directories
(
${
S11_DIR
}
)
set
(
S6A_DIR
${
OPENAIRCN_DIR
}
/S6A
)
add_library
(
S6A
...
...
@@ -940,7 +924,6 @@ add_library(S6A
${
S6A_DIR
}
/s6a_up_loc.c
)
set
(
SGW_DIR
${
OPENAIRCN_DIR
}
/SGW-LITE
)
add_library
(
SGW
${
SGW_DIR
}
/spgw_config.c
...
...
@@ -951,7 +934,6 @@ add_library (SGW
${
SGW_DIR
}
/pgw_lite_paa.c
)
set
(
MME_DIR
${
OPENAIRCN_DIR
}
/MME_APP
)
add_library
(
MME_APP
${
MME_DIR
}
/mme_app_capabilities.c
...
...
@@ -964,7 +946,6 @@ add_library(MME_APP
${
MME_DIR
}
/s6a_2_nas_cause.c
)
set
(
NAS_SRC
${
OPENAIRCN_DIR
}
/NAS/EURECOM-NAS/src/
)
set
(
libnas_api_OBJS
${
NAS_SRC
}
api/mme/mme_api.c
...
...
@@ -973,7 +954,6 @@ set(libnas_api_OBJS
${
NAS_SRC
}
api/network/network_api.c
)
set
(
libnas_emm_OBJS
${
NAS_SRC
}
emm/Attach.c
${
NAS_SRC
}
emm/Authentication.c
...
...
@@ -1207,13 +1187,17 @@ set(libnas_usim_OBJS
${
NAS_SRC
}
api/usim/usim_api.c
)
set
(
libnas_OBJS
add_library
(
NAS_UE
${
OPENAIRCN_DIR
}
/NAS/nas_ue_task.c
)
set
(
libnas_OBJS
${
OPENAIRCN_DIR
}
/NAS/nas_itti_messaging.c
# ${OPENAIRCN_DIR}/NAS/nas_main.c
${
NAS_SRC
}
nas_parser.c
${
NAS_SRC
}
nas_proc.c
${
NAS_SRC
}
nas_user.c
${
NAS_SRC
}
nas_network.c
${
libnas_utils_OBJS
}
${
libnas_user_OBJS
}
${
libnas_usim_OBJS
}
...
...
@@ -1229,7 +1213,7 @@ set(libnas_OBJS
add_library
(
NAS
${
libnas_OBJS
}
)
if
(
NAS_UE
)
set
(
NAS_LIB NAS
)
set
(
NAS_LIB NAS
NAS_UE
)
endif
()
include_directories
(
${
NAS_SRC
}
)
...
...
@@ -1350,6 +1334,9 @@ if (${XFORMS})
set
(
XFORMS_LIBRARIES
"forms"
)
endif
(
${
XFORMS
}
)
# Hack on a test of asn1c version (already dirty)
add_definitions
(
-DASN1_MINIMUM_VERSION=924
)
#################################
# add executables for operation
#################################""
...
...
@@ -1369,7 +1356,7 @@ add_executable(lte-softmodem
${
OPENAIR_TARGETS
}
/SIMU/USER/init_lte.c
${
OPENAIR_TARGETS
}
/COMMON/create_tasks.c
${
OPENAIR1_DIR
}
/SIMULATION/ETH_TRANSPORT/netlink_init.c
${
GTP
V1U_DIR
}
/gtpv1u_eNB.c
${
GTP
U_need_ITTI
}
${
HW_SOURCE
}
${
RTAI_SOURCE
}
${
XFORMS_SOURCE
}
...
...
@@ -1390,10 +1377,11 @@ add_executable(oai_epc
${
OPENAIRCN_DIR
}
/OAI_EPC/oai_epc.c
${
GTPV1U_DIR
}
/gtpv1u_task.c
${
OPENAIRCN_DIR
}
/SCTP/sctp_primitives_server.c
${
OPENAIRCN_DIR
}
/NAS/nas_main.c
)
target_link_libraries
(
oai_epc
-Wl,--start-group
S1AP_LIB S1AP_EPC GTPV1U GTPV2C SCTP_SERVER UDP_SERVER SECU_CN SECU_OSA SGI S6A SGW MME_APP LFDS
${
NAS_LIB
}
${
ITTI_LIB
}
CN_UTILS HASHTABLE
NAS
S1AP_LIB S1AP_EPC GTPV1U GTPV2C SCTP_SERVER UDP_SERVER SECU_CN SECU_OSA SGI S6A SGW MME_APP LFDS
${
ITTI_LIB
}
CN_UTILS HASHTABLE
-Wl,--end-group
pthread m sctp rt crypt
${
CRYPTO_LIBRARIES
}
${
OPENSSL_LIBRARIES
}
${
NETTLE_LIBRARIES
}
${
CONFIG_LIBRARIES
}
fdproto fdcore
)
...
...
@@ -1407,7 +1395,7 @@ add_executable(oai_sgw
)
target_link_libraries
(
oai_sgw
-Wl,--start-group
GTPV1U SECU_CN SECU_OSA SGI S6A SGW UTIL LFDS
${
ITTI_LIB
}
GTPV1U SECU_CN SECU_OSA SGI S6A SGW
CN_
UTIL
S
LFDS
${
ITTI_LIB
}
-Wl,--end-group
pthread m sctp rt crypt
${
CRYPTO_LIBRARIES
}
${
OPENSSL_LIBRARIES
}
${
NETTLE_LIBRARIES
}
${
CONFIG_LIBRARIES
}
fdproto fdcore
)
...
...
@@ -1417,14 +1405,14 @@ target_link_libraries (oai_sgw
add_executable
(
usim_data
${
OPENAIRCN_DIR
}
/NAS/EURECOM-NAS/tools/usim_data.c
)
target_link_libraries
(
usim_data nettle crypto m
)
target_link_libraries
(
usim_data
${
NAS_LIB
}
UTIL
${
ITTI_LIB
}
LFDS pthread rt
nettle crypto m
)
# ???
#####################
add_executable
(
ue_data
${
OPENAIRCN_DIR
}
/NAS/EURECOM-NAS/tools/ue_data.c
)
target_link_libraries
(
ue_data nettle crypto m
)
target_link_libraries
(
ue_data
${
NAS_LIB
}
UTIL
${
ITTI_LIB
}
LFDS pthread rt
nettle crypto m
)
###################################"
# Addexecutables for tests
...
...
@@ -1433,28 +1421,29 @@ target_link_libraries (ue_data nettle crypto m)
# A all in one network simulator
################
add_executable
(
oaisim
${
rrc_h
}
${
s1ap_h
}
${
OPENAIR_BIN_DIR
}
/messages_xml.h
${
OPENAIR_TARGETS
}
/SIMU/USER/channel_sim.c
${
OPENAIR_TARGETS
}
/SIMU/USER/init_lte.c
${
OPENAIR_TARGETS
}
/SIMU/USER/oaisim_config.c
${
OPENAIR_TARGETS
}
/SIMU/USER/sinr_sim.c
${
OPENAIR_TARGETS
}
/SIMU/USER/cor_SF_sim.c
${
OPENAIR_TARGETS
}
/SIMU/USER/oaisim_functions.c
${
OPENAIR_TARGETS
}
/SIMU/USER/event_handler.c
${
OPENAIR_TARGETS
}
/SIMU/USER/oaisim.c
${
OPENAIR2_DIR
}
/RRC/NAS/nas_config.c
${
OPENAIR2_DIR
}
/RRC/NAS/rb_config.c
${
OPENAIR2_DIR
}
/UTIL/OMG/sumo.c
${
OPENAIR_TARGETS
}
/COMMON/create_tasks.c
${
HW_SOURCE
}
${
XFORMS_SOURCE
}
${
rrc_h
}
${
s1ap_h
}
${
OPENAIR_BIN_DIR
}
/messages_xml.h
${
OPENAIR_TARGETS
}
/SIMU/USER/channel_sim.c
${
OPENAIR_TARGETS
}
/SIMU/USER/init_lte.c
${
OPENAIR_TARGETS
}
/SIMU/USER/oaisim_config.c
${
OPENAIR_TARGETS
}
/SIMU/USER/sinr_sim.c
${
OPENAIR_TARGETS
}
/SIMU/USER/cor_SF_sim.c
${
OPENAIR_TARGETS
}
/SIMU/USER/oaisim_functions.c
${
OPENAIR_TARGETS
}
/SIMU/USER/event_handler.c
${
OPENAIR_TARGETS
}
/SIMU/USER/oaisim.c
${
OPENAIR2_DIR
}
/RRC/NAS/nas_config.c
${
OPENAIR2_DIR
}
/RRC/NAS/rb_config.c
${
OPENAIR2_DIR
}
/UTIL/OMG/sumo.c
${
GTPU_need_ITTI
}
${
OPENAIR_TARGETS
}
/COMMON/create_tasks.c
${
HW_SOURCE
}
${
XFORMS_SOURCE
}
)
target_include_directories
(
oaisim PUBLIC
${
OPENAIR_TARGETS
}
/SIMU/USER
)
target_link_libraries
(
oaisim
-Wl,--start-group
RRC_LIB S1AP_LIB S1AP_ENB GTPV1U SECU_CN UTIL SCTP_CLIENT UDP SCHED_LIB PHY LFDS L2
${
RAL_LIB
}
${
NAS_LIB
}
SIMU SIMU_ETH SECU_OSA
${
ITTI_LIB
}
${
MIH_LIB
}
RRC_LIB S1AP_LIB S1AP_ENB GTPV1U SECU_CN UTIL
HASHTABLE
SCTP_CLIENT UDP SCHED_LIB PHY LFDS L2
${
RAL_LIB
}
${
NAS_LIB
}
SIMU SIMU_ETH SECU_OSA
${
ITTI_LIB
}
${
MIH_LIB
}
-Wl,--end-group
)
target_link_libraries
(
oaisim
${
LIBXML2_LIBRARIES
}
${
LAPACK_LIBRARIES
}
)
target_link_libraries
(
oaisim pthread m
${
CONFIG_LIBRARIES
}
rt crypt
${
CRYPTO_LIBRARIES
}
${
OPENSSL_LIBRARIES
}
${
NETTLE_LIBRARIES
}
sctp
${
option_USRP
}
...
...
@@ -1495,7 +1484,7 @@ foreach(myExe s1ap
${
OPENAIRCN_DIR
}
/TEST/test_
${
myExe
}
.c
)
target_link_libraries
(
test_
${
myExe
}
-Wl,--start-group UTIL LFDS -Wl,--end-group fdproto fdcore
-Wl,--start-group
SECU_CN
UTIL LFDS -Wl,--end-group
m rt crypt
${
CRYPTO_LIBRARIES
}
${
OPENSSL_LIBRARIES
}
${
NETTLE_LIBRARIES
}
${
CONFIG_LIBRARIES
}
fdproto fdcore
)
endforeach
(
myExe
)
...
...
@@ -1570,7 +1559,6 @@ EXECUTE_PROCESS(COMMAND uname -r
OUTPUT_VARIABLE os_release
OUTPUT_STRIP_TRAILING_WHITESPACE
)
SET
(
module_build_path /lib/modules/
${
os_release
}
/build
)
message
(
"Kernel build path =
${
module_build_path
}
"
)
function
(
make_driver name dir
)
file
(
MAKE_DIRECTORY
${
OPENAIR_BIN_DIR
}
/
${
name
}
)
...
...
cmake_targets/build_helper.bash
View file @
e5b9466b
...
...
@@ -80,17 +80,14 @@ Options
The configuration file to install
-I | --install-external-packages
Installs required packages such as LibXML, asn1.1 compiler, freediameter, ...
This option will require root password
-g | --run-with-gdb
Add debugging symbols to compilation directives
-eNB
-
-eNB
Makes the eNB LTE softmodem
-UE
-
-UE
Makes the UE softmodem
-oaisim
Makes the oaisim simulator
-unit_simulators
Makes the unitary tests Layer 1 simulators
-EPC
--EPC
Makes the EPC
-r | --3gpp-release
default is Rel10,
...
...
@@ -98,13 +95,22 @@ Options
-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
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() {
###################################
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
cmake ..
make
-j4
$2
}
>
$
5
2>&1
}
>
$
dlog
/
$2
.
$REL
.txt
2>&1
if
[
-s
$3
]
;
then
cp
$3
$
4
echo_success
"
$
6
"
cp
$3
$
dbin
/
$2
.
$REL
echo_success
"
$
2
compiled
"
else
echo_error
"
$
7
"
echo_error
"
$
2
compilation failed
"
fi
}
...
...
@@ -164,6 +166,22 @@ run_tests() {
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
()
{
tdir
=
$OPENAIR_DIR
/cmake_targets/autotests
mkdir
-p
$tdir
/bin
$tdir
/log
...
...
@@ -173,71 +191,48 @@ run_compilation_autotests() {
fi
compilations
\
test.0101 oaisim
\
oaisim
$tdir
/bin/oaisim.r8
\
$tdir
/log/test0101.txt
\
"test 0101:oaisim Rel8 passed"
\
"test 0101:oaisim Rel8 failed"
oaisim
$tdir
/bin/oaisim.r8
compilations
\
test.0102 oaisim
\
oaisim
$tdir
/bin/oaisim.r8.nas
\
$tdir
/log/test0102.oaisim.txt
\
"test 0102:oaisim Rel8 nas passed"
\
"test 0102:oaisim Rel8 nas failed"
oaisim
$tdir
/bin/oaisim.r8.nas
compilations
\
test.0103 oaisim
\
oaisim
$tdir
/bin/oaisim.r8.rf
\
$tdir
/log/test0103.txt
\
"test 0103:oaisim rel8 rf passed"
\
"test 0103:oaisim rel8 rf failed"
oaisim
$tdir
/bin/oaisim.r8.rf
compilations
\
test.0104 dlsim
\
dlsim
$tdir
/bin/dlsim
\
$tdir
/log/test0104.txt
\
"test 0104:dlsim passed"
\
"test 0104:dlsim failed"
dlsim
$tdir
/bin/dlsim
compilations
\
test.0104 ulsim
\
ulsim
$tdir
/bin/ulsim
\
$tdir
/log/test0105.txt
\
"test 0105: ulsim passed"
\
"test 0105: ulsim failed"
ulsim
$tdir
/bin/ulsim
compilations
\
test.0106 oaisim
\
oaisim
$tdir
/bin/oaisim.r8.itti
\
$tdir
/log/test0106.txt
\
"test 0103:oaisim rel8 itti passed"
\
"test 0103:oaisim rel8 itti failed"
oaisim
$tdir
/bin/oaisim.r8.itti
compilations
\
test.0107 oaisim
\
oaisim
$tdir
/bin/oaisim.r10
\
$tdir
/log/test0107.txt
\
"test 0103:oaisim rel10 passed"
\
"test 0103:oaisim rel10 failed"
oaisim
$tdir
/bin/oaisim.r10
compilations
\
test.0108 oaisim
\
oaisim
$tdir
/bin/oaisim.r10.itti
\
$tdir
/log/test0108.txt
\
"test 0108:oaisim rel10 itti passed"
\
"test 0108:oaisim rel10 itti failed"
oaisim
$tdir
/bin/oaisim.r10.itti
compilations
\
test.0114 oaisim
\
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"
oaisim
$tdir
/bin/oaisim.r8.itti.ral
compilations
\
test.0115 oaisim
\
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"
oaisim
$tdir
/bin/oaisim.r10.itti.ral
compilations
\
test.0102 nasmesh
\
CMakeFiles/nasmesh/nasmesh.ko
$tdir
/bin/nasmesh.ko
\
$tdir
/log/test0120.txt
\
"test 0120: nasmesh.ko passed"
\
"test 0120: nasmesk.ko failed"
CMakeFiles/nasmesh/nasmesh.ko
$tdir
/bin/nasmesh.ko
}
##########################################
...
...
@@ -414,11 +409,17 @@ check_install_oai_software() {
$SUDO
apt-get
install
-y
libgnutls-dev nettle-dev nettle-bin
fi
install_freediameter_from_source
check_
install_asn1c
install_asn1c
_from_source
}
check_install_asn1c
(){
$SUDO
$OPENAIR_TARGETS
/SCRIPTS/install_asn1c_0.9.24.modified.bash
install_asn1c_from_source
(){
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() {
if
[
"
$CLEAN
"
=
"1"
]
;
then
echo_info
"build a clean HSS"
rm
-rf
v
obj
*
m4 .autom4
*
configure
rm
-rf
obj
*
m4 .autom4
*
configure
fi
echo_success
"Invoking autogen"
./autogen.sh
||
return
1
mkdir
-p
objs
;
cd
objs
echo_success
"Invoking configure"
./configure
||
return
1
.
./configure
||
return
1
if
[
-f
Makefile
]
;
then
echo_success
"Compiling..."
make
-j4
# seems a bug in hss compilation: run make twice to work around
make
-j4
if
[
$?
-ne
0
]
;
then
echo_error
"Build failed, exiting"
return
1
...
...
@@ -452,62 +455,27 @@ compile_hss() {
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
()
{
if
[
$2
=
"USRP"
]
;
then
echo_info
" 8.2 [USRP] "
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
()
{
cd
$
OPENAIR_TARGETS
/bin
cd
$
1
if
[
!
-f
.ue.nvram
]
;
then
echo_success
"generate .ue_emm.nvram .ue.nvram"
$OPENAIRCN_DIR
/NAS/EURECOM-NAS/bin
/ue_data
--gen
.
/ue_data
--gen
fi
if
[
!
-f
.usim.nvram
]
;
then
echo_success
"generate .usim.nvram"
$OPENAIRCN_DIR
/NAS/EURECOM-NAS/bin
/usim_data
--gen
.
/usim_data
--gen
fi
$OPENAIRCN_DIR
/NAS/EURECOM-NAS/bin
/ue_data
--print
$OPENAIRCN_DIR
/NAS/EURECOM-NAS/bin
/usim_data
--print
.
/ue_data
--print
.
/usim_data
--print
}
install_nasmesh
(){
...
...
@@ -537,8 +505,6 @@ create_hss_database(){
echo_fatal
"Usage:
$0
dbuser dbpass hssuser hsspass databasename"
rv
=
1
fi
set_openair_env
# removed %
#Q1="GRANT ALL PRIVILEGES ON *.* TO '$3'@'%' IDENTIFIED BY '$4' WITH GRANT OPTION;"
...
...
@@ -553,7 +519,6 @@ create_hss_database(){
echo_success
"
$3
permissions succeeded"
fi
Q1
=
"CREATE DATABASE IF NOT EXISTS
${
BTICK
}
$5
${
BTICK
}
;"
SQL
=
"
${
Q1
}
"
$MYSQL
-u
$3
--password
=
$4
-e
"
$SQL
"
...
...
@@ -564,7 +529,6 @@ create_hss_database(){
echo_success
"
$5
creation succeeded"
fi
# test if tables have been created
mysql
-u
$3
--password
=
$4
-e
"desc
$5
.users"
>
/dev/null 2>&1
...
...
@@ -577,7 +541,6 @@ create_hss_database(){
echo_success
"
$5
tables creation succeeded"
fi
fi
return
0
}
...
...
@@ -585,14 +548,12 @@ create_hss_database(){
# set_openair_env
###############################
set_openair_env
(){
fullpath
=
`
readlink
-f
$BASH_SOURCE
`
[
-f
"/.
$fullpath
"
]
||
fullpath
=
`
readlink
-f
$PWD
/
$fullpath
`
openair_path
=
${
fullpath
%/cmake_targets/*
}
openair_path
=
${
openair_path
%/targets/*
}
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_HOME
=
$openair_path
export
OPENAIR1_DIR
=
$openair_path
/openair1
...
...
@@ -600,6 +561,5 @@ set_openair_env(){
export
OPENAIR3_DIR
=
$openair_path
/openair3
export
OPENAIRCN_DIR
=
$openair_path
/openair-cn
export
OPENAIR_TARGETS
=
$openair_path
/targets
}
cmake_targets/build_oai.bash
View file @
e5b9466b
...
...
@@ -54,84 +54,80 @@ do
CLEAN
=
1
clean_all_files
echo_info
"Erased all previously producted files"
shift
;
;;
shift
;;
--clean-kernel
)
clean_kernel
<