Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-AMF
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
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
OpenXG
OpenXG-AMF
Commits
bdcd5f7c
Commit
bdcd5f7c
authored
Feb 17, 2022
by
chen2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改源
parent
753c9246
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
185 additions
and
103 deletions
+185
-103
build/scripts/build_amf
build/scripts/build_amf
+0
-1
build/scripts/build_helper.amf
build/scripts/build_helper.amf
+8
-4
build/scripts/build_helper.fb_folly
build/scripts/build_helper.fb_folly
+7
-2
build/scripts/!
build/scripts/!
+168
-94
etc/cpe_openxg.conf
etc/cpe_openxg.conf
+2
-2
No files found.
build/scripts/build_amf
View file @
bdcd5f7c
...
...
@@ -28,7 +28,6 @@ INSTALL_DIR=/usr/local/bin
################################
THIS_SCRIPT_PATH
=
$(
dirname
$(
readlink
-f
$0
))
source
${
THIS_SCRIPT_PATH
}
/build_helper.amf
#source ${THIS_SCRIPT_PATH}/build_helper.local
function
help
()
{
...
...
build/scripts/build_helper.amf
View file @
bdcd5f7c
...
...
@@ -50,7 +50,8 @@ install_fmt() {
cd /tmp
echo "Downloading fmt"
$SUDO rm -rf /tmp/fmt*
git clone https://github.com/fmtlib/fmt.git
#git clone https://github.com/fmtlib/fmt.git
git clone http://git.opensource5g.org/openxg/fmt.git
ret=$?;[[ $ret -ne 0 ]] && return $ret
cd fmt
cmake -DFMT_TEST=FALSE .
...
...
@@ -84,7 +85,8 @@ install_spdlog_from_git() {
if [[ $prompt =~ [yY](es)* ]]
then
GIT_URL=https://github.com/gabime/spdlog.git
#GIT_URL=https://github.com/gabime/spdlog.git
GIT_URL=http://git.opensource5g.org/openxg/spdlog.git
echo "Install spdlog from $GIT_URL"
pushd $OPENAIRCN_DIR/build/ext
echo "Downloading spdlog"
...
...
@@ -123,7 +125,8 @@ install_pistache_from_git() {
if [[ $prompt =~ [yY](es)* ]]
then
GIT_URL=https://github.com/oktal/pistache.git
#GIT_URL=https://github.com/oktal/pistache.git
GIT_URL=http://git.opensource5g.org/openxg/pistache.git
echo "Install Pistache from $GIT_URL"
pushd $OPENAIRCN_DIR/build/ext
echo "Downloading Pistache"
...
...
@@ -168,7 +171,8 @@ install_nlohmann_from_git() {
if [[ $prompt =~ [yY](es)* ]]
then
GIT_URL=https://github.com/nlohmann/json.git
#GIT_URL=https://github.com/nlohmann/json.git
GIT_URL=http://git.opensource5g.org/openxg/json.git
echo "Install Nlohmann Json from $GIT_URL"
pushd $OPENAIRCN_DIR/build/ext
echo "Downloading Nlohmann"
...
...
build/scripts/build_helper.fb_folly
View file @
bdcd5f7c
...
...
@@ -79,7 +79,11 @@ install_fb_folly_from_source(){
libdwarf-dev
ret=$?;[[ $ret -ne 0 ]] && return $ret
wget https://github.com/google/googletest/archive/release-1.8.0.tar.gz && \
# wget https://github.com/google/googletest/archive/release-1.8.0.tar.gz && \
cd /tmp
git clone http://git.opensource5g.org/openxg/openxg-cnlibs.git
cd /tmp/openxg-cnlibs/
tar zxf release-1.8.0.tar.gz && \
rm -f release-1.8.0.tar.gz && \
cd googletest-release-1.8.0 && \
...
...
@@ -92,7 +96,8 @@ install_fb_folly_from_source(){
$SUDO rm -rf /tmp/folly
git clone https://github.com/facebook/folly.git
#git clone https://github.com/facebook/folly.git
git clone http://git.opensource5g.org/openxg/folly.git
ret=$?;[[ $ret -ne 0 ]] && popd && return $ret
cd folly
mkdir _build && cd _build
...
...
build/scripts/
build_helper.local
→
build/scripts/
!
View file @
bdcd5f7c
# file build_helper.local
################################################################################
# Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The OpenAirInterface Software Alliance licenses this file to You under
# the OAI Public License, Version 1.1 (the "License"); you may not use this file
# except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.openairinterface.org/?page_id=698
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#-------------------------------------------------------------------------------
# For more information about the OpenAirInterface (OAI) Software Alliance:
# contact@openairinterface.org
################################################################################
# file build_helper.amf
# brief
#
#######################################
################################
# include helper functions
################################
SCRIPT=$(readlink -f ${BASH_SOURCE})
THIS_SCRIPT_PATH=`dirname $SCRIPT`
source $THIS_SCRIPT_PATH/build_helper
source $THIS_SCRIPT_PATH/build_helper.fb_folly
#--------
openxg-cnlibs
-----------------------------------------------------------
#--------
------------
-----------------------------------------------------------
#arg1 is force (0 or 1) (no interactive script)
#arg2 is debug (0 or 1) (install debug libraries)
install_
cnlibs
() {
install_
fmt
() {
if [ $1 -eq 0 ]; then
read -p "Do you want to install open-source
cnlibs
for C++ ? <y/N> " prompt
read -p "Do you want to install open-source
formatting library
for C++ ? <y/N> " prompt
OPTION=""
else
prompt='y'
OPTION="-y"
fi
if [ $2 -eq 0 ]; then
debug=0
else
debug=1
fi
echo "Install
cnlibs
from source"
echo "Install
fmt
from source"
##----------------------------------------------------------------
if [[ $prompt =~ [yY](es)* ]]
then
cd /tmp
echo "Downloading cnlibs"
$SUDO rm -rf /tmp/openxg-cnlibs*
git clone http://git.opensource5g.org/openxg/openxg-cnlibs.git
echo "Downloading fmt"
$SUDO rm -rf /tmp/fmt*
#git clone https://github.com/fmtlib/fmt.git
git clone http://git.opensource5g.org/openxg/fmt.git
ret=$?;[[ $ret -ne 0 ]] && return $ret
##fmt
cd openxg-cnlibs/fmt
cd fmt
cmake -DFMT_TEST=FALSE .
ret=$?;[[ $ret -ne 0 ]] && return $ret
make -j `nproc`
ret=$?;[[ $ret -ne 0 ]] && return $ret
$SUDO make install
cd /tmp
rm -rf /tmp/fmt*
fi
return 0
}
##json
cd openxg-cnlibs/json
ret=$?;[[ $ret -ne 0 ]] && popd && return $ret
mkdir _build && cd _build
cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -DJSON_BuildTests=OFF ..
ret=$?;[[ $ret -ne 0 ]] && popd && return $ret
make
ret=$?;[[ $ret -ne 0 ]] && popd && return $ret
$SUDO make install
#-------------------------------------------------------------------------------
#arg1 is force (0 or 1) (no interactive script)
#arg2 is debug (0 or 1) (install debug libraries)
install_spdlog_from_git() {
if [ $1 -eq 0 ]; then
read -p "Do you want to install spdlog ? <y/N> " prompt
OPTION=""
else
prompt='y'
OPTION="-y"
fi
if [ $2 -eq 0 ]; then
debug=0
else
debug=1
fi
if [[ $prompt =~ [yY](es)* ]]
then
#GIT_URL=https://github.com/gabime/spdlog.git
GIT_URL=http://git.opensource5g.org/openxg/spdlog.git
echo "Install spdlog from $GIT_URL"
pushd $OPENAIRCN_DIR/build/ext
echo "Downloading spdlog"
if [[ $OPTION =~ -[yY](es)* ]]
then
$SUDO rm -rf spdlog
fi
git clone $GIT_URL
cd spdlog && git checkout master
ret=$?;[[ $ret -ne 0 ]] && popd && return $ret
# enable syslog, Useless (defined in SMF code)
sed -i '/#define SPDLOG_ENABLE_SYSLOG/s/^\/\///g' include/spdlog/tweakme.h
popd
fi
return 0
}
##pistache
cd openxg-cnlibs/pistache
#-------------------------------------------------------------------------------
#arg1 is force (0 or 1) (no interactive script)
#arg2 is debug (0 or 1) (install debug libraries)
install_pistache_from_git() {
if [ $1 -eq 0 ]; then
read -p "Do you want to install Pistache ? <y/N> " prompt
OPTION="-y"
else
prompt='y'
OPTION="-y"
fi
if [ $2 -eq 0 ]; then
debug=0
else
debug=1
fi
if [[ $prompt =~ [yY](es)* ]]
then
#GIT_URL=https://github.com/oktal/pistache.git
GIT_URL=http://git.opensource5g.org/openxg/pistache.git
echo "Install Pistache from $GIT_URL"
pushd $OPENAIRCN_DIR/build/ext
echo "Downloading Pistache"
if [[ $OPTION =~ -[yY](es)* ]]
then
$SUDO rm -rf pistache
fi
git clone $GIT_URL
git submodule update --init
cd pistache && git checkout e18ed9baeb2145af6f9ea41246cf48054ffd9907
ret=$?;[[ $ret -ne 0 ]] && popd && return $ret
mkdir _build && cd _build
cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release ..
...
...
@@ -62,79 +147,56 @@ install_cnlibs() {
$SUDO make install
ret=$?;[[ $ret -ne 0 ]] && popd && return $ret
popd
fi
return 0
}
##spdlog
cd openxg-cnlibs/spdlog
ret=$?;[[ $ret -ne 0 ]] && popd && return $ret
# enable syslog, Useless (defined in SMF code)
sed -i '/#define SPDLOG_ENABLE_SYSLOG/s/^\/\///g' include/spdlog/tweakme.h
popd
#-------------------------------------------------------------------------------
#arg1 is force (0 or 1) (no interactive script)
#arg2 is debug (0 or 1) (install debug libraries)
install_nlohmann_from_git() {
if [ $1 -eq 0 ]; then
read -p "Do you want to install Nlohmann Json ? <y/N> " prompt
OPTION=""
else
prompt='y'
OPTION="-y"
fi
if [ $2 -eq 0 ]; then
debug=0
else
debug=1
fi
if [[ $prompt =~ [yY](es)* ]]
then
#GIT_URL=https://github.com/nlohmann/json.git
GIT_URL=http://git.opensource5g.org/openxg/json.git
echo "Install Nlohmann Json from $GIT_URL"
pushd $OPENAIRCN_DIR/build/ext
echo "Downloading Nlohmann"
if [[ $OPTION =~ -[yY](es)* ]]
then
$SUDO rm -rf json
fi
##folly
cd openxg-cnlibs/folly
git clone $GIT_URL
git submodule update --init
cd json && git checkout master
ret=$?;[[ $ret -ne 0 ]] && popd && return $ret
mkdir _build && cd _build
cmake ..
cmake
-G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -DJSON_BuildTests=OFF
..
ret=$?;[[ $ret -ne 0 ]] && popd && return $ret
make
-j $(nproc)
make
ret=$?;[[ $ret -ne 0 ]] && popd && return $ret
$SUDO make install
ret=$?;[[ $ret -ne 0 ]] && popd && return $ret
popd
fi
##https://github.com/google/googletest/archive/release-1.8.0.tar.gz --------------
if [[ $prompt =~ [yY](es)* ]]
then
$SUDO apt-get install $OPTION \
g++ \
cmake \
libboost-all-dev \
libevent-dev \
libdouble-conversion-dev \
libgoogle-glog-dev \
libgflags-dev \
libiberty-dev \
liblz4-dev \
liblzma-dev \
libsnappy-dev \
make \
wget \
zlib1g-dev \
binutils-dev \
libjemalloc-dev \
libssl-dev \
pkg-config
ret=$?;[[ $ret -ne 0 ]] && return $ret
pushd /tmp
if [ $debug -eq 1 ]; then
# For advanced debugging options
$SUDO apt-get install $OPTION \
libunwind8-dev \
libelf-dev \
libdwarf-dev
ret=$?;[[ $ret -ne 0 ]] && return $ret
tar zxf release-1.8.0.tar.gz && \
rm -f release-1.8.0.tar.gz && \
cd googletest-release-1.8.0 && \
cmake . && \
make && \
$SUDO make install
ret=$?;[[ $ret -ne 0 ]] && popd && return $ret
cd ..
fi
fi
##
cd /tmp
rm -rf /tmp/openxg-cnlibs*
return 0
}
#-------------------------------------------------------------------------------
#arg1 is force (0 or 1) (no interactive script)
#arg2 is debug (0 or 1) (install debug libraries)
...
...
@@ -142,7 +204,7 @@ check_install_amf_deps(){
if [ $1 -gt 0 ]; then
OPTION="-y"
else
else
OPTION=""
fi
if [ $2 -eq 0 ]; then
...
...
@@ -151,7 +213,7 @@ check_install_amf_deps(){
debug=1
fi
echo "Check supported distribution"
echo "Check supported distribution"
check_supported_distribution
[[ $? -ne 0 ]] && return $?
...
...
@@ -262,10 +324,22 @@ check_install_amf_deps(){
$SUDO $INSTALLER install $OPTION $PACKAGE_LIST
ret=$?;[[ $ret -ne 0 ]] && return $ret
# Use cnlibs
install_cnlibs $1 $2
# Use fmt lib included in spdlog
install_fmt $1
ret=$?;[[ $ret -ne 0 ]] && return $ret
install_spdlog_from_git $1 $2
ret=$?;[[ $ret -ne 0 ]] && return $ret
install_fb_folly_from_source $1 $2
ret=$?;[[ $ret -ne 0 ]] && return $ret
install_pistache_from_git $1 $2
ret=$?;[[ $ret -ne 0 ]] && return $ret
install_nlohmann_from_git $1 $2
ret=$?;[[ $ret -ne 0 ]] && return $ret
$SUDO ldconfig
return 0
...
...
etc/cpe_openxg.conf
View file @
bdcd5f7c
...
...
@@ -60,8 +60,8 @@ AMF =
# AMF binded interface for N1/N2 interface (NGAP)
NGAP_AMF
:
{
INTERFACE_NAME
=
"ens3"
;
# YOUR NETWORK CONFIG HERE
IPV4_ADDRESS
=
"read"
;
INTERFACE_NAME
=
"ens3"
;
# YOUR NETWORK CONFIG HERE
ens3
IPV4_ADDRESS
=
"read"
;
PORT
=
38412
;
# YOUR NETWORK CONFIG HERE
PPID
=
60
;
# YOUR NETWORK CONFIG HERE
};
...
...
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