Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-RAN
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wangjie
OpenXG-RAN
Commits
35bd7f34
Commit
35bd7f34
authored
Nov 06, 2014
by
Navid Nikaein
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
git-svn-id:
http://svn.eurecom.fr/openair4G/trunk@5979
818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent
abd23822
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
103 additions
and
25 deletions
+103
-25
targets/build_helper.bash
targets/build_helper.bash
+37
-15
targets/build_oai.bash
targets/build_oai.bash
+66
-10
No files found.
targets/build_helper.bash
View file @
35bd7f34
...
...
@@ -342,7 +342,7 @@ check_install_oai_software() {
fi
else
echo_info
"
skip the package installations
"
echo_info
"
All the required packages installed: skip
"
fi
}
...
...
@@ -425,11 +425,11 @@ check_install_epc_software() {
test_install_package libatlas-dev
test_install_package libblas
test_install_package libblas-dev
if
[
$MACHINE_ARCH
=
64
]
;
then
#
if [ $MACHINE_ARCH = 64 ]; then
test_install_package libconfig8-dev
else
test_install_package libconfig-dev
fi
#
else
#
test_install_package libconfig-dev
#
fi
test_install_package libforms-bin
test_install_package libforms-dev
test_install_package libgcrypt11-dev
...
...
@@ -445,7 +445,7 @@ check_install_epc_software() {
test_install_package libtasn1-3-dev
test_install_package libxml2
test_install_package libxml2-dev
test_install_package linux-headers-
`
uname
-r
`
#
test_install_package linux-headers-`uname -r`
test_install_package make
test_install_package openssh-client
test_install_package openssh-server
...
...
@@ -525,17 +525,24 @@ compile_hss() {
make
-j
$NUM_CPU
if
[
$?
-ne
0
]
;
then
echo_error
"Build failed, exiting"
exit
1
return
1
else
cp
-f
./openair-hss
$OPENAIR_TARGETS
/bin
return
0
fi
else
echo_error
"Configure failed, exiting"
exit
1
return
1
fi
}
compile_epc
()
{
cd
$OPENAIRCN_DIR
if
[
$1
=
1
]
;
then
echo_info
"build a clean EPC"
bash_exec
"rm -rf obj"
fi
OBJ_DIR
=
`
find
.
-maxdepth
1
-type
d
-iname
obj
*
`
if
[
!
-n
"
$OBJ_DIR
"
]
;
then
OBJ_DIR
=
"objs"
...
...
@@ -557,19 +564,22 @@ compile_epc() {
cd
./
$OBJ_DIR
fi
pkill oai_epc
pkill tshark
#
pkill oai_epc
#
pkill tshark
if
[
-f
Makefile
]
;
then
echo_success
"Compiling..."
make
-j
$NUM_CPU
if
[
$?
-ne
0
]
;
then
echo_error
"Build failed, exiting"
exit
1
return
1
else
cp
-f
./OAI_EPC/oai_epc
$OPENAIR_TARGETS
/bin
return
0
fi
else
echo_error
"Configure failed, exiting"
exit
1
return
1
fi
}
...
...
@@ -650,11 +660,18 @@ check_for_ltesoftmodem_executable() {
check_for_epc_executable
()
{
if
[
!
-f
$OPENAIRCN_DIR
/objs/OAI_EPC/oai_epc
]
;
then
echo_error
"Cannot find oai_epc executable object in directory
$OPENAIR
3_DIR
/OPENAIRMME
/objs/OAI_EPC/"
echo_error
"Cannot find oai_epc executable object in directory
$OPENAIR
CN_DIR
/objs/OAI_EPC/"
echo_error
"Please make sure you have compiled OAI EPC with --enable-standalone-epc option"
fi
}
check_for_hss_executable
()
{
if
[
!
-f
$OPENAIRCN_DIR
/OPENAIRHSS/objs/openair-hss
]
;
then
echo_error
"Cannot find openair-hss executable object in directory
$OPENAIRCN_DIR
/OPENAIRHSS/objs/"
echo_error
"Please make sure you have compiled OAI HSS"
fi
}
check_for_sgw_executable
()
{
if
[
!
-f
$OPENAIRCN_DIR
/objs/OAI_SGW/oai_sgw
]
;
then
echo_error
"Cannot find oai_sgw executable object in directory
$OPENAIR3_DIR
/OPENAIRMME/objs/OAI_SGW/"
...
...
@@ -787,10 +804,11 @@ create_hss_database(){
EXPECTED_ARGS
=
2
E_BADARGS
=
65
MYSQL
=
`
which mysql
`
rv
=
0
if
[
$#
-ne
$EXPECTED_ARGS
]
then
echo_fatal
"Usage:
$0
dbuser dbpass"
rv
=
1
fi
set_openair
...
...
@@ -800,6 +818,7 @@ create_hss_database(){
$MYSQL
-u
$1
--password
=
$2
-e
"
$SQL
"
if
[
$?
-ne
0
]
;
then
echo_error
"oai_db creation failed"
rv
=
1
else
echo_success
"oai_db creation succeeded"
fi
...
...
@@ -807,6 +826,7 @@ create_hss_database(){
$MYSQL
-u
$1
--password
=
$2
oai_db <
$OPENAIRCN_DIR
/OPENAIRHSS/db/oai_db.sql
if
[
$?
-ne
0
]
;
then
echo_error
"oai_db tables creation failed"
rv
=
1
else
echo_success
"oai_db tables creation succeeded"
fi
...
...
@@ -817,9 +837,11 @@ create_hss_database(){
$MYSQL
-u
$1
--password
=
$2
-e
"
$SQL
"
if
[
$?
-ne
0
]
;
then
echo_error
"hssadmin permissions failed"
rv
=
1
else
echo_success
"hssadmin permissions succeeded"
fi
return
rv
}
################################
...
...
targets/build_oai.bash
View file @
35bd7f34
...
...
@@ -407,6 +407,9 @@ build_enb(){
}
build_epc
(){
epc_compiled
=
1
echo_info
"Note: this scripts works only for Ubuntu 12.04"
######################################
...
...
@@ -418,23 +421,53 @@ build_epc(){
check_install_asn1c
if
[
$OAI_CLEAN
=
1
]
;
then
check_install_freediamter
else
if
[
!
-d
/usr/local/etc/freeDiameter
]
;
then
check_install_freediamter
fi
fi
check_s6a_certificate
###########################################
# configure and compile
##########################################
compile_epc
echo_info
"5. configure and compile epc"
output
=
$(
compile_epc
$OAI_CLEAN
>>
bin/install_log.txt 2>&1
)
epc_compiled
=
$?
check_for_epc_executable
echo_info
"finished epc target: check the installation log file bin/install_log.txt"
###########################################
# install the binary in bin
##########################################
echo_info
"6. install the binary file"
if
[
$epc_compiled
=
0
]
;
then
echo_success
"target epc built and installed in the bin directory"
echo
"target epc built and installed in the bin directory"
>>
bin/
${
oai_build_date
}
cp
-f
$OPENAIR_TARGETS
/PROJECTS/GENERIC-LTE-EPC/CONF/epc.generic.conf
$OPENAIR_TARGETS
/bin
fi
######################################
# run
######################################
echo_info
"7. run EPC (check the bin/epc.generic.conf params)"
sudo
bin/oai_epc
-c
bin/epc.generic.conf
-K
/tmp/itti.log
}
build_hss
(){
echo_info
"Note: this scripts works only for Ubuntu 12.04"
hss_compiled
=
1
echo_info
"Note: this scripts works only for Ubuntu 12.04"
######################################
# CHECK MISC SOFTWARES AND LIBS #
...
...
@@ -443,29 +476,52 @@ echo_info "Note: this scripts works only for Ubuntu 12.04"
check_install_hss_software
if
[
$OAI_CLEAN
=
1
]
;
then
check_install_freediamter
else
if
[
!
-d
/usr/local/etc/freeDiameter
]
;
then
check_install_freediamter
fi
fi
check_s6a_certificate
######################################
# compile HSS #
######################################
echo_info
"5.compile HSS"
compile_hss
output
=
$(
compile_hss
>>
bin/install_log.txt 2>&1
)
hss_compiled
=
$?
check_for_hss_executable
echo_info
"finished hss target: check the installation log file bin/install_log.txt"
######################################
# fill the HSS DB
######################################
echo_info
"5.compile HSS"
echo_info
"6.create HSS database (for EURECOM SIM CARDS)"
hss_db_created
=
1
output
=
$(
create_hss_database
)
hss_db_created
=
$?
######################################
# install hss
######################################
create_hss_database
echo_info
"6. install the binary file"
if
[
$hss_compiled
=
0
]
;
then
if
[
$hss_db_created
=
0
]
;
then
echo_success
"target hss built, DB created and installed in the bin directory"
echo
"target hss built, DB created, and installed in the bin directory"
>>
bin/
${
oai_build_date
}
else
echo_warning
"hss DB not created"
fi
cp
-f
$OPENAIRCN_DIR
/OPENAIRHSS/conf/hss.conf
$OPENAIR_TARGETS
/bin
fi
######################################
# LAUNCH HSS #
######################################
$OPENAIRCN_DIR
/OPENAIRHSS/objs/openair-hss
-c
$OPENAIRCN_DIR
/OPENAIRHSS/conf/hss.conf
echo_info
"7. run hss"
bin/openair-hss
-c
bin/hss.conf
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment