Commit 4ae73af4 authored by Robert Schmidt's avatar Robert Schmidt

Merge remote-tracking branch 'origin/cmake-refactor' into integration_2023_w27

parents 4e18ce02 079866bf
This diff is collapsed.
...@@ -102,9 +102,6 @@ find_package(Threads REQUIRED) ...@@ -102,9 +102,6 @@ find_package(Threads REQUIRED)
set (FIRMWARE_VERSION "No svn information") set (FIRMWARE_VERSION "No svn information")
add_definitions("-DFIRMWARE_VERSION=\"${FIRMWARE_VERSION}\"") add_definitions("-DFIRMWARE_VERSION=\"${FIRMWARE_VERSION}\"")
add_boolean_option(LINUX True "????")
add_boolean_option(ENB_MODE True "????") # to avoid backtrace
########################## ##########################
# NAS LAYER OPTIONS # NAS LAYER OPTIONS
########################## ##########################
......
This diff is collapsed.
...@@ -216,35 +216,26 @@ check_errors() { ...@@ -216,35 +216,26 @@ check_errors() {
} }
compilations() { compilations() {
[[ $# -gt 2 ]] || echo_fatal "compilations needs more than three arguments"
local dir=$1 local dir=$1
shift 1 shift 1
local logfile=$1 local logfile=$1
shift 1 shift 1
local targets=$@ local targets=$@
local verbose=$([ "$VERBOSE_COMPILE" == "1" ] && echo "-v" || echo "")
echo cd $OPENAIR_DIR/cmake_targets/$dir/build
cd $OPENAIR_DIR/cmake_targets/$dir/build cd $OPENAIR_DIR/cmake_targets/$dir/build
echo_info "Log file for compilation is being written to: $dlog/$logfile" echo_info "Running \"cmake --build . $verbose --target $targets -- -j$(nproc)\"" $green
echo "Log file for compilation is being written to: $dlog/$logfile"
set +e set +e
{ {
if [ "$BUILD_COVERITY_SCAN" == "1" ]; then cmake --build . $verbose --target $targets -- -j$(nproc)
COV_SCAN_PREFIX="cov-build --dir cov-int"
else
COV_SCAN_PREFIX=""
fi
if [ "$MAKE_CMD" != "" ]; then
$MAKE_CMD $targets
else
if [ "$VERBOSE_COMPILE" == "1" ]; then
$COV_SCAN_PREFIX make -j`nproc` $targets VERBOSE=$VERBOSE_COMPILE
else
$COV_SCAN_PREFIX make -j`nproc` $targets
fi
fi
ret=$? ret=$?
} > $dlog/$logfile 2>&1 } > $dlog/$logfile 2>&1
if [ "$VERBOSE_CI" == "1" ]; then if [ "$VERBOSE_CI" == "1" ]; then
echo_info "====== Start of log for $logfile ======" echo "====== Start of log for $logfile ======"
cat $dlog/$logfile cat $dlog/$logfile
echo_info "====== End of log for $logfile ======" echo "====== End of log for $logfile ======"
fi fi
check_warnings "$dlog/$logfile" check_warnings "$dlog/$logfile"
if [[ $ret -eq 0 ]]; then if [[ $ret -eq 0 ]]; then
......
...@@ -15,7 +15,6 @@ ...@@ -15,7 +15,6 @@
/* VCD specific defines and includes /* VCD specific defines and includes
* If the codebase changes, it may need to be updated * If the codebase changes, it may need to be updated
*/ */
#define ENB_MODE
#define ENABLE_USE_CPU_EXECUTION_TIME #define ENABLE_USE_CPU_EXECUTION_TIME
#include "../LOG/vcd_signal_dumper.c" #include "../LOG/vcd_signal_dumper.c"
......
#include <stdlib.h>
#ifndef T_TRACER #ifndef T_TRACER
int T_stdout; int T_stdout;
#endif #endif
......
...@@ -874,11 +874,11 @@ INPUT = \ ...@@ -874,11 +874,11 @@ INPUT = \
@CMAKE_CURRENT_SOURCE_DIR@/../radio/rfsimulator/rfsimulator.h \ @CMAKE_CURRENT_SOURCE_DIR@/../radio/rfsimulator/rfsimulator.h \
@CMAKE_CURRENT_SOURCE_DIR@/../radio/rfsimulator/simulator.c \ @CMAKE_CURRENT_SOURCE_DIR@/../radio/rfsimulator/simulator.c \
@CMAKE_CURRENT_SOURCE_DIR@/../radio/rfsimulator/apply_channelmod.c \ @CMAKE_CURRENT_SOURCE_DIR@/../radio/rfsimulator/apply_channelmod.c \
@CMAKE_CURRENT_SOURCE_DIR@/../radio/ETHERNET/USERSPACE/LIB/if_defs.h \ @CMAKE_CURRENT_SOURCE_DIR@/../radio/ETHERNET/if_defs.h \
@CMAKE_CURRENT_SOURCE_DIR@/../radio/ETHERNET/USERSPACE/LIB/ethernet_lib.c \ @CMAKE_CURRENT_SOURCE_DIR@/../radio/ETHERNET/ethernet_lib.c \
@CMAKE_CURRENT_SOURCE_DIR@/../radio/ETHERNET/USERSPACE/LIB/eth_udp.c \ @CMAKE_CURRENT_SOURCE_DIR@/../radio/ETHERNET/eth_udp.c \
@CMAKE_CURRENT_SOURCE_DIR@/../radio/ETHERNET/USERSPACE/LIB/ethernet_lib.h \ @CMAKE_CURRENT_SOURCE_DIR@/../radio/ETHERNET/ethernet_lib.h \
@CMAKE_CURRENT_SOURCE_DIR@/../radio/ETHERNET/USERSPACE/LIB/eth_raw.c \ @CMAKE_CURRENT_SOURCE_DIR@/../radio/ETHERNET/eth_raw.c \
@CMAKE_CURRENT_SOURCE_DIR@/../common/config/config_cmdline.c \ @CMAKE_CURRENT_SOURCE_DIR@/../common/config/config_cmdline.c \
@CMAKE_CURRENT_SOURCE_DIR@/../common/config/config_paramdesc.h \ @CMAKE_CURRENT_SOURCE_DIR@/../common/config/config_paramdesc.h \
@CMAKE_CURRENT_SOURCE_DIR@/../common/config/config_userapi.h \ @CMAKE_CURRENT_SOURCE_DIR@/../common/config/config_userapi.h \
......
...@@ -35,4 +35,4 @@ COPY . . ...@@ -35,4 +35,4 @@ COPY . .
RUN /bin/sh oaienv && \ RUN /bin/sh oaienv && \
cd cmake_targets && \ cd cmake_targets && \
mkdir -p log && \ mkdir -p log && \
./build_oai --eNB --gNB --RU --UE --nrUE --ninja --build-lib "telnetsrv enbscope uescope nrscope" -w USRP --verbose-ci --noavx512 -c ./build_oai --eNB --gNB --RU --UE --nrUE --ninja --build-lib "telnetsrv enbscope uescope nrscope" -w USRP -t Ethernet --verbose-ci --noavx512 -c
...@@ -35,4 +35,4 @@ COPY . . ...@@ -35,4 +35,4 @@ COPY . .
RUN /bin/sh oaienv && \ RUN /bin/sh oaienv && \
cd cmake_targets && \ cd cmake_targets && \
mkdir -p log && \ mkdir -p log && \
./build_oai --eNB --gNB --RU --UE --nrUE --ninja --build-lib "telnetsrv enbscope uescope nrscope" -w USRP --verbose-ci --noavx512 -c ./build_oai --eNB --gNB --RU --UE --nrUE --ninja --build-lib "telnetsrv enbscope uescope nrscope" -w USRP -t Ethernet --verbose-ci --noavx512 -c
...@@ -35,4 +35,4 @@ COPY . . ...@@ -35,4 +35,4 @@ COPY . .
RUN /bin/sh oaienv && \ RUN /bin/sh oaienv && \
cd cmake_targets && \ cd cmake_targets && \
mkdir -p log && \ mkdir -p log && \
./build_oai --eNB --gNB --RU --UE --nrUE --ninja --build-lib "telnetsrv enbscope uescope nrscope nrqtscope" -w USRP --verbose-ci --noavx512 -c --cmake-opt -DCMAKE_C_FLAGS=-Werror --cmake-opt -DCMAKE_CXX_FLAGS=-Werror ./build_oai --eNB --gNB --RU --UE --nrUE --ninja --build-lib "telnetsrv enbscope uescope nrscope nrqtscope" -w USRP -t Ethernet --verbose-ci --noavx512 -c --cmake-opt -DCMAKE_C_FLAGS=-Werror --cmake-opt -DCMAKE_CXX_FLAGS=-Werror
...@@ -72,6 +72,7 @@ COPY --from=enb-build \ ...@@ -72,6 +72,7 @@ COPY --from=enb-build \
COPY --from=enb-base \ COPY --from=enb-base \
/lib64/libconfig.so.11 \ /lib64/libconfig.so.11 \
/lib64/libblas.so.3 \ /lib64/libblas.so.3 \
/lib64/libcblas.so.3 \
/lib64/liblapack.so.3 \ /lib64/liblapack.so.3 \
/lib64/liblapacke.so.3 \ /lib64/liblapacke.so.3 \
/lib64/libboost_chrono.so.1.75.0 \ /lib64/libboost_chrono.so.1.75.0 \
......
...@@ -34,8 +34,8 @@ COPY ./libori.so /usr/local/lib ...@@ -34,8 +34,8 @@ COPY ./libori.so /usr/local/lib
# build AW2S fronthaul lib # build AW2S fronthaul lib
WORKDIR /oai-ran WORKDIR /oai-ran
RUN /bin/sh oaienv && \ RUN /bin/sh oaienv && \
cd cmake_targets/ran_build/build && \ cd cmake_targets/ && \
ninja aw2sori_transpro ./build_oai -w AW2SORI -t Ethernet
#start from scratch for target executable #start from scratch for target executable
FROM registry.access.redhat.com/ubi9/ubi:latest as oai-gnb-aw2s FROM registry.access.redhat.com/ubi9/ubi:latest as oai-gnb-aw2s
...@@ -75,6 +75,7 @@ COPY --from=gnb-base \ ...@@ -75,6 +75,7 @@ COPY --from=gnb-base \
/lib64/libconfig.so.11 \ /lib64/libconfig.so.11 \
/lib64/libforms.so.2 \ /lib64/libforms.so.2 \
/lib64/libblas.so.3 \ /lib64/libblas.so.3 \
/lib64/libcblas.so.3 \
/lib64/liblapack.so.3 \ /lib64/liblapack.so.3 \
/lib64/liblapacke.so.3 \ /lib64/liblapacke.so.3 \
/lib64/ /lib64/
......
...@@ -35,8 +35,8 @@ COPY ./libori.so /usr/local/lib ...@@ -35,8 +35,8 @@ COPY ./libori.so /usr/local/lib
# build AW2S fronthaul lib # build AW2S fronthaul lib
WORKDIR /oai-ran WORKDIR /oai-ran
RUN /bin/sh oaienv && \ RUN /bin/sh oaienv && \
cd cmake_targets/ran_build/build && \ cd cmake_targets/ && \
ninja aw2sori_transpro ./build_oai -w AW2SORI -t Ethernet
#start from scratch for target executable #start from scratch for target executable
FROM $BASE_IMAGE as oai-gnb-aw2s FROM $BASE_IMAGE as oai-gnb-aw2s
......
...@@ -34,8 +34,8 @@ COPY ./libori.so /usr/local/lib/ ...@@ -34,8 +34,8 @@ COPY ./libori.so /usr/local/lib/
# build AW2S fronthaul lib # build AW2S fronthaul lib
WORKDIR /oai-ran WORKDIR /oai-ran
RUN /bin/sh oaienv && \ RUN /bin/sh oaienv && \
cd cmake_targets/ran_build/build && \ cd cmake_targets/ && \
ninja aw2sori_transpro ./build_oai -w AW2SORI -t Ethernet
#start from scratch for target executable #start from scratch for target executable
FROM ubuntu:bionic as oai-gnb-aw2s FROM ubuntu:bionic as oai-gnb-aw2s
......
...@@ -73,6 +73,7 @@ COPY --from=gnb-base \ ...@@ -73,6 +73,7 @@ COPY --from=gnb-base \
/lib64/libconfig.so.11 \ /lib64/libconfig.so.11 \
/lib64/libforms.so.2 \ /lib64/libforms.so.2 \
/lib64/libblas.so.3 \ /lib64/libblas.so.3 \
/lib64/libcblas.so.3 \
/lib64/liblapack.so.3 \ /lib64/liblapack.so.3 \
/lib64/liblapacke.so.3 \ /lib64/liblapacke.so.3 \
/lib64/libboost_chrono.so.1.75.0 \ /lib64/libboost_chrono.so.1.75.0 \
......
...@@ -66,6 +66,7 @@ COPY --from=ru-build \ ...@@ -66,6 +66,7 @@ COPY --from=ru-build \
COPY --from=ru-base \ COPY --from=ru-base \
/lib64/libconfig.so.11 \ /lib64/libconfig.so.11 \
/lib64/libblas.so.3 \ /lib64/libblas.so.3 \
/lib64/libcblas.so.3 \
/lib64/liblapack.so.3 \ /lib64/liblapack.so.3 \
/lib64/liblapacke.so.3 \ /lib64/liblapacke.so.3 \
/lib64/libboost_chrono.so.1.75.0 \ /lib64/libboost_chrono.so.1.75.0 \
......
...@@ -73,6 +73,7 @@ COPY --from=lte-ue-build \ ...@@ -73,6 +73,7 @@ COPY --from=lte-ue-build \
COPY --from=lte-ue-base \ COPY --from=lte-ue-base \
/lib64/libconfig.so.11 \ /lib64/libconfig.so.11 \
/lib64/libblas.so.3 \ /lib64/libblas.so.3 \
/lib64/libcblas.so.3 \
/lib64/liblapack.so.3 \ /lib64/liblapack.so.3 \
/lib64/liblapacke.so.3 \ /lib64/liblapacke.so.3 \
/lib64/libboost_chrono.so.1.75.0 \ /lib64/libboost_chrono.so.1.75.0 \
......
...@@ -61,6 +61,7 @@ COPY --from=gnb-build \ ...@@ -61,6 +61,7 @@ COPY --from=gnb-build \
COPY --from=gnb-base \ COPY --from=gnb-base \
/lib64/libconfig.so.11 \ /lib64/libconfig.so.11 \
/lib64/libblas.so.3 \ /lib64/libblas.so.3 \
/lib64/libcblas.so.3 \
/lib64/liblapack.so.3 \ /lib64/liblapack.so.3 \
/lib64/liblapacke.so.3 \ /lib64/liblapacke.so.3 \
/lib64/ /lib64/
......
...@@ -52,6 +52,8 @@ COPY --from=gnb-build \ ...@@ -52,6 +52,8 @@ COPY --from=gnb-build \
/oai-ran/cmake_targets/ran_build/build/libtelnetsrv.so \ /oai-ran/cmake_targets/ran_build/build/libtelnetsrv.so \
/usr/local/lib/ /usr/local/lib/
RUN ldconfig && ldd /opt/oai-gnb/bin/nr-cuup
# Create directory for configuration files # Create directory for configuration files
WORKDIR /opt/oai-gnb/etc WORKDIR /opt/oai-gnb/etc
......
...@@ -78,6 +78,7 @@ COPY --from=nr-ue-build \ ...@@ -78,6 +78,7 @@ COPY --from=nr-ue-build \
COPY --from=nr-ue-base \ COPY --from=nr-ue-base \
/lib64/libconfig.so.11 \ /lib64/libconfig.so.11 \
/lib64/libblas.so.3 \ /lib64/libblas.so.3 \
/lib64/libcblas.so.3 \
/lib64/liblapack.so.3 \ /lib64/liblapack.so.3 \
/lib64/liblapacke.so.3 \ /lib64/liblapacke.so.3 \
/lib64/libforms.so.2 \ /lib64/libforms.so.2 \
......
...@@ -83,6 +83,7 @@ COPY --from=phy-sim-build \ ...@@ -83,6 +83,7 @@ COPY --from=phy-sim-build \
/lib64/libXau.so.6 \ /lib64/libXau.so.6 \
/lib64/libforms.so.2 \ /lib64/libforms.so.2 \
/lib64/libblas.so.3 \ /lib64/libblas.so.3 \
/lib64/libcblas.so.3 \
/lib64/liblapack.so.3 \ /lib64/liblapack.so.3 \
/lib64/libexslt.so.0 \ /lib64/libexslt.so.0 \
/lib64/libxslt.so.1 \ /lib64/libxslt.so.1 \
......
...@@ -60,7 +60,7 @@ ...@@ -60,7 +60,7 @@
#include "common/utils/LOG/log.h" #include "common/utils/LOG/log.h"
#include "common/utils/LOG/vcd_signal_dumper.h" #include "common/utils/LOG/vcd_signal_dumper.h"
#include "radio/COMMON/common_lib.h" #include "radio/COMMON/common_lib.h"
#include "radio/ETHERNET/USERSPACE/LIB/ethernet_lib.h" #include "radio/ETHERNET/ethernet_lib.h"
/* these variables have to be defined before including ENB_APP/enb_paramdef.h */ /* these variables have to be defined before including ENB_APP/enb_paramdef.h */
static int DEFBANDS[] = {7}; static int DEFBANDS[] = {7};
......
...@@ -48,7 +48,7 @@ ...@@ -48,7 +48,7 @@
//#undef FRAME_LENGTH_COMPLEX_SAMPLES //there are two conflicting definitions, so we better make sure we don't use it at all //#undef FRAME_LENGTH_COMPLEX_SAMPLES //there are two conflicting definitions, so we better make sure we don't use it at all
#include "radio/COMMON/common_lib.h" #include "radio/COMMON/common_lib.h"
#include "radio/ETHERNET/USERSPACE/LIB/if_defs.h" #include "radio/ETHERNET/if_defs.h"
//#undef FRAME_LENGTH_COMPLEX_SAMPLES //there are two conflicting definitions, so we better make sure we don't use it at all //#undef FRAME_LENGTH_COMPLEX_SAMPLES //there are two conflicting definitions, so we better make sure we don't use it at all
......
...@@ -49,7 +49,7 @@ ...@@ -49,7 +49,7 @@
//#undef FRAME_LENGTH_COMPLEX_SAMPLES //there are two conflicting definitions, so we better make sure we don't use it at all //#undef FRAME_LENGTH_COMPLEX_SAMPLES //there are two conflicting definitions, so we better make sure we don't use it at all
#include "radio/COMMON/common_lib.h" #include "radio/COMMON/common_lib.h"
#include "radio/ETHERNET/USERSPACE/LIB/if_defs.h" #include "radio/ETHERNET/if_defs.h"
//#undef FRAME_LENGTH_COMPLEX_SAMPLES //there are two conflicting definitions, so we better make sure we don't use it at all //#undef FRAME_LENGTH_COMPLEX_SAMPLES //there are two conflicting definitions, so we better make sure we don't use it at all
......
...@@ -46,7 +46,7 @@ ...@@ -46,7 +46,7 @@
#include "radio/COMMON/common_lib.h" #include "radio/COMMON/common_lib.h"
#include "radio/ETHERNET/USERSPACE/LIB/if_defs.h" #include "radio/ETHERNET/if_defs.h"
#include "PHY/phy_vars.h" #include "PHY/phy_vars.h"
#include "PHY/phy_extern.h" #include "PHY/phy_extern.h"
......
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
#include "rt_profiling.h" #include "rt_profiling.h"
#include "radio/COMMON/common_lib.h" #include "radio/COMMON/common_lib.h"
#include "radio/ETHERNET/USERSPACE/LIB/ethernet_lib.h" #include "radio/ETHERNET/ethernet_lib.h"
#include "PHY/LTE_TRANSPORT/if4_tools.h" #include "PHY/LTE_TRANSPORT/if4_tools.h"
......
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
//#undef FRAME_LENGTH_COMPLEX_SAMPLES //there are two conflicting definitions, so we better make sure we don't use it at all //#undef FRAME_LENGTH_COMPLEX_SAMPLES //there are two conflicting definitions, so we better make sure we don't use it at all
#include "radio/COMMON/common_lib.h" #include "radio/COMMON/common_lib.h"
#include "radio/ETHERNET/USERSPACE/LIB/if_defs.h" #include "radio/ETHERNET/if_defs.h"
//#undef FRAME_LENGTH_COMPLEX_SAMPLES //there are two conflicting definitions, so we better make sure we don't use it at all //#undef FRAME_LENGTH_COMPLEX_SAMPLES //there are two conflicting definitions, so we better make sure we don't use it at all
......
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
#include "common/utils/nr/nr_common.h" #include "common/utils/nr/nr_common.h"
#include "radio/COMMON/common_lib.h" #include "radio/COMMON/common_lib.h"
#include "radio/ETHERNET/USERSPACE/LIB/if_defs.h" #include "radio/ETHERNET/if_defs.h"
//#undef FRAME_LENGTH_COMPLEX_SAMPLES //there are two conflicting definitions, so we better make sure we don't use it at all //#undef FRAME_LENGTH_COMPLEX_SAMPLES //there are two conflicting definitions, so we better make sure we don't use it at all
#include "openair1/PHY/MODULATION/nr_modulation.h" #include "openair1/PHY/MODULATION/nr_modulation.h"
......
...@@ -54,7 +54,7 @@ ...@@ -54,7 +54,7 @@
#include "radio/COMMON/common_lib.h" #include "radio/COMMON/common_lib.h"
#include "radio/ETHERNET/USERSPACE/LIB/ethernet_lib.h" #include "radio/ETHERNET/ethernet_lib.h"
#include "PHY/LTE_TRANSPORT/if4_tools.h" #include "PHY/LTE_TRANSPORT/if4_tools.h"
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -41,14 +41,8 @@ ...@@ -41,14 +41,8 @@
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include <linux/version.h> #include <linux/version.h>
#if defined RHEL_RELEASE_CODE && RHEL_RELEASE_CODE >= 1796 && RHEL_RELEASE_CODE != 2403 #include <lapacke_utils.h>
#include <lapacke/lapacke_utils.h> #include <lapacke.h>
#include <lapacke/lapacke.h>
#else
#include <lapacke_utils.h>
#include <lapacke.h>
#endif
#include <cblas.h>
#include "linear_preprocessing_rec.h" #include "linear_preprocessing_rec.h"
//#define DEBUG_MMSE //#define DEBUG_MMSE
......
...@@ -14,13 +14,8 @@ data storage. */ ...@@ -14,13 +14,8 @@ data storage. */
#include <cblas.h> #include <cblas.h>
#include <string.h> #include <string.h>
#include <linux/version.h> #include <linux/version.h>
#if defined RHEL_RELEASE_CODE && RHEL_RELEASE_CODE >= 1796 && RHEL_RELEASE_CODE != 2403
#include <lapacke/lapacke_utils.h>
#include <lapacke/lapacke.h>
#else
#include <lapacke_utils.h> #include <lapacke_utils.h>
#include <lapacke.h> #include <lapacke.h>
#endif
//#define DEBUG_PREPROC //#define DEBUG_PREPROC
......
...@@ -29,6 +29,13 @@ ...@@ -29,6 +29,13 @@
#* \warning #* \warning
#*/ #*/
find_library(forms NAMES forms)
if(NOT forms)
message(FATAL_ERROR "required library forms not found for building scopes")
else()
message(STATUS "libforms library, required for scopes, found at ${forms}")
endif()
include_directories ("/usr/include/X11") include_directories ("/usr/include/X11")
add_library(xforms_common OBJECT add_library(xforms_common OBJECT
lte_phy_scope.c lte_phy_scope.c
......
...@@ -50,7 +50,6 @@ int main(int argc, char **argv) { ...@@ -50,7 +50,6 @@ int main(int argc, char **argv) {
int N_RB=50; int N_RB=50;
int subCarrierFreq=30e3;
int sampling_rate=30.72e6; int sampling_rate=30.72e6;
int DFT=2048; int DFT=2048;
int TxAdvanceInDFTSize=12; int TxAdvanceInDFTSize=12;
...@@ -325,17 +324,8 @@ int main(int argc, char **argv) { ...@@ -325,17 +324,8 @@ int main(int argc, char **argv) {
while(!oai_exit) { while(!oai_exit) {
for (int i=0; i<antennas; i++) for (int i=0; i<antennas; i++)
read(fd, samplesTx[i], DFT*sizeof(c16_t)); read(fd, samplesTx[i], DFT*sizeof(c16_t));
int readBlockSize = rfdevice.trx_read_func(&rfdevice, rfdevice.trx_read_func(&rfdevice, &timestamp, samplesRx, DFT, antennas);
&timestamp, rfdevice.trx_write_func(&rfdevice, timestamp + TxAdvanceInDFTSize * DFT, samplesTx, DFT, antennas, 0);
samplesRx,
DFT,
antennas);
int txs = rfdevice.trx_write_func(&rfdevice,
timestamp+TxAdvanceInDFTSize*DFT,
samplesTx,
DFT,
antennas,
0);
} }
return 0; return 0;
......
...@@ -30,13 +30,8 @@ ...@@ -30,13 +30,8 @@
#ifndef __PLATFORM_TYPES_H__ #ifndef __PLATFORM_TYPES_H__
#define __PLATFORM_TYPES_H__ #define __PLATFORM_TYPES_H__
#if !defined(NAS_NETLINK)
#include <stdint.h> #include <stdint.h>
#include <stdbool.h> #include <stdbool.h>
#else
#include <linux/types.h>
typedef void * intptr_t;
#endif
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// GENERIC ACCESS STRATUM TYPES // GENERIC ACCESS STRATUM TYPES
......
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
#include "SystemInformationBlockType2.h" #include "SystemInformationBlockType2.h"
#include "PHY/phy_extern.h" #include "PHY/phy_extern.h"
#include "radio/ETHERNET/USERSPACE/LIB/ethernet_lib.h" #include "radio/ETHERNET/ethernet_lib.h"
#include "common/config/config_userapi.h" #include "common/config/config_userapi.h"
#include "RRC_config_tools.h" #include "RRC_config_tools.h"
#include "RRC_paramsvalues.h" #include "RRC_paramsvalues.h"
......
...@@ -47,7 +47,7 @@ ...@@ -47,7 +47,7 @@
#include "LAYER2/MAC/mac_proto.h" #include "LAYER2/MAC/mac_proto.h"
#include "PHY/phy_extern.h" #include "PHY/phy_extern.h"
#include "PHY/INIT/phy_init.h" #include "PHY/INIT/phy_init.h"
#include "radio/ETHERNET/USERSPACE/LIB/ethernet_lib.h" #include "radio/ETHERNET/ethernet_lib.h"
#include "nfapi_vnf.h" #include "nfapi_vnf.h"
#include "nfapi_pnf.h" #include "nfapi_pnf.h"
#include "executables/lte-softmodem.h" #include "executables/lte-softmodem.h"
......
...@@ -340,6 +340,8 @@ ...@@ -340,6 +340,8 @@
#include "F1AP_Cells-To-Be-Broadcast-Item.h" #include "F1AP_Cells-To-Be-Broadcast-Item.h"
#include "F1AP_QCI.h" #include "F1AP_QCI.h"
#include "f1ap_default_values.h"
#include "conversions.h" #include "conversions.h"
#include "platform_types.h" #include "platform_types.h"
#include "common/utils/LOG/log.h" #include "common/utils/LOG/log.h"
...@@ -359,22 +361,13 @@ ...@@ -359,22 +361,13 @@
#include "assertions.h" #include "assertions.h"
#if defined(ENB_MODE) #include "common/utils/LOG/log.h"
#include "common/utils/LOG/log.h" #include "f1ap_default_values.h"
#include "f1ap_default_values.h" #define F1AP_ERROR(x, args...) LOG_E(F1AP, x, ##args)
#define F1AP_ERROR(x, args...) LOG_E(F1AP, x, ##args) #define F1AP_WARN(x, args...) LOG_W(F1AP, x, ##args)
#define F1AP_WARN(x, args...) LOG_W(F1AP, x, ##args) #define F1AP_TRAF(x, args...) LOG_I(F1AP, x, ##args)
#define F1AP_TRAF(x, args...) LOG_I(F1AP, x, ##args) #define F1AP_INFO(x, args...) LOG_I(F1AP, x, ##args)
#define F1AP_INFO(x, args...) LOG_I(F1AP, x, ##args) #define F1AP_DEBUG(x, args...) LOG_I(F1AP, x, ##args)
#define F1AP_DEBUG(x, args...) LOG_I(F1AP, x, ##args)
#else
//# include "mme_default_values.h"
#define F1AP_ERROR(x, args...) do { fprintf(stdout, "[F1AP][E]"x, ##args); } while(0)
#define F1AP_WARN(x, args...) do { fprintf(stdout, "[F1AP][W]"x, ##args); } while(0)
#define F1AP_TRAF(x, args...) do { fprintf(stdout, "[F1AP][T]"x, ##args); } while(0)
#define F1AP_INFO(x, args...) do { fprintf(stdout, "[F1AP][I]"x, ##args); } while(0)
#define F1AP_DEBUG(x, args...) do { fprintf(stdout, "[F1AP][D]"x, ##args); } while(0)
#endif
//Forward declaration //Forward declaration
#define F1AP_FIND_PROTOCOLIE_BY_ID(IE_TYPE, ie, container, IE_ID, mandatory) \ #define F1AP_FIND_PROTOCOLIE_BY_ID(IE_TYPE, ie, container, IE_ID, mandatory) \
......
...@@ -51,7 +51,7 @@ ...@@ -51,7 +51,7 @@
// #include "LAYER2/MAC/extern.h" // #include "LAYER2/MAC/extern.h"
// #include "LAYER2/MAC/proto.h" // #include "LAYER2/MAC/proto.h"
#include "PHY/INIT/nr_phy_init.h" #include "PHY/INIT/nr_phy_init.h"
#include "radio/ETHERNET/USERSPACE/LIB/ethernet_lib.h" #include "radio/ETHERNET/ethernet_lib.h"
#include "nfapi_vnf.h" #include "nfapi_vnf.h"
#include "nfapi_pnf.h" #include "nfapi_pnf.h"
#include "nr_pdcp/nr_pdcp_oai_api.h" #include "nr_pdcp/nr_pdcp_oai_api.h"
......
...@@ -24,7 +24,6 @@ ...@@ -24,7 +24,6 @@
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include <stdint.h> #include <stdint.h>
#include <openssl/cmac.h>
#include "openair3/SECU/secu_defs.h" #include "openair3/SECU/secu_defs.h"
#include "openair3/SECU/key_nas_deriver.h" #include "openair3/SECU/key_nas_deriver.h"
......
...@@ -33,6 +33,7 @@ ...@@ -33,6 +33,7 @@
#include "sctp_eNB_defs.h" #include "sctp_eNB_defs.h"
#include "m2ap_default_values.h"
#include "m2ap_ids.h" //looks X2AP specific for HO #include "m2ap_ids.h" //looks X2AP specific for HO
#include "m2ap_timers.h" #include "m2ap_timers.h"
......
...@@ -52,19 +52,12 @@ ...@@ -52,19 +52,12 @@
extern int asn1_xer_print; extern int asn1_xer_print;
#if defined(ENB_MODE) #include "common/utils/LOG/log.h"
# include "common/utils/LOG/log.h" #include "m2ap_default_values.h"
# include "m2ap_default_values.h" #define M2AP_INFO(x, args...) LOG_I(M2AP, x, ##args)
# define M2AP_INFO(x, args...) LOG_I(M2AP, x, ##args) #define M2AP_ERROR(x, args...) LOG_E(M2AP, x, ##args)
# define M2AP_ERROR(x, args...) LOG_E(M2AP, x, ##args) #define M2AP_WARN(x, args...) LOG_W(M2AP, x, ##args)
# define M2AP_WARN(x, args...) LOG_W(M2AP, x, ##args) #define M2AP_DEBUG(x, args...) LOG_D(M2AP, x, ##args)
# define M2AP_DEBUG(x, args...) LOG_D(M2AP, x, ##args)
#else
# define M2AP_INFO(x, args...) do { fprintf(stdout, "[M2AP][I]"x, ##args); } while(0)
# define M2AP_ERROR(x, args...) do { fprintf(stdout, "[M2AP][E]"x, ##args); } while(0)
# define M2AP_WARN(x, args...) do { fprintf(stdout, "[M2AP][W]"x, ##args); } while(0)
# define M2AP_DEBUG(x, args...) do { fprintf(stdout, "[M2AP][D]"x, ##args); } while(0)
#endif
#define M2AP_FIND_PROTOCOLIE_BY_ID(IE_TYPE, ie, container, IE_ID, mandatory) \ #define M2AP_FIND_PROTOCOLIE_BY_ID(IE_TYPE, ie, container, IE_ID, mandatory) \
do {\ do {\
......
...@@ -33,6 +33,7 @@ ...@@ -33,6 +33,7 @@
#include "sctp_eNB_defs.h" #include "sctp_eNB_defs.h"
#include "m2ap_default_values.h"
#include "m2ap_ids.h" //looks X2AP specific for HO #include "m2ap_ids.h" //looks X2AP specific for HO
#include "m2ap_timers.h" #include "m2ap_timers.h"
......
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
#include "LAYER2/MAC/mac_proto.h" #include "LAYER2/MAC/mac_proto.h"
#include "PHY/phy_extern.h" #include "PHY/phy_extern.h"
#include "PHY/INIT/phy_init.h" #include "PHY/INIT/phy_init.h"
#include "radio/ETHERNET/USERSPACE/LIB/ethernet_lib.h" #include "radio/ETHERNET/ethernet_lib.h"
#include "nfapi_vnf.h" #include "nfapi_vnf.h"
#include "nfapi_pnf.h" #include "nfapi_pnf.h"
......
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
#include "openair2/RRC/NR_UE/rrc_vars.h" #include "openair2/RRC/NR_UE/rrc_vars.h"
#include "openair2/GNB_APP/L1_nr_paramdef.h" #include "openair2/GNB_APP/L1_nr_paramdef.h"
#include "openair2/GNB_APP/gnb_paramdef.h" #include "openair2/GNB_APP/gnb_paramdef.h"
#include "radio/ETHERNET/USERSPACE/LIB/if_defs.h" #include "radio/ETHERNET/if_defs.h"
#include <stdio.h> #include <stdio.h>
#include "openair2/GNB_APP/MACRLC_nr_paramdef.h" #include "openair2/GNB_APP/MACRLC_nr_paramdef.h"
......
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
#include "openair2/PHY_INTERFACE/phy_stub_UE.h" #include "openair2/PHY_INTERFACE/phy_stub_UE.h"
#include "openair2/ENB_APP/L1_paramdef.h" #include "openair2/ENB_APP/L1_paramdef.h"
#include "openair2/ENB_APP/enb_paramdef.h" #include "openair2/ENB_APP/enb_paramdef.h"
#include "radio/ETHERNET/USERSPACE/LIB/if_defs.h" #include "radio/ETHERNET/if_defs.h"
#include "common/config/config_load_configmodule.h" #include "common/config/config_load_configmodule.h"
#include "common/config/config_userapi.h" #include "common/config/config_userapi.h"
#include <arpa/inet.h> #include <arpa/inet.h>
......
...@@ -49,18 +49,11 @@ ...@@ -49,18 +49,11 @@
extern int asn1_xer_print; extern int asn1_xer_print;
#if defined(ENB_MODE) #include "common/utils/LOG/log.h"
# include "common/utils/LOG/log.h" #define X2AP_INFO(x, args...) LOG_I(X2AP, x, ##args)
# define X2AP_INFO(x, args...) LOG_I(X2AP, x, ##args) #define X2AP_ERROR(x, args...) LOG_E(X2AP, x, ##args)
# define X2AP_ERROR(x, args...) LOG_E(X2AP, x, ##args) #define X2AP_WARN(x, args...) LOG_W(X2AP, x, ##args)
# define X2AP_WARN(x, args...) LOG_W(X2AP, x, ##args) #define X2AP_DEBUG(x, args...) LOG_D(X2AP, x, ##args)
# define X2AP_DEBUG(x, args...) LOG_D(X2AP, x, ##args)
#else
# define X2AP_INFO(x, args...) do { fprintf(stdout, "[X2AP][I]"x, ##args); } while(0)
# define X2AP_ERROR(x, args...) do { fprintf(stdout, "[X2AP][E]"x, ##args); } while(0)
# define X2AP_WARN(x, args...) do { fprintf(stdout, "[X2AP][W]"x, ##args); } while(0)
# define X2AP_DEBUG(x, args...) do { fprintf(stdout, "[X2AP][D]"x, ##args); } while(0)
#endif
#define X2AP_FIND_PROTOCOLIE_BY_ID(IE_TYPE, ie, container, IE_ID, mandatory) \ #define X2AP_FIND_PROTOCOLIE_BY_ID(IE_TYPE, ie, container, IE_ID, mandatory) \
do {\ do {\
......
...@@ -33,6 +33,7 @@ ...@@ -33,6 +33,7 @@
#include "sctp_eNB_defs.h" #include "sctp_eNB_defs.h"
#include "m3ap_default_values.h"
#include "m3ap_ids.h" //looks X2AP specific for HO #include "m3ap_ids.h" //looks X2AP specific for HO
#include "m3ap_timers.h" #include "m3ap_timers.h"
......
...@@ -33,6 +33,7 @@ ...@@ -33,6 +33,7 @@
#include "sctp_eNB_defs.h" #include "sctp_eNB_defs.h"
#include "m3ap_default_values.h"
#include "m3ap_ids.h" //looks X2AP specific for HO #include "m3ap_ids.h" //looks X2AP specific for HO
#include "m3ap_timers.h" #include "m3ap_timers.h"
......
...@@ -50,19 +50,12 @@ ...@@ -50,19 +50,12 @@
extern int asn1_xer_print; extern int asn1_xer_print;
#if defined(ENB_MODE) #include "common/utils/LOG/log.h"
# include "common/utils/LOG/log.h" #include "m3ap_default_values.h"
# include "m3ap_default_values.h" #define M3AP_INFO(x, args...) LOG_I(M3AP, x, ##args)
# define M3AP_INFO(x, args...) LOG_I(M3AP, x, ##args) #define M3AP_ERROR(x, args...) LOG_E(M3AP, x, ##args)
# define M3AP_ERROR(x, args...) LOG_E(M3AP, x, ##args) #define M3AP_WARN(x, args...) LOG_W(M3AP, x, ##args)
# define M3AP_WARN(x, args...) LOG_W(M3AP, x, ##args) #define M3AP_DEBUG(x, args...) LOG_D(M3AP, x, ##args)
# define M3AP_DEBUG(x, args...) LOG_D(M3AP, x, ##args)
#else
# define M3AP_INFO(x, args...) do { fprintf(stdout, "[M3AP][I]"x, ##args); } while(0)
# define M3AP_ERROR(x, args...) do { fprintf(stdout, "[M3AP][E]"x, ##args); } while(0)
# define M3AP_WARN(x, args...) do { fprintf(stdout, "[M3AP][W]"x, ##args); } while(0)
# define M3AP_DEBUG(x, args...) do { fprintf(stdout, "[M3AP][D]"x, ##args); } while(0)
#endif
#define M3AP_FIND_PROTOCOLIE_BY_ID(IE_TYPE, ie, container, IE_ID, mandatory) \ #define M3AP_FIND_PROTOCOLIE_BY_ID(IE_TYPE, ie, container, IE_ID, mandatory) \
do {\ do {\
......
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
#include "LAYER2/MAC/mac_proto.h" #include "LAYER2/MAC/mac_proto.h"
#include "PHY/phy_extern.h" #include "PHY/phy_extern.h"
#include "PHY/INIT/phy_init.h" #include "PHY/INIT/phy_init.h"
#include "radio/ETHERNET/USERSPACE/LIB/ethernet_lib.h" #include "radio/ETHERNET/ethernet_lib.h"
#include "nfapi_vnf.h" #include "nfapi_vnf.h"
#include "nfapi_pnf.h" #include "nfapi_pnf.h"
......
...@@ -96,7 +96,6 @@ ...@@ -96,7 +96,6 @@
extern int asn_debug; extern int asn_debug;
extern int asn1_xer_print; extern int asn1_xer_print;
#if defined(ENB_MODE)
# include "common/utils/LOG/log.h" # include "common/utils/LOG/log.h"
# include "ngap_gNB_default_values.h" # include "ngap_gNB_default_values.h"
# define NGAP_ERROR(x, args...) LOG_E(NGAP, x, ##args) # define NGAP_ERROR(x, args...) LOG_E(NGAP, x, ##args)
...@@ -104,14 +103,6 @@ extern int asn1_xer_print; ...@@ -104,14 +103,6 @@ extern int asn1_xer_print;
# define NGAP_TRAF(x, args...) LOG_I(NGAP, x, ##args) # define NGAP_TRAF(x, args...) LOG_I(NGAP, x, ##args)
# define NGAP_INFO(x, args...) LOG_I(NGAP, x, ##args) # define NGAP_INFO(x, args...) LOG_I(NGAP, x, ##args)
# define NGAP_DEBUG(x, args...) LOG_I(NGAP, x, ##args) # define NGAP_DEBUG(x, args...) LOG_I(NGAP, x, ##args)
#else
# include "amf_default_values.h"
# define NGAP_ERROR(x, args...) do { fprintf(stdout, "[NGAP][E]"x, ##args); } while(0)
# define NGAP_WARN(x, args...) do { fprintf(stdout, "[NGAP][W]"x, ##args); } while(0)
# define NGAP_TRAF(x, args...) do { fprintf(stdout, "[NGAP][T]"x, ##args); } while(0)
# define NGAP_INFO(x, args...) do { fprintf(stdout, "[NGAP][I]"x, ##args); } while(0)
# define NGAP_DEBUG(x, args...) do { fprintf(stdout, "[NGAP][D]"x, ##args); } while(0)
#endif
#define NGAP_FIND_PROTOCOLIE_BY_ID(IE_TYPE, ie, container, IE_ID, mandatory) \ #define NGAP_FIND_PROTOCOLIE_BY_ID(IE_TYPE, ie, container, IE_ID, mandatory) \
do { \ do { \
......
...@@ -52,21 +52,13 @@ ...@@ -52,21 +52,13 @@
extern int asn1_xer_print; extern int asn1_xer_print;
#if defined(ENB_MODE) #include "common/utils/LOG/log.h"
# include "common/utils/LOG/log.h" #include "s1ap_eNB_default_values.h"
# include "s1ap_eNB_default_values.h" #define S1AP_ERROR(x, args...) LOG_E(S1AP, x, ##args)
# define S1AP_ERROR(x, args...) LOG_E(S1AP, x, ##args) #define S1AP_WARN(x, args...) LOG_W(S1AP, x, ##args)
# define S1AP_WARN(x, args...) LOG_W(S1AP, x, ##args) #define S1AP_TRAF(x, args...) LOG_I(S1AP, x, ##args)
# define S1AP_TRAF(x, args...) LOG_I(S1AP, x, ##args) #define S1AP_INFO(x, args...) LOG_I(S1AP, x, ##args)
# define S1AP_INFO(x, args...) LOG_I(S1AP, x, ##args) #define S1AP_DEBUG(x, args...) LOG_I(S1AP, x, ##args)
# define S1AP_DEBUG(x, args...) LOG_I(S1AP, x, ##args)
#else
# define S1AP_ERROR(x, args...) do { fprintf(stdout, "[S1AP][E]"x, ##args); } while(0)
# define S1AP_WARN(x, args...) do { fprintf(stdout, "[S1AP][W]"x, ##args); } while(0)
# define S1AP_TRAF(x, args...) do { fprintf(stdout, "[S1AP][T]"x, ##args); } while(0)
# define S1AP_INFO(x, args...) do { fprintf(stdout, "[S1AP][I]"x, ##args); } while(0)
# define S1AP_DEBUG(x, args...) do { fprintf(stdout, "[S1AP][D]"x, ##args); } while(0)
#endif
#define S1AP_FIND_PROTOCOLIE_BY_ID(IE_TYPE, ie, container, IE_ID, mandatory) \ #define S1AP_FIND_PROTOCOLIE_BY_ID(IE_TYPE, ie, container, IE_ID, mandatory) \
......
...@@ -34,16 +34,10 @@ ...@@ -34,16 +34,10 @@
#include <stdint.h> #include <stdint.h>
#include <sys/socket.h> #include <sys/socket.h>
#if defined(ENB_MODE) #include "common/utils/LOG/log.h"
# include "common/utils/LOG/log.h" #define SCTP_ERROR(x, args...) LOG_E(SCTP, x, ##args)
# define SCTP_ERROR(x, args...) LOG_E(SCTP, x, ##args) #define SCTP_DEBUG(x, args...) LOG_D(SCTP, x, ##args)
# define SCTP_DEBUG(x, args...) LOG_D(SCTP, x, ##args) #define SCTP_WARN(x, args...) LOG_W(SCTP, x, ##args)
# define SCTP_WARN(x, args...) LOG_W(SCTP, x, ##args)
#else
# define SCTP_ERROR(x, args...) do { fprintf(stderr, "[SCTP][E]"x, ##args); } while(0)
# define SCTP_DEBUG(x, args...) do { fprintf(stdout, "[SCTP][D]"x, ##args); } while(0)
# define SCTP_WARN(x, args...) do { fprintf(stdout, "[SCTP][W]"x, ##args); } while(0)
#endif
int sctp_set_init_opt(int sd, uint16_t instreams, uint16_t outstreams, int sctp_set_init_opt(int sd, uint16_t instreams, uint16_t outstreams,
uint16_t max_attempts, uint16_t init_timeout); uint16_t max_attempts, uint16_t init_timeout);
......
find_library(ori NAMES "libori.so" REQUIRED)
if(NOT ori)
message(FATAL_ERROR "cannot locate libori.so, required to build aw2sori_transpro")
endif()
# force that oai_eth_transpro is built as well, as aw2sori_transpro requires it
if(NOT OAI_ETHERNET)
message(FATAL_ERROR "aw2sori_transpro requires oai_eth_transpro, please enable OAI_ETHERNET (-DOAI_ETHERNET=ON for cmake, or ./build_oai -t Ethernet)")
endif()
add_library(aw2sori_transpro MODULE oaiori.c)
target_compile_options(aw2sori_transpro PRIVATE -shared -fPIC -msse4 -g -ggdb -DLITE_COMPILATION)
target_link_libraries(aw2sori_transpro PRIVATE ori oai_eth_transpro)
set_target_properties(aw2sori_transpro PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
add_custom_command(TARGET aw2sori_transpro POST_BUILD
COMMAND ${CMAKE_COMMAND} -E create_symlink libaw2sori_transpro.so libthirdparty_transpro.so
WORKING_DIRECTORY ${CMAKE_BINARY_DIR})
pkg_check_modules(bladeRF REQUIRED libbladeRF)
add_library(oai_bladerfdevif MODULE bladerf_lib.c)
target_link_libraries(oai_bladerfdevif PRIVATE bladeRF)
set_target_properties(oai_bladerfdevif PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
add_custom_command(TARGET oai_bladerfdevif POST_BUILD
COMMAND ${CMAKE_COMMAND} -E create_symlink liboai_bladerfdevif.so liboai_device.so
WORKING_DIRECTORY ${CMAKE_BINARY_DIR})
add_boolean_option(OAI_AW2SORI OFF "Activate OAI's AW2S driver" OFF)
if(OAI_AW2SORI)
add_subdirectory(AW2SORI)
endif()
add_boolean_option(OAI_ETHERNET OFF "Activate OAI's Ethernet transport driver" OFF)
if(OAI_ETHERNET)
add_subdirectory(ETHERNET)
endif()
add_boolean_option(OAI_BLADERF OFF "Activate OAI's BladeRF driver" OFF)
if(OAI_BLADERF)
add_subdirectory(BLADERF)
endif()
add_boolean_option(OAI_IRIS OFF "Activate OAI's IRIS/SoapySDR driver" OFF)
if(OAI_IRIS)
add_subdirectory(IRIS)
endif()
add_boolean_option(OAI_LMSSDR OFF "Activate OAI's LimeSDR driver" OFF)
if(OAI_LMSSDR)
add_subdirectory(LMSSDR)
endif()
add_boolean_option(OAI_SIMU ON "Activate OAI's rfsimulator driver" OFF)
if(OAI_SIMU)
add_subdirectory(rfsimulator)
endif()
add_boolean_option(OAI_USRP OFF "Activate OAI's USRP driver" OFF)
if(OAI_USRP)
add_subdirectory(USRP)
endif()
add_library(oai_eth_transpro MODULE
ethernet_lib.c
eth_udp.c
eth_raw.c
)
target_include_directories(oai_eth_transpro PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
set_target_properties(oai_eth_transpro PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
add_custom_command(TARGET oai_eth_transpro POST_BUILD
COMMAND ${CMAKE_COMMAND} -E create_symlink liboai_eth_transpro.so liboai_transpro.so
WORKING_DIRECTORY ${CMAKE_BINARY_DIR})
add_subdirectory(benetel)
pkg_check_modules(libdpdk REQUIRED libdpdk=20.05.0)
add_library(benetel_4g MODULE
benetel.c
shared_buffers.c
low.c
low_dpdk.c
dpdk_driver.c
)
target_compile_definitions(benetel_4g PROPERTIES COMPILE_FLAGS "-fvisibility=hidden -I$ENV{RTE_SDK}/$ENV{RTE_TARGET}/include")
SET(DPDK_LIBS "-Wl,-rpath,$ENV{RTE_SDK}/$ENV{RTE_TARGET}/lib -Wl,--whole-archive -L$ENV{RTE_SDK}/$ENV{RTE_TARGET}/lib -ldpdk -Wl,--no-whole-archive")
target_include_directories(benetel_4g PRIVATE ${libdpdk_INCLUDE_DIRS})
target_link_libraries(benetel_4g PRIVATE ${libdpdk_LIBRARIES})
target_link_libraries(benetel_4g PRIVATE pthread dl rt m numa)
set_target_properties(benetel_4g PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
add_custom_command(TARGET benetel_4g POST_BUILD
COMMAND ${CMAKE_COMMAND} -E create_symlink libbenetel_4g.so liboai_transpro.so
WORKING_DIRECTORY ${CMAKE_BINARY_DIR})
pkg_check_modules(libdpdk REQUIRED libdpdk=20.05.0)
add_library(benetel_5g MODULE
benetel.c
shared_buffers.c
low.c
low_dpdk.c
dpdk_driver.c
)
SET(DPDK_LIBS "-Wl,-rpath,$ENV{RTE_SDK}/$ENV{RTE_TARGET}/lib -Wl,--whole-archive -L$ENV{RTE_SDK}/$ENV{RTE_TARGET}/lib -ldpdk -Wl,--no-whole-archive")
target_include_directories(benetel_5g PRIVATE ${libdpdk_INCLUDE_DIRS})
target_link_libraries(benetel_5g PRIVATE ${libdpdk_LIBRARIES})
target_link_libraries(benetel_5g PRIVATE pthread dl rt m numa)
set_target_properties(benetel_5g PROPERTIES COMPILE_FLAGS "-fvisibility=hidden -I$ENV{RTE_SDK}/$ENV{RTE_TARGET}/include")
set_target_properties(benetel_5g PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
add_custom_command(TARGET benetel_5g POST_BUILD
COMMAND ${CMAKE_COMMAND} -E create_symlink libbenetel_5g.so liboai_transpro.so
WORKING_DIRECTORY ${CMAKE_BINARY_DIR})
add_boolean_option(OAI_BENETEL4G OFF "Activate OAI's Benetel 4G radio driver" OFF)
if(OAI_BENETEL4G)
add_subdirectory(4g)
endif()
add_boolean_option(OAI_BENETEL5G OFF "Activate OAI's Benetel 5G radio driver" OFF)
if(OAI_BENETEL5G)
add_subdirectory(5g)
endif()
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
* contact@openairinterface.org * contact@openairinterface.org
*/ */
/*! \file radio/ETHERNET/USERSPACE/LIB/if_defs.h /*! \file radio/ETHERNET/if_defs.h
* \brief * \brief
* \author S. Sandeep Kumar, Raymond Knopp * \author S. Sandeep Kumar, Raymond Knopp
* \date 2016 * \date 2016
......
find_package(SoapySDR REQUIRED)
add_library(oai_irisdevif MODULE iris_lib.cpp)
target_link_libraries(oai_irisdevif PRIVATE SoapySDR)
set_target_properties(oai_irisdevif PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
add_custom_command(TARGET oai_irisdevif POST_BUILD
COMMAND ${CMAKE_COMMAND} -E create_symlink liboai_irisdevif.so liboai_device.so
WORKING_DIRECTORY ${CMAKE_BINARY_DIR})
find_package(LimeSuite REQUIRED)
add_library(oai_lmssdrdevif MODULE lms_lib.cpp)
target_link_libraries(oai_lmssdrdevif LimeSuite )
set_target_properties(oai_lmssdrdevif PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
add_custom_command(TARGET oai_lmssdrdevif POST_BUILD
COMMAND ${CMAKE_COMMAND} -E create_symlink liboai_lmssdrdevif.so liboai_device.so
WORKING_DIRECTORY ${CMAKE_BINARY_DIR})
#find_package(Boost REQUIRED)
find_package(UHD REQUIRED)
add_library(oai_usrpdevif MODULE usrp_lib.cpp)
#target_include_directories(oai_usrpdevif PRIVATE Boost::boost)
target_link_libraries(oai_usrpdevif uhd)
set_target_properties(oai_usrpdevif PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
add_custom_command(TARGET oai_usrpdevif POST_BUILD
COMMAND ${CMAKE_COMMAND} -E create_symlink liboai_usrpdevif.so liboai_device.so
WORKING_DIRECTORY ${CMAKE_BINARY_DIR})
add_library(rfsimulator MODULE
simulator.c
apply_channelmod.c
../../openair1/PHY/TOOLS/signal_energy.c
)
target_link_libraries(rfsimulator PRIVATE SIMU)
target_link_libraries(rfsimulator PRIVATE asn1_nr_rrc asn1_lte_rrc)
set_target_properties(rfsimulator PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
add_executable(replay_node stored_node.c)
target_link_libraries (replay_node minimal_lib)
CC = gcc
MPICC = gcc #mpicc
RM_F_V = rm -f -v
PWD = $(shell pwd)
export CC
export MPICC
export RM_F_V
export PWD
OBJS_DIR := $(PWD)/objs
SVN_REV := $(shell svnversion -n .)
DATE_REV := $(shell date '+%F %T')
NUM_CORES:=$(shell cat /proc/cpuinfo | grep processor | wc -l)
OPENSSL_FOUND := $(shell if pkg-config --exists openssl; then echo "1" ; else echo "0"; fi)
ifeq ($(OPENSSL_FOUND), 1)
OPENSSL_LIBS := $(shell pkg-config --libs openssl)
#else
#@echo "package openssl not installed"
endif
PGM_FOUND := $(shell if pkg-config --exists openpgm-5.1; then echo "1" ; else echo "0"; fi)
ifeq ($(PGM_FOUND), 1)
PGM_CFLAGS := $(shell pkg-config --cflags openpgm-5.1)
PGM_LIBS := $(shell pkg-config --libs openpgm-5.1)
#else
#@echo "package pgm not installed"
endif
LIBXML2_FOUND := $(shell if pkg-config --exists libxml-2.0; then echo "1" ; else echo "0"; fi)
ifeq ($(LIBXML2_FOUND), 1)
LIBXML2_CFLAGS := $(shell pkg-config --cflags libxml-2.0)
LIBXML2_LIBS := $(shell pkg-config --libs libxml-2.0)
#else
#@echo "package libxml2 not installed"
endif
XPM_FOUND := $(shell if pkg-config --exists xpm; then echo "1" ; else echo "0"; fi)
ifeq ($(XPM_FOUND), 1)
XPM_LIBS := $(shell pkg-config --libs xpm)
#else
#@echo "package xmp not installed"
endif
LIBBLAS_FOUND := $(shell if [ -f /usr/include/cblas.h ]; then echo "1"; else echo "0"; fi)
ifeq ($(LIBBLAS_FOUND), 1)
LIBBLAS_LIBS := -lblas
else
$(error "libblas not found, please install it")
endif
#Export common libs
LIBS = \
-lm \
$(LIBBLAS_LIBS) \
$(LIBXML2_LIBS) \
$(XPM_LIBS)
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