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
b1bf9db8
Commit
b1bf9db8
authored
Feb 25, 2017
by
Elena Lukashova
Browse files
Merge branch 'develop' into feature-59-tm4
parents
2ef3dd8f
38771f27
Changes
273
Hide whitespace changes
Inline
Side-by-side
cmake_targets/CMakeLists.txt
View file @
b1bf9db8
...
...
@@ -1759,6 +1759,7 @@ add_executable(lte-softmodem
${
OPENAIR_TARGETS
}
/ARCH/COMMON/common_lib.c
${
OPENAIR1_DIR
}
/SIMULATION/ETH_TRANSPORT/netlink_init.c
${
OPENAIR3_DIR
}
/NAS/UE/nas_ue_task.c
${
OPENAIR_DIR
}
/common/utils/utils.c
${
GTPU_need_ITTI
}
${
HW_SOURCE
}
${
TRANSPORT_SOURCE
}
...
...
@@ -1885,9 +1886,11 @@ add_executable(oaisim
${
OPENAIR_TARGETS
}
/SIMU/USER/oaisim_functions.c
${
OPENAIR_TARGETS
}
/SIMU/USER/event_handler.c
${
OPENAIR_TARGETS
}
/SIMU/USER/oaisim.c
${
OPENAIR_TARGETS
}
/ARCH/COMMON/common_lib.c
${
OPENAIR2_DIR
}
/RRC/NAS/nas_config.c
${
OPENAIR2_DIR
}
/RRC/NAS/rb_config.c
${
OPENAIR3_DIR
}
/NAS/UE/nas_ue_task.c
${
OPENAIR_DIR
}
/common/utils/utils.c
${
GTPU_need_ITTI
}
${
OPENAIR_TARGETS
}
/COMMON/create_tasks.c
${
HW_SOURCE
}
...
...
@@ -1899,7 +1902,7 @@ add_executable(oaisim
target_include_directories
(
oaisim PUBLIC
${
OPENAIR_TARGETS
}
/SIMU/USER
)
target_link_libraries
(
oaisim
-Wl,--start-group
-Wl,-
ldl,-
-start-group
RRC_LIB S1AP_LIB S1AP_ENB X2AP_LIB GTPV1U SECU_CN UTIL HASHTABLE SCTP_CLIENT UDP SCHED_LIB PHY LFDS
${
MSC_LIB
}
L2
${
RAL_LIB
}
LIB_NAS_UE SIMU SIMU_ETH SECU_OSA
${
ITTI_LIB
}
${
MIH_LIB
}
-Wl,--end-group
)
...
...
@@ -1930,6 +1933,7 @@ add_executable(oaisim_nos1
${
OPENAIR_TARGETS
}
/SIMU/USER/oaisim_functions.c
${
OPENAIR_TARGETS
}
/SIMU/USER/event_handler.c
${
OPENAIR_TARGETS
}
/SIMU/USER/oaisim.c
${
OPENAIR_TARGETS
}
/ARCH/COMMON/common_lib.c
${
OPENAIR2_DIR
}
/RRC/NAS/nas_config.c
${
OPENAIR2_DIR
}
/RRC/NAS/rb_config.c
${
OPENAIR_TARGETS
}
/COMMON/create_tasks.c
...
...
cmake_targets/at_commands/CMakeLists.txt
View file @
b1bf9db8
...
...
@@ -88,31 +88,47 @@ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -msse4.2 -std=gnu99 -Wall -Wstrict-prototype
set
(
CMAKE_C_FLAGS_DEBUG
"
${
CMAKE_C_FLAGS_DEBUG
}
-ggdb -DMALLOC_CHECK_=3"
)
set
(
CMAKE_C_FLAGS_RELWITHDEBINFO
"
${
CMAKE_C_FLAGS_RELWITHDEBINFO
}
-ggdb -DMALLOC_CHECK_=3 -O2"
)
#This is to detect nettle version changes between Ubuntu 14.04/16.04
set
(
nettle_cmd
"nettle-hash"
)
set
(
nettle_arg
"-V"
)
execute_process
(
COMMAND
${
nettle_cmd
}
${
nettle_arg
}
RESULT_VARIABLE rv OUTPUT_VARIABLE ov ERROR_VARIABLE ev
)
##This is to detect nettle version changes between Ubuntu 14.04/16.04
#set ( nettle_cmd "nettle-hash" )
#set ( nettle_arg "-V" )
#execute_process(COMMAND ${nettle_cmd} ${nettle_arg} RESULT_VARIABLE rv OUTPUT_VARIABLE ov ERROR_VARIABLE ev)
#
#string(REGEX MATCH "[+-]?[0-9]+([.][0-9]+)?" nv ${ov})
#
#message("NETTLE_VERSION = ${nv}")
#
## we need to remove decimal as floating point arithematic does not work properly with C preprocessor
#STRING(REGEX REPLACE "[.]" "" nv ${nv})
#
#if ("${nv}" STREQUAL "")
# message( FATAL_ERROR "The nettle version not detected properly. Try to run build_oai -I again" )
#endif()
#
#set (NETTLE_VERSION "${nv}")
#add_definitions("-DNETTLE_VERSION=${NETTLE_VERSION}")
include
(
FindPkgConfig
)
string
(
REGEX MATCH
"[+-]?[0-9]+([.][0-9]+)?"
nv
${
ov
}
)
pkg_search_module
(
NETTLE nettle
)
if
(
NOT
${
NETTLE_FOUND
}
)
message
(
FATAL_ERROR
"PACKAGE nettle not found: some targets will fail. Run build_oai -I again!"
)
else
()
include_directories
(
${
NETTLE_INCLUDE_DIRS
}
)
endif
()
message
(
"NETTLE
_
VERSION
=
${
nv
}
"
)
message
(
"NETTLE
VERSION
_INSTALLED =
${
NETTLE_VERSION
}
"
)
# we need to remove decimal as floating point arithematic does not work properly with C preprocessor
STRING
(
REGEX REPLACE
"[.]"
""
nv
${
nv
}
)
string
(
REGEX REPLACE
"([0-9]+).*"
"
\\
1"
NETTLE_VERSION_MAJOR
${
NETTLE_VERSION
}
)
string
(
REGEX REPLACE
"[0-9]+
\\
.([0-9]+).*"
"
\\
1"
NETTLE_VERSION_MINOR
${
NETTLE_VERSION
}
)
message
(
"NETTLE_VERSION_MAJOR =
${
NETTLE_VERSION_MAJOR
}
"
)
message
(
"NETTLE_VERSION_MINOR =
${
NETTLE_VERSION_MINOR
}
"
)
if
(
"
${
nv
}
"
STREQUAL
""
)
if
(
"
${
NETTLE_VERSION_MAJOR
}
"
STREQUAL
""
OR
"
${
NETTLE_VERSION_MINOR
}
"
STREQUAL
""
)
message
(
FATAL_ERROR
"The nettle version not detected properly. Try to run build_oai -I again"
)
endif
()
set
(
NETTLE_VERSION
"
${
nv
}
"
)
add_definitions
(
"-DNETTLE_VERSION=
${
NETTLE_VERSION
}
"
)
include
(
FindPkgConfig
)
INCLUDE
(
FindNettle
)
IF
(
NOT NETTLE_FOUND
)
MESSAGE
(
SEND_ERROR
"Nettle is required"
)
ENDIF
(
NOT NETTLE_FOUND
)
add_definitions
(
"-DNETTLE_VERSION_MAJOR=
${
NETTLE_VERSION_MAJOR
}
"
)
add_definitions
(
"-DNETTLE_VERSION_MINOR=
${
NETTLE_VERSION_MINOR
}
"
)
pkg_search_module
(
OPENSSL openssl REQUIRED
)
...
...
@@ -215,8 +231,8 @@ set(api_user_HDR
add_library
(
api_user
${
api_user_SRC
}
${
api_user_HDR
}
)
target_include_directories
(
api_user PRIVATE
${
OPENAIR_NAS_DIR
}
/UE/API/USER
${
OPENAIR_NAS_DIR
}
/UE
${
OPENAIR_NAS_DIR
}
/COMMON
${
OPENAIR_NAS_DIR
}
/UE
)
################################################################################
...
...
@@ -397,6 +413,7 @@ target_include_directories(emm PRIVATE
${
OPENAIR_DIR
}
/common/utils/msc
${
OPENAIR_DIR
}
/common/utils
${
OPENAIR_DIR
}
/openair2/COMMON
${
OPENAIR_NAS_DIR
}
/UE
${
OPENAIR_NAS_DIR
}
/UE/API/USIM
${
OPENAIR_NAS_DIR
}
/UE/EMM
${
OPENAIR_NAS_DIR
}
/COMMON/EMM/MSG
...
...
@@ -409,7 +426,6 @@ target_include_directories(emm PRIVATE
# esm LIB
################################################################################
set
(
esm_SRC
${
OPENAIR_NAS_DIR
}
/UE/ESM/esm_main.c
${
OPENAIR_NAS_DIR
}
/UE/ESM/DedicatedEpsBearerContextActivation.c
${
OPENAIR_NAS_DIR
}
/UE/ESM/DefaultEpsBearerContextActivation.c
${
OPENAIR_NAS_DIR
}
/UE/ESM/EpsBearerContextDeactivation.c
...
...
@@ -452,6 +468,7 @@ set(esm_SRC
)
set
(
esm_HDR
${
OPENAIR_TARGETS
}
/COMMON/openairinterface5g_limits.h
${
OPENAIR_NAS_DIR
}
/UE/ESM/esm_main.h
${
OPENAIR_NAS_DIR
}
/COMMON/ESM/MSG/ActivateDedicatedEpsBearerContextAccept.h
${
OPENAIR_NAS_DIR
}
/COMMON/ESM/MSG/ActivateDedicatedEpsBearerContextReject.h
...
...
@@ -481,13 +498,17 @@ set(esm_HDR
${
OPENAIR_NAS_DIR
}
/UE/ESM/SAP/esm_recv.h
${
OPENAIR_NAS_DIR
}
/UE/ESM/SAP/esm_sap.h
${
OPENAIR_NAS_DIR
}
/UE/ESM/SAP/esm_send.h
${
OPENAIR_DIR
}
/common/utils/utils.h
)
add_library
(
esm
${
esm_SRC
}
${
esm_HDR
}
)
target_include_directories
(
esm PRIVATE
${
OPENAIR_DIR
}
/common/utils
${
OPENAIR_NAS_DIR
}
/UE
${
OPENAIR_NAS_DIR
}
/UE/API/USER
${
OPENAIR_NAS_DIR
}
/UE/ESM
${
OPENAIR_TARGETS
}
/COMMON
${
OPENAIR_NAS_DIR
}
/COMMON/ESM/MSG
${
OPENAIR_NAS_DIR
}
/UE/ESM/SAP
${
OPENAIR_NAS_DIR
}
/COMMON/IES
...
...
@@ -670,6 +691,9 @@ target_include_directories(ies PRIVATE
# EXECUTABLE at_nas_ue
################################################################################
include_directories
(
${
OPENAIR_TARGETS
}
/COMMON
${
OPENAIR_NAS_DIR
}
/UE
${
OPENAIR_DIR
}
/common/utils
${
OPENAIR_DIR
}
/common/utils/msc
${
OPENAIR3_DIR
}
/COMMON
${
OPENAIR3_DIR
}
/SECU
...
...
@@ -691,6 +715,7 @@ ADD_EXECUTABLE(at_nas_ue ${OPENAIR_NAS_DIR}/UE/UEprocess.c
${
OPENAIR_NAS_DIR
}
/UE/nas_parser.c
${
OPENAIR_NAS_DIR
}
/UE/nas_proc.c
${
OPENAIR_NAS_DIR
}
/UE/nas_user.c
${
OPENAIR_DIR
}
/common/utils/utils.c
)
target_link_libraries
(
at_nas_ue
...
...
cmake_targets/autotests/v2/actions/execution_compile.bash
View file @
b1bf9db8
...
...
@@ -3,6 +3,9 @@ source oaienv
cd
cmake_targets
rm
-rf
log
mkdir
-p
log
echo
$PRE_BUILD
bash
-c
"
$PRE_BUILD
"
echo
$BUILD_PROG
$BUILD_ARGUMENTS
$BUILD_PROG
$BUILD_ARGUMENTS
echo
$PRE_EXEC
bash
-c
"
$PRE_EXEC
"
cmake_targets/build_oai
View file @
b1bf9db8
...
...
@@ -57,17 +57,20 @@ CMAKE_BUILD_TYPE=""
UE_AUTOTEST_TRACE
=
"False"
trap
handle_ctrl_c INT
gen_nvram_path
=
$OPENAIR_DIR
/targets/bin
conf_nvram_path
=
$OPENAIR_DIR
/openair3/NAS/TOOLS/ue_eurecom_test_sfr.conf
function
print_help
()
{
echo_info
'
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 to make a rebuild from start
"
Erase all files to make a rebuild from start
-C | --clean-all
Erase all files made by previous compilations, installations
"
Erase all files made by previous compilations, installations
--clean-kernel
Erase previously installed features in kernel: iptables, drivers, ...
-I | --install-external-packages
...
...
@@ -82,7 +85,11 @@ Options
--eNB
Makes the LTE softmodem
--UE
Makes the UE specific parts (ue_ip, usim, nvram)
Makes the UE specific parts (ue_ip, usim, nvram) from the given configuration file
--UE-conf-nvram [configuration file]
Specify conf_nvram_path (default
\"
$conf_nvram_path
\"
)
--UE-gen-nvram [output path]
Specify gen_nvram_path (default
\"
$gen_nvram_path
\"
)
--RRH
Makes the RRH
-a | --agent
...
...
@@ -97,7 +104,7 @@ Options
ETHERNET , None
Adds this trasport protocol support in compilation
--oaisim
Makes the oaisim simulator. Hardware will be defaulted to "None".
Makes the oaisim simulator. Hardware will be defaulted to
\
"
None
\
"
.
--phy_simulators
Makes the unitary tests Layer 1 simulators
--core_simulators
...
...
@@ -140,11 +147,12 @@ Usage (first build):
Usage (Regular):
oaisim : ./build_oai --oaisim -x
Eurecom EXMIMO + OAI ENB : ./build_oai --eNB -x
NI/ETTUS B201 + OAI ENB : ./build_oai --eNB -x -w USRP
'
NI/ETTUS B201 + OAI ENB : ./build_oai --eNB -x -w USRP
"
}
function
main
()
{
until
[
-z
"
$1
"
]
do
case
"
$1
"
in
...
...
@@ -183,6 +191,12 @@ function main() {
UE
=
1
echo_info
"Will compile UE"
shift
;;
--UE-conf-nvram
)
conf_nvram_path
=
$(
readlink
-f
"
$1
"
)
shift
2
;;
--UE-gen-nvram
)
gen_nvram_path
=
$(
readlink
-f
$2
)
shift
2
;;
--RRH
)
RRH
=
1
echo_info
"Will compile RRH"
...
...
@@ -292,6 +306,10 @@ function main() {
UE_AUTOTEST_TRACE
=
"True"
echo_info
"Enabling autotest specific trace for UE"
shift
1
;;
--uhd-images-dir
)
UHD_IMAGES_DIR
=
$2
echo_info
"Downloading UHD images in the indicated location"
shift
2
;;
-h
|
--help
)
print_help
exit
1
;;
...
...
@@ -362,6 +380,10 @@ function main() {
echo_info
"Flags for Deadline scheduler:
$DEADLINE_SCHEDULER_FLAG_USER
"
echo_info
"Flags for CPU Affinity:
$CPU_AFFINITY_FLAG_USER
"
if
[
-n
"
$UHD_IMAGES_DIR
"
]
&&
[
-z
"
$INSTALL_EXTERNAL
"
]
;
then
echo_error
"UHD images download settings will not be applied without -I present"
exit
fi
############################################
# setting and printing OAI envs, we should check here
############################################
...
...
@@ -399,7 +421,7 @@ function main() {
echo_info
"installing packages for USRP support"
check_install_usrp_uhd_driver
if
[
!
"
$DISABLE_HARDWARE_DEPENDENCY
"
==
"True"
]
;
then
install_usrp_uhd_driver
install_usrp_uhd_driver
$UHD_IMAGES_DIR
fi
fi
if
[
"
$HW
"
==
"OAI_BLADERF"
]
;
then
...
...
@@ -418,9 +440,9 @@ function main() {
if
[
"
$oaisim
"
=
"1"
]
;
then
#to be discussed
# there is no RF device
and no
transport protocol
# there is no RF device transport protocol
HW
=
"None"
TP
=
"
None
"
TP
=
"
ETHERNET
"
if
[
"
$XFORMS
"
==
"True"
]
;
then
PRINT_STATS
=
"True"
...
...
@@ -517,15 +539,17 @@ function main() {
compilations
\
nas_sim_tools nvram
\
nvram
$dbin
/nvram
compilations
\
nas_sim_tools conf2uedata
\
conf2uedata
$dbin
/conf2uedata
# generate USIM data
if
[
-f
$dbin
/
nvram
]
;
then
install_nas_tools
$
dbin
$dconf
if
[
-f
$dbin
/
conf2uedata
]
;
then
install_nas_tools
$
conf_nvram_path
$gen_nvram_path
echo_info
"Copying UE specific part to
$DIR
/
$lte_build_dir
/build"
cp
-Rvf
$dbin
/.ue_emm.nvram
$DIR
/
$lte_build_dir
/build
cp
-Rvf
$dbin
/.ue.nvram
$DIR
/
$lte_build_dir
/build
cp
-Rvf
$dbin
/.usim.nvram
$DIR
/
$lte_build_dir
/build
cp
-Rvf
$dbin
/.ue_emm.nvram0
$DIR
/
$lte_build_dir
/build
cp
-Rvf
$dbin
/.ue.nvram0
$DIR
/
$lte_build_dir
/build
cp
-Rvf
$dbin
/.usim.nvram0
$DIR
/
$lte_build_dir
/build
else
echo_warning
"not generated UE NAS files: binaries not found"
fi
...
...
@@ -647,10 +671,13 @@ function main() {
compilations
\
nas_sim_tools nvram
\
nvram
$dbin
/nvram
compilations
\
nas_sim_tools conf2uedata
\
conf2uedata
$dbin
/conf2uedata
# generate USIM data
if
[
-f
$dbin
/
nvram
]
;
then
install_nas_tools
$
dbin
$dconf
if
[
-f
$dbin
/
conf2uedata
]
;
then
install_nas_tools
$
conf_nvram_path
$gen_nvram_path
else
echo_warning
"not generated UE NAS files: binaries not found"
fi
...
...
@@ -671,6 +698,15 @@ function main() {
# CMakeFiles/oai_nw_drv/oai_nw_drv.ko $dbin/oai_nw_drv.ko
fi
if
[
"
$TP
"
==
"ETHERNET"
]
;
then
compilations
\
$oaisim_build_dir
oai_eth_transpro
\
liboai_eth_transpro.so
$dbin
/liboai_eth_transpro.so.
$REL
ln
-sf
liboai_eth_transpro.so liboai_transpro.so
ln
-sf
$dbin
/liboai_eth_transpro.so.
$REL
$dbin
/liboai_transpro.so
echo_info
"liboai_transpro.so is linked with ETHERNET library"
fi
cmake_file
=
$DIR
/oaisim_mme_build_oai/CMakeLists.txt
cp
$DIR
/oaisim_mme_build_oai/CMakeLists.template
$cmake_file
echo
"set ( CMAKE_BUILD_TYPE
$CMAKE_BUILD_TYPE
)"
>>
$cmake_file
...
...
@@ -754,8 +790,8 @@ function main() {
liboai_usrpdevif.so
$dbin
/liboai_usrpdevif.so.
$REL
fi
ln
-s
liboai_usrpdevif.so liboai_device.so
ln
-s
$dbin
/liboai_usrpdevif.so.
$REL
$dbin
/liboai_device.so
ln
-s
f
liboai_usrpdevif.so liboai_device.so
ln
-s
f
$dbin
/liboai_usrpdevif.so.
$REL
$dbin
/liboai_device.so
echo_info
"liboai_device.so is linked to USRP device library"
elif
[
"
$HW
"
==
"OAI_BLADERF"
]
;
then
if
[
-f
"/usr/include/libbladeRF.h"
]
;
then
...
...
@@ -764,8 +800,8 @@ function main() {
liboai_bladerfdevif.so
$dbin
/liboai_bladerfdevif.so.
$REL
fi
ln
-s
liboai_bladerfdevif.so liboai_device.so
ln
-s
$dbin
/liboai_bladerfdevif.so.
$REL
$dbin
/liboai_device.so
ln
-s
f
liboai_bladerfdevif.so liboai_device.so
ln
-s
f
$dbin
/liboai_bladerfdevif.so.
$REL
$dbin
/liboai_device.so
echo_info
"liboai_device.so is linked to BLADERF device library"
elif
[
"
$HW
"
==
"OAI_LMSSDR"
]
;
then
# if [ -f "/usr/include/libbladeRF.h" ] ; then
...
...
@@ -774,8 +810,8 @@ function main() {
liboai_lmssdrdevif.so
$dbin
/liboai_lmssdrdevif.so.
$REL
# fi
ln
-s
liboai_lmssdrdevif.so liboai_device.so
ln
-s
$dbin
/liboai_lmssdrdevif.so.
$REL
$dbin
/liboai_device.so
ln
-s
f
liboai_lmssdrdevif.so liboai_device.so
ln
-s
f
$dbin
/liboai_lmssdrdevif.so.
$REL
$dbin
/liboai_device.so
echo_info
"liboai_device.so is linked to LMSSDR device library"
else
echo_info
"liboai_device.so is not linked to any device library"
...
...
@@ -791,8 +827,8 @@ function main() {
compilations
\
$build_dir
oai_eth_transpro
\
liboai_eth_transpro.so
$dbin
/liboai_eth_transpro.so.
$REL
ln
-s
liboai_eth_transpro.so liboai_transpro.so
ln
-s
$dbin
/liboai_eth_transpro.so.
$REL
$dbin
/liboai_transpro.so
ln
-s
f
liboai_eth_transpro.so liboai_transpro.so
ln
-s
f
$dbin
/liboai_eth_transpro.so.
$REL
$dbin
/liboai_transpro.so
echo_info
"liboai_transpro.so is linked with ETHERNET library"
fi
fi
...
...
cmake_targets/nas_sim_tools/CMakeLists.txt
View file @
b1bf9db8
...
...
@@ -2,70 +2,89 @@ cmake_minimum_required(VERSION 2.8)
project
(
NAS_SIM_TOOLS
)
include
(
FindPkgConfig
)
pkg_search_module
(
CONFIG libconfig REQUIRED
)
include_directories
(
${
CONFIG_INCLUDE_DIRS
}
)
add_definitions
(
-std=gnu99
)
ENABLE_LANGUAGE
(
C
)
#Sends the -std=c99 flag to the gcc compiler
add_definitions
(
-std=c99
)
add_definitions
(
-DNAS_UE
)
set
(
CMAKE_C_FLAGS
"
${
CMAKE_C_FLAGS
}
${
C_FLAGS_PROCESSOR
}
-Werror -Wall -Wstrict-prototypes -Wno-packed-bitfield-compat -g"
)
set
(
OPENAIR_DIR $ENV{OPENAIR_DIR}
)
set
(
OPENAIR1_DIR $ENV{OPENAIR_DIR}/openair1
)
set
(
OPENAIR2_DIR $ENV{OPENAIR_DIR}/openair2
)
set
(
OPENAIR3_DIR $ENV{OPENAIR_DIR}/openair3
)
set
(
OPENAIR3_DIR $ENV{OPENAIR_DIR}/openair3
)
set
(
OPENAIR_TARGETS $ENV{OPENAIR_DIR}/targets
)
#set(EXECUTABLE_OUTPUT_PATH ${OPENAIR_DIR}/targets/bin)
# Add .h files for dependancies
set
(
usim_SRC
${
OPENAIR_DIR
}
/openair3/NAS/TOOLS/usim_data.c
set
(
CONF2UEDATA_LIB_SRC
${
OPENAIR_DIR
}
/openair3/NAS/TOOLS/conf_emm.c
${
OPENAIR_DIR
}
/openair3/NAS/TOOLS/conf_user_data.c
${
OPENAIR_DIR
}
/openair3/NAS/TOOLS/conf_usim.c
${
OPENAIR_DIR
}
/openair3/NAS/TOOLS/conf_network.c
${
OPENAIR_DIR
}
/openair3/NAS/TOOLS/conf_user_plmn.c
${
OPENAIR_DIR
}
/openair3/NAS/TOOLS/conf_parser.c
${
OPENAIR_DIR
}
/openair3/NAS/TOOLS/fs.c
${
OPENAIR_DIR
}
/openair3/NAS/TOOLS/display.c
${
OPENAIR_DIR
}
/openair3/NAS/UE/API/USIM/usim_api.c
${
OPENAIR_DIR
}
/openair3/NAS/UE/API/USIM/aka_functions.c
${
OPENAIR_DIR
}
/openair3/NAS/COMMON/UTIL/memory.c
${
OPENAIR_DIR
}
/openair3/NAS/COMMON/UTIL/nas_log.c
${
OPENAIR_DIR
}
/openair3/NAS/COMMON/UTIL/OctetString.c
${
OPENAIR_DIR
}
/openair3/NAS/COMMON/UTIL/TLVEncoder.c
${
OPENAIR_DIR
}
/common/utils/utils.c
)
set
(
usim_HDR
${
OPENAIR_DIR
}
/openair3/NAS/TOOLS/network.h
set
(
conf2uedata_HDR
${
OPENAIR_DIR
}
/openair3/NAS/TOOLS/conf2uedata.h
${
OPENAIR_DIR
}
/openair3/NAS/TOOLS/conf_emm.h
${
OPENAIR_DIR
}
/openair3/NAS/UE/API/USIM/usim_api.h
${
OPENAIR_DIR
}
/openair3/NAS/UE/API/USIM/aka_functions.h
${
OPENAIR_DIR
}
/openair3/NAS/COMMON/UTIL/memory.h
${
OPENAIR_DIR
}
/openair3/NAS/COMMON/UTIL/nas_log.h
${
OPENAIR_DIR
}
/openair3/NAS/COMMON/UTIL/OctetString.h
${
OPENAIR_DIR
}
/openair3/NAS/COMMON/UTIL/TLVEncoder.h
${
OPENAIR_DIR
}
/common/utils/utils.h
)
include_directories
(
${
OPENAIR_DIR
}
/common/utils
${
OPENAIR_DIR
}
/openair3/NAS/UE
${
OPENAIR_DIR
}
/openair3/NAS/COMMON
${
OPENAIR_DIR
}
/openair3/NAS/UE/API/USER
${
OPENAIR_DIR
}
/openair3/NAS/UE/API/USIM
${
OPENAIR_DIR
}
/openair3/NAS/UE/EMM/
${
OPENAIR_DIR
}
/openair3/NAS/UE/ESM/
${
OPENAIR_DIR
}
/openair3/NAS/COMMON/IES/
${
OPENAIR_DIR
}
/openair3/NAS/COMMON/UTIL
)
ADD_EXECUTABLE
(
usim
${
usim_SRC
}
${
usim_HDR
}
)
# conf2uedata binary
set
(
conf2uedata_SRC
${
OPENAIR_DIR
}
/openair3/NAS/TOOLS/conf2uedata.c
${
CONF2UEDATA_LIB_SRC
}
)
add_executable
(
conf2uedata
${
conf2uedata_SRC
}
${
conf2uedata_HDR
}
)
target_link_libraries
(
conf2uedata
${
CONFIG_LIBRARIES
}
)
set
(
nvram_SRC
${
OPENAIR_DIR
}
/openair3/NAS/TOOLS/ue_data.c
${
OPENAIR_DIR
}
/openair3/NAS/COMMON/UTIL/memory.c
${
OPENAIR_DIR
}
/openair3/NAS/COMMON/UTIL/nas_log.c
)
# usim binary
set
(
nvram_HDR
${
OPENAIR_DIR
}
/openair3/NAS/UE/EMM/emmData.h
${
OPENAIR_DIR
}
/openair3/NAS/COMMON/UTIL/memory.h
${
OPENAIR_DIR
}
/openair3/NAS/COMMON/userDef.h
set
(
usim_SRC
${
OPENAIR_DIR
}
/openair3/NAS/TOOLS/usim.c
${
CONF2UEDATA_LIB_SRC
}
)
ADD_EXECUTABLE
(
nvram
${
nvram_SRC
}
${
nvram_HDR
}
)
#install (TARGETS usim DESTINATION ${EXECUTABLE_OUTPUT_PATH})
#install (TARGETS nvram DESTINATION ${EXECUTABLE_OUTPUT_PATH})
add_executable
(
usim
${
usim_SRC
}
${
conf2uedata_HDR
}
)
target_link_libraries
(
usim
${
CONFIG_LIBRARIES
}
)
# nvram binary
set
(
nvram_SRC
${
OPENAIR_DIR
}
/openair3/NAS/TOOLS/nvram.c
${
CONF2UEDATA_LIB_SRC
}
)
#install(CODE "EXECUTE_PROCESS (COMMAND ${OPENAIR_TARGETS}/bin/nvram --gen WORKING_DIRECTORY ${OPENAIR_TARGETS}/bin)"
)
#install(CODE "EXECUTE_PROCESS (COMMAND ${OPENAIR_TARGETS}/bin/usim --gen WORKING_DIRECTORY ${OPENAIR_TARGETS}/bin)"
)
add_executable
(
nvram
${
nvram_SRC
}
${
conf2uedata_HDR
}
)
target_link_libraries
(
nvram
${
CONFIG_LIBRARIES
}
)
cmake_targets/snap_environment.sh
0 → 100755
View file @
b1bf9db8
#!/bin/sh
export
UHD_IMAGES_DIR
=
$SNAP
/uhd_images
exec
$@
cmake_targets/tools/build_helper
View file @
b1bf9db8
...
...
@@ -171,7 +171,7 @@ install_protobuf_from_source(){
echo "Downloading protobuf"
rm -rf /tmp/protobuf-2.6.1.tar.gz* /tmp/protobuf-2.6.1
wget https://github.com/google/protobuf/releases/download/v2.6.1/protobuf-2.6.1.tar.gz
tar -xzvf protobuf-2.6.1.tar.gz
tar -xzvf protobuf-2.6.1.tar.gz
--owner $USER --group $USER --no-same-owner
cd protobuf-2.6.1/
./configure
echo "Compiling protobuf"
...
...
@@ -208,15 +208,19 @@ check_install_usrp_uhd_driver(){
#The new USRP repository
$SUDO add-apt-repository ppa:ettusresearch/uhd -y
$SUDO apt-get update
$SUDO apt-get -y install python python-tk libboost-all-dev libusb-1.0-0-dev
$SUDO apt-get -y install libuhd-dev libuhd003 uhd-host
$SUDO apt-get -y
--allow-unauthenticated
install python python-tk libboost-all-dev libusb-1.0-0-dev
$SUDO apt-get -y
--allow-unauthenticated
install libuhd-dev libuhd003 uhd-host
}
install_usrp_uhd_driver() {
# We move uhd-host apart because it depends on linux kernel version
# On newer kernels, it fails to install
$SUDO apt-get -y install uhd-host
$SUDO uhd_images_downloader
if [ -z $1 ]; then
$SUDO uhd_images_downloader
else
$SUDO uhd_images_downloader -i $1
fi
}
check_install_bladerf_driver(){
...
...
@@ -224,9 +228,9 @@ check_install_bladerf_driver(){
$SUDO add-apt-repository -y ppa:bladerf/bladerf
$SUDO apt-get update
fi
$SUDO apt-get install -y bladerf libbladerf-dev
$SUDO apt-get install -y bladerf-firmware-fx3
$SUDO apt-get install -y bladerf-fpga-hostedx40
$SUDO apt-get install -y
--allow-unauthenticated
bladerf libbladerf-dev
$SUDO apt-get install -y
--allow-unauthenticated
bladerf-firmware-fx3
$SUDO apt-get install -y
--allow-unauthenticated
bladerf-fpga-hostedx40
}
flash_firmware_bladerf() {
...
...
@@ -450,19 +454,18 @@ install_asn1c_from_source(){
################################################
install_nas_tools() {
cd $1
if [ ! -f .ue.nvram ]; then
if [ ! -f .ue.nvram0 ]; then
echo_success "generate .ue_emm.nvram .ue.nvram"
./nvram --gen
./nvram --gen
-c $1 -o $2
else
[ ./nvram -nt .ue.nvram
-o ./nvram -nt .ue_emm.nvram ] && ./nvram --gen
[ ./nvram -nt .ue.nvram
0
-o ./nvram -nt .ue_emm.nvram
0
] && ./nvram --gen
-c $1 -o $2
fi
if [ ! -f .usim.nvram ]; then
if [ ! -f .usim.nvram
0
]; then
echo_success "generate .usim.nvram"
./usim --gen
./usim --gen
-c $1 -o $2
else
[ ./usim -nt .usim.nvram ] && ./usim --gen
[ ./usim -nt .usim.nvram
0
] && ./usim --gen
-c $1 -o $2
fi
}
...
...
cmake_targets/tools/run_enb_ue_virt_s1
View file @
b1bf9db8
...
...
@@ -247,12 +247,6 @@ function main()
if
[
$?
-ne
0
]
;
then
echo
"200 lte "
>>
/etc/iproute2/rt_tables
fi
ip rule add fwmark 1 table lte
ifconfig oip1 up
ip route add default dev oip1 table lte
# the actual IP address depends on the EPC/MME config file for address pool
ip route add from 192.188.0.0/24 table lte
ip route add to 192.188.0.0/24 table lte
exe_arguments
=
"
$exe_arguments
-s15 -AAWGN -y1 -b1 -u1 -Q0"
...
...
common/utils/Makefile.inc
deleted
100644 → 0
View file @
2ef3dd8f
export
KERNEL_DIR
=
/lib/modules/
$(
shell
uname
-r
)
/
CC
=
gcc
CCC
=
gcc
linux
:=
$(
shell
if
[
`
uname
`
=
"Linux"
]
;
then
echo
"1"
;
else
echo
"0"
;
fi
)
CFLAGS
+=
-std
=
gnu99
CFLAGS
+=
-Wall
-g
-ggdb
-Wstrict-prototypes
-fno-strict-aliasing
# Need to force this option because default kernel module builder is wrong
CFLAGS
+=
$(
call
cc-option,-mpreferred-stack-boundary
=
4
)
#For performance, if some option doesn't exist in all gcc versions, use $(call cc-option,MY_OPTION)
#CFLAGS += -O2
#CFLAGS += -funroll-loops
CFLAGS
+=
-Wno-packed-bitfield-compat
# This is the minimum CPU faetures for OAI
CFLAGS
+=
-mmmx
-msse
-msse2
-mssse3
-msse4
.1
# Add CPU features from local CPU
#CFLAGS += -march=native
ifeq
($(OSTYPE),Cygwin)
cygwin
=
1
CFLAGS
+=
-DCYGWIN
else
cygwin
=
0
endif
ifeq
($(linux),1)
CFLAGS
+=