Commit daa308c3 authored by fnabet's avatar fnabet

Merge tag '2017.w07' into bugfix-189-rlc-am-fixes

parents aac9c611 38771f27
This diff is collapsed.
......@@ -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
......
......@@ -101,6 +101,19 @@ Obj.# Case# Test# Description
01 51 04 pdcchsim (TBD)
01 51 05 pbchsim (TBD)
01 51 06 mbmssim (TBD)
01 51 10 dlsim_tm4 test cases (Test 1: 10 MHz, R2.FDD (MCS 5), EVA5, -1dB),
(Test 5: 1.4 MHz, R4.FDD (MCS 4), EVA5, 0dB (70%)),
(Test 6: 10 MHz, R3.FDD (MCS 15), EVA5, 6.7dB (70%)),
(Test 6b: 5 MHz, R3-1.FDD (MCS 15), EVA5, 6.7dB (70%)),
(Test 7: 5 MHz, R3-1.FDD (MCS 15), EVA5, 6.7dB (30%)),
(Test 7b: 5 MHz, R3-1.FDD (MCS 15), ETU70, 1.4 dB (30%)),
(Test 10: 5 MHz, R6.FDD (MCS 25), EVA5, 17.4 dB (70%)),
(Test 10b: 5 MHz, R6-1.FDD (MCS 24,18 PRB), EVA5, 17.5dB (70%)),
(Test 11: 10 MHz, R7.FDD (MCS 25), EVA5, 17.7dB (70%))
(TM2 Test 1 10 MHz, R.11 FDD (MCS 14), EVA5, 6.8 dB (70%)),
(TM2 Test 1b 20 MHz, R.11-2 FDD (MCS 13), EVA5, 5.9 dB (70%)),
01 55 lte-softmodem tests with USRP B210 RF as eNB and ALU EPC w/ Bandrich COTS UE for 1TX/1RX (TM1), 2TX/2RX (TM2)
......
......@@ -994,6 +994,43 @@
<nruns>3</nruns>
</testCase>
<testCase id="015110">
<class>execution</class>
<desc>dlsim_tm4 test cases (Test 1: 10 MHz, R2.FDD (MCS 5), EVA5, -1dB),
(Test 5: 1.4 MHz, R4.FDD (MCS 4), EVA5, 0dB (70%)),
(Test 6, 10 MHz, R3.FDD (MCS 15), EVA5, 6.7dB (70%)),
(Test 6b, 5 MHz, R3-1.FDD (MCS 15), EVA5, 6.7dB (70%)),
(Test 7, 5 MHz, R3-1.FDD (MCS 15), EVA5, 6.7dB (30%)),
(Test 7b, 5 MHz, R3-1.FDD (MCS 15), ETU70, 1.4 dB (30%)),
(Test 10, 5 MHz, R6.FDD (MCS 25), EVA5, 17.4 dB (70%)),
(Test 10b, 5 MHz, R6-1.FDD (MCS 24,18 PRB), EVA5, 17.5dB (70%)),
(Test 11, 10 MHz, R7.FDD (MCS 25), EVA5, 17.7dB (70%))
(TM2 Test 1 10 MHz, R.11 FDD (MCS 14), EVA5, 6.8 dB (70%)),
(TM2 Test 1b 20 MHz, R.11-2 FDD (MCS 13), EVA5, 5.9 dB (70%)),
</desc>
<pre_compile_prog></pre_compile_prog>
<compile_prog>$OPENAIR_DIR/cmake_targets/build_oai</compile_prog>
<compile_prog_args> --phy_simulators -c </compile_prog_args>
<pre_exec>$OPENAIR_DIR/cmake_targets/autotests/tools/free_mem.bash</pre_exec>
<pre_exec_args></pre_exec_args>
<main_exec> $OPENAIR_DIR/cmake_targets/lte-simulators/build/dlsim_tm4</main_exec>
<main_exec_args> -m5 -gF -s-1 -w1.0 -f.2 -n500 -B50 -c2 -z2 -O70
-m4 -gF -s0 -w1.0 -f.2 -n500 -B6 -c4 -z2 -O70
-m15 -gF -s6.7 -w1.0 -f.2 -n500 -B50 -c2 -z2 -O70
-m14 -gF -s6.7 -w1.0 -f.2 -n500 -B25 -c3 -z2 -O70
-m15 -gG -s6.7 -w1.0 -f.2 -n500 -B50 -c2 -z2 -O30
-m14 -gG -s1.4 -w1.0 -f.2 -n500 -B25 -c3 -z2 -O30
-m25 -gF -s17.4 -w1.0 -f.2 -n500 -B25 -c3 -z2 -O70
-m25 -gF -s17.5 -w1.0 -f.2 -n500 -B25 -c3 -z2 -r1022 -O70
-m26 -gF -s17.7 -w1.0 -f.2 -n500 -B50 -c2 -z2 -O70
-m14 -gF -s6.8 -w1.0 -f.2 -n500 -B50 -c2 -x2 -y2 -z2 -O70
-m13 -gF -s5.9 -w1.0 -f.2 -n500 -B25 -c3 -x2 -y2 -z2 -O70</main_exec_args>
<tags>dlsim_tm4.test1 dlsim_tm4.test5 dlsim_tm4.test6 dlsim_tm4.test6b dlsim_tm4.test7 dlsim_tm4.test7b dlsim_tm4.test10 dlsim_tm4.test10b dlsim_tm4.test11 dlsim_tm4.TM2_test1 dlsim_tm4.TM2_test1b</tags>
<search_expr_true>"passed"</search_expr_true>
<search_expr_false>segmentation fault|assertion|exiting|fatal</search_expr_false>
<nruns>3</nruns>
</testCase>
<testCase id="015500" >
<class>lte-softmodem</class>
<desc></desc>
......
......@@ -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
......@@ -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
......@@ -543,7 +567,7 @@ function main() {
if [ "$SIMUS_PHY" = "1" ] ; then
# lte unitary simulators compilation
echo_info "Compiling unitary tests simulators"
simlist="dlsim ulsim pucchsim prachsim pdcchsim pbchsim mbmssim"
simlist="dlsim_tm4 dlsim ulsim pucchsim prachsim pdcchsim pbchsim mbmssim"
for f in $simlist ; do
compilations \
lte-simulators $f \
......@@ -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
......@@ -675,8 +702,8 @@ function main() {
compilations \
$oaisim_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 -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
......@@ -763,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 -sf liboai_usrpdevif.so liboai_device.so
ln -sf $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
......@@ -773,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 -sf liboai_bladerfdevif.so liboai_device.so
ln -sf $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
......@@ -783,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 -sf liboai_lmssdrdevif.so liboai_device.so
ln -sf $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"
......@@ -800,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 -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
fi
......
......@@ -8,7 +8,7 @@ set(DEBUG_PHY False)
set(MU_RECIEVER False)
set(RANDOM_BF False)
set(PBS_SIM False)
set(PERFECT_CE False)
set(PERFECT_CE True)
set(NAS_UE False)
set(MESSAGE_CHART_GENERATOR False)
......
......@@ -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})
#!/bin/sh
export UHD_IMAGES_DIR=$SNAP/uhd_images
exec $@
......@@ -216,7 +216,11 @@ 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(){
......@@ -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.nvram0 -o ./nvram -nt .ue_emm.nvram0 ] && ./nvram --gen -c $1 -o $2
fi
if [ ! -f .usim.nvram ]; then
if [ ! -f .usim.nvram0 ]; then
echo_success "generate .usim.nvram"
./usim --gen
./usim --gen -c $1 -o $2
else
[ ./usim -nt .usim.nvram ] && ./usim --gen
[ ./usim -nt .usim.nvram0 ] && ./usim --gen -c $1 -o $2
fi
}
......
......@@ -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"
......
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)