Commit e4dda9ed authored by Lionel Gauthier's avatar Lionel Gauthier

Merged with trunk

git-svn-id: http://svn.eurecom.fr/openair4G/trunk@6501 818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent de661769
......@@ -37,7 +37,7 @@ export PROJDIR = $(CURDIR)
all:
ifeq ($(PROCESS), UE)
@$(CD) $(SECUDIR) && $(MAKE)
@$(CD) $(SECUDIR) && $(MAKE) -f Makefile.NAS
endif
@$(CD) $(UTILDIR) && $(MAKE)
@$(CD) $(APIDIR) && $(MAKE)
......
......@@ -34,13 +34,14 @@ endif
include $(PROJDIR)/Makerules
include $(PROJDIR)/Makefile.inc
include $(PROJDIR)/../Makefile.tools
export LD_RUN_PATH = $(LIBDIR):$(LIBPROCESS)
LIBS = -lapi -lutil -lEMMmsg -lESMmsg -lies -lrt
LIBS = -luenas.a -lrt
INCLUDES = -I. -I$(INCDIR) -I$(UTILDIR) -I$(USIMAPIDIR) -I$(EMMDIR) -I$(ESMDIR) -I$(IESDIR)
LIBSUTIL = $(LIBDIR)/$(LIBUTIL).a $(LIBDIR)/$(LIBUTIL).so
#LIBSUTIL = $(LIBDIR)/$(LIBUTIL).a $(LIBDIR)/$(LIBUTIL).so
USIM_OBJ = usim_data.o
UE_OBJ = ue_data.o
......@@ -57,13 +58,13 @@ all: $(TARGETS)
$(CC) $(CFLAGS) -c $< -o $@
$(USIM_TARGET): $(USIM_OBJ) $(LIBSUTIL)
$(CC) $(LDFLAGS) -o $@ $^ $(LIBS) $(SECUDIR)/*.o -lnettle -lcrypto -lm
$(CC) $(LDFLAGS) -o $@ $^ $(LIBS) -lnettle -lcrypto -lm
@echo Replacing $@ to $(BINDIR)
@$(RM) $(BINDIR)/$@
@$(CP) $@ $(BINDIR)
$(UE_TARGET): $(UE_OBJ) $(LIBSUTIL)
$(CC) $(LDFLAGS) -o $@ $^ $(LIBS) $(SECUDIR)/*.o -lnettle -lcrypto -lm
$(CC) $(LDFLAGS) -o $@ $^ $(LIBS) -lnettle -lcrypto -lm
@echo Replacing $@ to $(BINDIR)
@$(RM) $(BINDIR)/$@
@$(CP) $@ $(BINDIR)
......@@ -74,6 +75,10 @@ clean:
veryclean: clean
$(RM) $(TARGETS)
veryveryclean: veryclean
$(RM) -Rf *.o $(PROJDIR)
$(RM) -Rf *.a $(PROJDIR)
depend:
makedepend -- ${CFLAGS} -- ${SRCS}
......
......@@ -53,8 +53,7 @@ Description Implements the utility used to generate data stored in the
#include <stdlib.h> // exit, free
#include <string.h> // memset, strncpy
//#define SELECTED_PLMN SFR1
#define SELECTED_PLMN FCT1
#define SELECTED_PLMN SFR1
/****************************************************************************/
/**************** E X T E R N A L D E F I N I T I O N S ****************/
......@@ -290,7 +289,7 @@ static void _gen_user_data(user_nvdata_t* data)
static void _gen_emm_data(emm_nvdata_t* data)
{
//#if (SELECTED_PLMN == FCT1)
#if 1
#if 0
/*
* International Mobile Subscriber Identity
* IMSI = MCC + MNC + MSIN = 310 (USA) + 028 (UNKNOWN) + 90832150
......
......@@ -28,6 +28,7 @@
*******************************************************************************/
#include <stdint.h>
#include <stdio.h>
#include <unistd.h>
#include <gmp.h>
#ifndef AUC_H_
......
......@@ -70,11 +70,21 @@
#define MAX_NUM_CHANNEL_BITS (14*1200*6) // 14 symbols, 1200 REs, 12 bits/RE
#define MAX_NUM_RE (14*1200)
#if !defined(SI_RNTI)
#define SI_RNTI (rnti_t)0xffff
#endif
#if !defined(M_RNTI)
#define M_RNTI (rnti_t)0xfffd
#endif
#if !defined(P_RNTI)
#define P_RNTI (rnti_t)0xfffe
#endif
#if !defined(CBA_RNTI)
#define CBA_RNTI (rnti_t)0xfff4
#endif
#if !defined(C_RNTI)
#define C_RNTI (rnti_t)0x1234
#endif
#define PMI_2A_11 0
#define PMI_2A_1m1 1
......
This diff is collapsed.
......@@ -846,6 +846,29 @@ compile_unisim() {
return 1
fi
}
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
}
compile_ue_ip_nw_driver() {
cd $OPENAIR2_DIR && make ue_ip.ko
}
################################################
# 1. check if the executable functions exist
###############################################
......@@ -935,14 +958,24 @@ check_for_mbmssim_executable() {
fi
}
check_for_nas_ue_executable() {
if [ ! -f $OPENAIRCN_DIR/NAS/EURECOM-NAS/bin/UserProcess ]; then
echo_error "Cannot find UserProcess executable object in directory $OPENAIRCN_DIR/NAS/EURECOM-NAS/bin"
echo_fatal "Check the compilation logs in bin/install_log.txt"
fi
}
################################################
# 1. check if the executable functions exist
###############################################
# arg1 is RT
# arg2 is HW
# arg3 is ENB_S1
install_ltesoftmodem() {
# RT
if [ $1 = "RTAI" ]; then
if [ ! -f /tmp/init_rt_done.tmp ]; then
if [ ! -f /tmp/init_rt_done.tmp ]; then
echo_info " 8.1 Insert RTAI modules"
$SUDO insmod /usr/realtime/modules/rtai_hal.ko > /dev/null 2>&1
$SUDO insmod /usr/realtime/modules/rtai_sched.ko > /dev/null 2>&1
......@@ -980,20 +1013,40 @@ install_ltesoftmodem() {
# 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
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
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
if [ ! -f .ue.nvram ]; then
echo_success "generate .ue_emm.nvram .ue.nvram"
$OPENAIRCN_DIR/NAS/EURECOM-NAS/bin/ue_data --gen
fi
if [ ! -f .usim.nvram ]; then
echo_success "generate .usim.nvram"
$OPENAIRCN_DIR/NAS/EURECOM-NAS/bin/usim_data --gen
fi
$OPENAIRCN_DIR/NAS/EURECOM-NAS/bin/ue_data --print
$OPENAIRCN_DIR/NAS/EURECOM-NAS/bin/usim_data --print
}
##################################
# create HSS DB
################################
......
......@@ -472,7 +472,13 @@ build_enb(){
oaisim_compiled=$?
check_for_oaisim_executable
echo_info "7.2 finished oaisim target: check the installation log file bin/install_log.txt"
if [ $ENB_S1 -eq 1 ]; then
compile_nas_tools 2>&1
nas_tools_compiled=$?
check_for_nas_tools_executable
echo_info "7.2.1 finished nas ue target: check the installation log file bin/install_log.txt"
fi
fi
if [ $TARGET = "UNISIM" ]; then
echo "################## compile_unisim ##################" >> bin/install_log.txt
......@@ -800,6 +806,39 @@ if [ $RUN -ne 0 ]; then
$SUDO echo "run" >> ~/.gdb_lte_softmodem
$SUDO gdb -nh -x ~/.gdb_lte_softmodem 2>&1
fi
elif [ $TARGET == "OAISIM" ]; then
if [ $ENB_S1 -eq 0 ]; then
echo_error "TODO: LOAD NASMESH IP DRIVER FOR UE AND eNB"
else
# prepare NAS for UE
if [ ! -f .ue.nvram ]; then
echo_success "generate .ue_emm.nvram .ue.nvram"
$OPENAIRCN_DIR/NAS/EURECOM-NAS/bin/ue_data --gen
fi
if [ ! -f .usim.nvram ]; then
echo_success "generate .usim.nvram"
$OPENAIRCN_DIR/NAS/EURECOM-NAS/bin/usim_data --gen
fi
$OPENAIRCN_DIR/NAS/EURECOM-NAS/bin/ue_data --print
$OPENAIRCN_DIR/NAS/EURECOM-NAS/bin/usim_data --print
insmod $OPENAIR2_DIR/NETWORK_DRIVER/UE_IP/ue_ip.ko
fi
if [ $RUN_GDB -eq 0 ]; then
$SUDO exec $OPENAIR_TARGETS/bin/oaisim `echo $EXE_ARGUMENTS`
else
$SUDO setenv MALLOC_CHECK_ 2
$SUDO touch ~/.gdb_oaisim
$SUDO echo "file $OPENAIR_TARGETS/bin/lte-oaisim" > ~/.gdb_oaisim
$SUDO echo "set args $EXE_ARGUMENTS" >> ~/.gdb_oaisim
$SUDO echo "run" >> ~/.gdb_oaisim
$SUDO gdb -nh -x ~/.gdb_oaisim 2>&1
fi
fi
;;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment