mirror of
https://gitlab.eurecom.fr/oai/openairinterface5g.git
synced 2026-07-20 16:10:29 +00:00
Compare commits
10 Commits
develop
...
feature/cs
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0f02037375 | ||
|
|
6a6d3cd78d | ||
|
|
17cf7ef8e3 | ||
|
|
8985761ed4 | ||
|
|
aa4e459a43 | ||
|
|
e86950a5d2 | ||
|
|
933899b749 | ||
|
|
750102ece5 | ||
|
|
21400b5b80 | ||
|
|
52117339e1 |
126
docker/Dockerfile.gNB.csi.ubuntu
Normal file
126
docker/Dockerfile.gNB.csi.ubuntu
Normal file
@@ -0,0 +1,126 @@
|
||||
# SPDX-License-Identifier: LicenseRef-CSSL-1.0
|
||||
#
|
||||
# Dockerfile for OAI gNB with CSI per-RB logging
|
||||
# Based on Dockerfile.gNB.ubuntu with CSI logging addition
|
||||
#
|
||||
|
||||
ARG UBUNTU_IMAGE=ubuntu:noble
|
||||
FROM ran-base:latest AS gnb-base
|
||||
|
||||
FROM ran-build:latest AS gnb-build
|
||||
|
||||
# Build CSI logging library in builder
|
||||
RUN cd /tmp && \
|
||||
git clone https://github.com/turletti/oai-csi-logging.git && \
|
||||
cd oai-csi-logging && \
|
||||
mkdir -p build && cd build && \
|
||||
cmake .. && \
|
||||
make && \
|
||||
make install && \
|
||||
ldconfig
|
||||
|
||||
# Start from scratch for target executable
|
||||
FROM ${UBUNTU_IMAGE} AS oai-gnb-csi
|
||||
ARG BUILD_OPTION
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
ENV TZ=Europe/Paris
|
||||
|
||||
RUN apt-get update && \
|
||||
apt-get upgrade --yes && \
|
||||
apt-get install --yes \
|
||||
software-properties-common \
|
||||
procps \
|
||||
libsctp1 \
|
||||
libboost-chrono1.83.0 \
|
||||
libboost-date-time1.83.0 \
|
||||
libboost-filesystem1.83.0 \
|
||||
libboost-regex1.83.0 \
|
||||
libboost-serialization1.83.0 \
|
||||
libboost-thread1.83.0 \
|
||||
libboost-system1.83.0 \
|
||||
libboost-program-options1.83.0 \
|
||||
tzdata \
|
||||
libconfig9 \
|
||||
openssl \
|
||||
net-tools \
|
||||
iperf \
|
||||
iperf3 \
|
||||
iproute2 \
|
||||
iputils-ping \
|
||||
gdb \
|
||||
python3 \
|
||||
python3-six \
|
||||
python3-requests \
|
||||
libusb-1.0-0 \
|
||||
libyaml-cpp-dev \
|
||||
libnanomsg5 \
|
||||
libzmq5 && \
|
||||
/bin/bash -c 'if [[ "$BUILD_OPTION" = "--sanitize" ]]; then DEBIAN_FRONTEND=noninteractive apt-get install --yes \
|
||||
libasan8 \
|
||||
libubsan1; fi' && \
|
||||
apt-get clean -y && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
WORKDIR /opt/oai-gnb/bin
|
||||
COPY --from=gnb-build \
|
||||
/oai-ran/cmake_targets/ran_build/build/nr-softmodem ./
|
||||
COPY ./docker/scripts/gnb_entrypoint.sh ./entrypoint.sh
|
||||
COPY ./docker/scripts/check-prach-io.sh ./check-prach-io.sh
|
||||
|
||||
COPY --from=gnb-build \
|
||||
/oai-ran/cmake_targets/ran_build/build/liboai_eth_transpro.so \
|
||||
/oai-ran/cmake_targets/ran_build/build/librfsimulator.so \
|
||||
/oai-ran/cmake_targets/ran_build/build/liboai_usrpdevif.so \
|
||||
/oai-ran/cmake_targets/ran_build/build/liboai_bladerfdevif.so \
|
||||
/oai-ran/cmake_targets/ran_build/build/libcoding.so \
|
||||
/oai-ran/cmake_targets/ran_build/build/libparams_libconfig.so \
|
||||
/oai-ran/cmake_targets/ran_build/build/libdfts.so \
|
||||
/oai-ran/cmake_targets/ran_build/build/libldpc*.so \
|
||||
/oai-ran/cmake_targets/ran_build/build/libtelnetsrv.so \
|
||||
/oai-ran/cmake_targets/ran_build/build/libtelnetsrv_ci.so \
|
||||
/oai-ran/cmake_targets/ran_build/build/libparams_yaml.so \
|
||||
/oai-ran/cmake_targets/ran_build/build/libtelnetsrv_bearer.so \
|
||||
/oai-ran/cmake_targets/ran_build/build/libtelnetsrv_5Gue.so \
|
||||
/oai-ran/cmake_targets/ran_build/build/libtelnetsrv_rrc.so \
|
||||
/oai-ran/cmake_targets/ran_build/build/libtelnetsrv_o1.so \
|
||||
/oai-ran/cmake_targets/ran_build/build/libvrtsim.so \
|
||||
/oai-ran/cmake_targets/ran_build/build/liboai_zmqdevif.so \
|
||||
/usr/local/lib/
|
||||
|
||||
# Copy CSI logging library (NEW)
|
||||
COPY --from=gnb-build /usr/local/lib/libcsi_logging.so /usr/local/lib/
|
||||
|
||||
# Now we are copying from builder-image the UHD files.
|
||||
COPY --from=gnb-base /usr/local/bin/uhd_find_devices /usr/local/bin
|
||||
COPY --from=gnb-base /usr/local/lib/libuhd.so.4.8.0 /usr/local/lib
|
||||
COPY --from=gnb-base /usr/local/lib/uhd/utils/uhd_images_downloader.py /opt/oai-gnb/bin
|
||||
## Copy E2 SM models
|
||||
COPY --from=gnb-build /usr/local/lib/flexric /usr/local/lib/flexric
|
||||
|
||||
# Copy BladeRF runtime from base image
|
||||
COPY --from=gnb-base /usr/local/lib/libbladeRF* /usr/local/lib/
|
||||
|
||||
RUN /bin/bash -c "ln -s /usr/local/lib/liboai_usrpdevif.so /usr/local/lib/liboai_device.so" && \
|
||||
ldconfig && \
|
||||
echo "---- ldd on nr-softmodem ----" && \
|
||||
ldd /opt/oai-gnb/bin/nr-softmodem && \
|
||||
echo "---- ldd on shared libraries ----" && \
|
||||
ldd /usr/local/lib/liboai_eth_transpro.so \
|
||||
/usr/local/lib/librfsimulator.so \
|
||||
/usr/local/lib/liboai_usrpdevif.so \
|
||||
/usr/local/lib/liboai_bladerfdevif.so \
|
||||
/usr/local/lib/libcoding.so \
|
||||
/usr/local/lib/libparams_libconfig.so \
|
||||
/usr/local/lib/libdfts.so \
|
||||
/usr/local/lib/libldpc*.so \
|
||||
/usr/local/lib/libtelnetsrv.so \
|
||||
/usr/local/lib/libtelnetsrv_ci.so \
|
||||
/usr/local/lib/libuhd.so.4.8.0 \
|
||||
/usr/local/lib/liboai_zmqdevif.so
|
||||
|
||||
WORKDIR /opt/oai-gnb
|
||||
|
||||
COPY --from=gnb-base /usr/local/bin/yq /usr/local/bin/yq
|
||||
COPY --from=gnb-base /tini /tini
|
||||
ENTRYPOINT ["/tini", "-v", "--", "/opt/oai-gnb/bin/entrypoint.sh"]
|
||||
CMD ["/opt/oai-gnb/bin/nr-softmodem"]
|
||||
21
docker/csi_rx.patch
Normal file
21
docker/csi_rx.patch
Normal file
@@ -0,0 +1,21 @@
|
||||
diff --git a/openair1/PHY/NR_UE_TRANSPORT/csi_rx.c b/openair1/PHY/NR_UE_TRANSPORT/csi_rx.c
|
||||
index 1944ce7ca4..4733fbdc4c 100644
|
||||
--- a/openair1/PHY/NR_UE_TRANSPORT/csi_rx.c
|
||||
+++ b/openair1/PHY/NR_UE_TRANSPORT/csi_rx.c
|
||||
@@ -21,6 +21,7 @@
|
||||
#include "PHY/NR_REFSIG/nr_refsig.h"
|
||||
#include "common/utils/nr/nr_common.h"
|
||||
#include "PHY/NR_UE_ESTIMATION/filt16a_32.h"
|
||||
+#include "csi_rb_logging.h"
|
||||
|
||||
//#define NR_CSIRS_DEBUG
|
||||
//#define NR_CSIIM_DEBUG
|
||||
@@ -962,5 +963,8 @@ void nr_ue_csi_rs_procedures(PHY_VARS_NR_UE *ue,
|
||||
fapi_nr_rx_indication_t rx_ind = {0};
|
||||
nr_fill_dl_indication(&dl_indication, NULL, &rx_ind, proc, ue, NULL);
|
||||
nr_fill_rx_indication(&rx_ind, FAPI_NR_MEAS_IND, ue, NULL, NULL, 1, proc, (void *)&l1_measurements, NULL);
|
||||
+
|
||||
+ if (csi_rb_logging_enabled && csi_rb_logging_callback)
|
||||
+ csi_rb_logging_callback(ue, proc, csi_rs_estimated_channel_freq, csirs_config_pdu);
|
||||
ue->if_inst->dl_indication(&dl_indication);
|
||||
}
|
||||
17
openair1/PHY/NR_UE_TRANSPORT/csi_rb_logging.h
Normal file
17
openair1/PHY/NR_UE_TRANSPORT/csi_rb_logging.h
Normal file
@@ -0,0 +1,17 @@
|
||||
#ifndef CSI_RB_LOGGING_H
|
||||
#define CSI_RB_LOGGING_H
|
||||
|
||||
#include "PHY_VARS_NR_UE.h"
|
||||
#include "nfapi_nr_interface_scf.h"
|
||||
#include "platform_types.h"
|
||||
|
||||
typedef void (*csi_rb_logging_callback_t)(
|
||||
const PHY_VARS_NR_UE *ue,
|
||||
const UE_nr_rxtx_proc_t *proc,
|
||||
const c16_t csi_rs_estimated_channel_freq[][],
|
||||
const fapi_nr_dl_config_csirs_pdu_rel15_t *csirs_config_pdu);
|
||||
|
||||
extern csi_rb_logging_callback_t csi_rb_logging_callback;
|
||||
extern int csi_rb_logging_enabled;
|
||||
|
||||
#endif
|
||||
18
openair1/PHY/NR_UE_TRANSPORT/csi_rb_logging_init.c
Normal file
18
openair1/PHY/NR_UE_TRANSPORT/csi_rb_logging_init.c
Normal file
@@ -0,0 +1,18 @@
|
||||
#include "csi_rb_logging.h"
|
||||
#include <stdio.h>
|
||||
|
||||
__attribute__((constructor))
|
||||
static void csi_logging_constructor(void) {
|
||||
fprintf(stderr, "[CSI] Loading CSI per-RB logging module...\n");
|
||||
if (csi_rb_logging_init() == 0) {
|
||||
fprintf(stderr, "[CSI] CSI logging module loaded successfully\n");
|
||||
} else {
|
||||
fprintf(stderr, "[CSI] Failed to load CSI logging module\n");
|
||||
}
|
||||
}
|
||||
|
||||
__attribute__((destructor))
|
||||
static void csi_logging_destructor(void) {
|
||||
fprintf(stderr, "[CSI] Unloading CSI logging module...\n");
|
||||
csi_rb_logging_exit();
|
||||
}
|
||||
42
openair1/PHY/NR_UE_TRANSPORT/csi_rb_logging_integration.c
Normal file
42
openair1/PHY/NR_UE_TRANSPORT/csi_rb_logging_integration.c
Normal file
@@ -0,0 +1,42 @@
|
||||
#include "csi_rb_logging.h"
|
||||
#include <dlfcn.h>
|
||||
#include <stdio.h>
|
||||
|
||||
typedef void (*csi_rb_logging_callback_t)(
|
||||
const void *ue,
|
||||
const void *proc,
|
||||
const void *csi_rs_estimated_channel_freq,
|
||||
const void *csirs_config_pdu);
|
||||
|
||||
csi_rb_logging_callback_t csi_rb_logging_callback = NULL;
|
||||
int csi_rb_logging_enabled = 0;
|
||||
|
||||
static int load_csi_logging_library(void) {
|
||||
void *handle = dlopen("libcsi_logging.so", RTLD_LAZY);
|
||||
if (!handle) {
|
||||
fprintf(stderr, "Warning: CSI logging library not found\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
csi_rb_logging_callback = dlsym(handle, "csi_rb_logging_callback_impl");
|
||||
if (!csi_rb_logging_callback) {
|
||||
fprintf(stderr, "Warning: csi_rb_logging_callback_impl not found\n");
|
||||
dlclose(handle);
|
||||
return -1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int csi_rb_logging_init(void) {
|
||||
if (load_csi_logging_library() < 0)
|
||||
return -1;
|
||||
|
||||
csi_rb_logging_enabled = 1;
|
||||
fprintf(stderr, "CSI per-RB logging initialized\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
void csi_rb_logging_exit(void) {
|
||||
csi_rb_logging_enabled = 0;
|
||||
}
|
||||
@@ -21,6 +21,7 @@
|
||||
#include "PHY/NR_REFSIG/nr_refsig.h"
|
||||
#include "common/utils/nr/nr_common.h"
|
||||
#include "PHY/NR_UE_ESTIMATION/filt16a_32.h"
|
||||
#include "csi_rb_logging.h"
|
||||
|
||||
//#define NR_CSIRS_DEBUG
|
||||
//#define NR_CSIIM_DEBUG
|
||||
@@ -962,5 +963,8 @@ void nr_ue_csi_rs_procedures(PHY_VARS_NR_UE *ue,
|
||||
fapi_nr_rx_indication_t rx_ind = {0};
|
||||
nr_fill_dl_indication(&dl_indication, NULL, &rx_ind, proc, ue, NULL);
|
||||
nr_fill_rx_indication(&rx_ind, FAPI_NR_MEAS_IND, ue, NULL, NULL, 1, proc, (void *)&l1_measurements, NULL);
|
||||
|
||||
if (csi_rb_logging_enabled && csi_rb_logging_callback)
|
||||
csi_rb_logging_callback(ue, proc, csi_rs_estimated_channel_freq, csirs_config_pdu);
|
||||
ue->if_inst->dl_indication(&dl_indication);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user