Enable configuration of NR UE through a YAML file
This commit adds yaml-cpp library to required docker images and build commands. There is one workaround in cross-compilation for apt behavior for installing libyaml-cpp-dev. Apt will uninistall previous versions of the package whenever another one is installed. This means that installing the arm version breaks amd version and vice versa. This makes it impossible to have both libs installed at the same time which is required by the cross-compilation build command (it calls cmake twice, once with native and once with target architecture)
This commit is contained in:
@@ -30,7 +30,8 @@ FROM ran-base:develop AS ran-tests
|
||||
RUN apt-get update && \
|
||||
DEBIAN_FRONTEND=noninteractive apt-get upgrade --yes && \
|
||||
DEBIAN_FRONTEND=noninteractive apt-get install --yes \
|
||||
libgtest-dev
|
||||
libgtest-dev \
|
||||
libyaml-cpp-dev
|
||||
|
||||
RUN rm -Rf /oai-ran
|
||||
WORKDIR /oai-ran
|
||||
|
||||
@@ -118,7 +118,7 @@ services:
|
||||
devices:
|
||||
- /dev/net/tun:/dev/net/tun
|
||||
volumes:
|
||||
- ../../conf_files/nrue.uicc.conf:/opt/oai-nr-ue/etc/nr-ue.conf
|
||||
- ../../conf_files/nrue.uicc.yaml:/opt/oai-nr-ue/etc/nr-ue.yaml
|
||||
healthcheck:
|
||||
test: /bin/bash -c "pgrep nr-uesoftmodem"
|
||||
interval: 10s
|
||||
|
||||
@@ -497,7 +497,7 @@ function main() {
|
||||
# add some default libraries that should always be built
|
||||
# for eNB, gNB, UEs, simulators
|
||||
if [[ $gNB == 1 || $eNB == 1 || $UE == 1 || $nrUE == 1 || $SIMUS_PHY == 1 || $RU == 1 ]]; then
|
||||
TARGET_LIST="$TARGET_LIST params_libconfig coding rfsimulator dfts"
|
||||
TARGET_LIST="$TARGET_LIST params_libconfig coding rfsimulator dfts params_yaml"
|
||||
fi
|
||||
|
||||
mkdir -p $DIR/$BUILD_DIR/build
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
find_package(yaml-cpp REQUIRED)
|
||||
|
||||
find_package(yaml-cpp REQUIRED PATHS /usr/lib/aarch64-linux-gnu/pkgconfig/)
|
||||
# include(FetchContent)
|
||||
|
||||
# FetchContent_Declare(
|
||||
|
||||
@@ -66,6 +66,7 @@ RUN apt-get update && \
|
||||
libssl-dev:arm64 \
|
||||
libtool:arm64 \
|
||||
zlib1g-dev:arm64 \
|
||||
libyaml-cpp-dev:arm64 \
|
||||
# cross build libs and compilers
|
||||
libc6-dev-i386 \
|
||||
gcc-11-aarch64-linux-gnu \
|
||||
|
||||
@@ -41,6 +41,8 @@ RUN /bin/sh oaienv && \
|
||||
ninja ldpc_generators generate_T > ../../log/host-tools.txt 2>&1 && \
|
||||
echo "====== End of log for host-tools ======" && \
|
||||
cd ../build-cross/ && \
|
||||
# install missing libyaml-cpp-dev for arm64
|
||||
apt install -y libyaml-cpp-dev:arm64 && \
|
||||
cmake ../../.. -GNinja -DCMAKE_TOOLCHAIN_FILE=../../../cmake_targets/cross-arm.cmake -DNATIVE_DIR=../build && \
|
||||
echo "====== Start of log for cross-build executables ======" && \
|
||||
# making always passing so we can analyze the all.txt file
|
||||
|
||||
@@ -34,6 +34,9 @@ FROM ran-build:latest AS nr-ue-build
|
||||
FROM registry.access.redhat.com/ubi9/ubi:latest AS oai-nr-ue
|
||||
ENV TZ=Europe/Paris
|
||||
|
||||
# Install EPEL for RHEL9
|
||||
RUN dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm
|
||||
|
||||
RUN dnf update -y && \
|
||||
dnf install -y \
|
||||
lksctp-tools \
|
||||
@@ -47,7 +50,8 @@ RUN dnf update -y && \
|
||||
python3 \
|
||||
python3-pip \
|
||||
libXpm \
|
||||
libX11 && \
|
||||
libX11 \
|
||||
yaml-cpp-devel && \
|
||||
pip3 install six && \
|
||||
pip3 install requests && \
|
||||
echo "/usr/local/lib" > /etc/ld.so.conf.d/local-lib.conf && \
|
||||
@@ -70,6 +74,7 @@ COPY --from=nr-ue-build \
|
||||
/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_5Gue.so \
|
||||
/oai-ran/cmake_targets/ran_build/build/libparams_yaml.so \
|
||||
/usr/local/lib/
|
||||
|
||||
COPY --from=nr-ue-base \
|
||||
@@ -117,5 +122,5 @@ RUN /bin/bash -c "ln -s /usr/local/lib/liboai_usrpdevif.so /usr/local/lib/liboai
|
||||
|
||||
WORKDIR /opt/oai-nr-ue
|
||||
COPY --from=nr-ue-base /tini /tini
|
||||
CMD ["/opt/oai-nr-ue/bin/nr-uesoftmodem", "-O", "/opt/oai-nr-ue/etc/nr-ue.conf"]
|
||||
CMD ["/opt/oai-nr-ue/bin/nr-uesoftmodem"]
|
||||
ENTRYPOINT ["/tini", "-v", "--", "/opt/oai-nr-ue/bin/entrypoint.sh"]
|
||||
|
||||
@@ -71,6 +71,7 @@ COPY --from=nr-ue-build \
|
||||
/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_5Gue.so \
|
||||
/oai-ran/cmake_targets/ran_build/build/libparams_yaml.so \
|
||||
/usr/local/lib/
|
||||
|
||||
COPY --from=nr-ue-base \
|
||||
@@ -118,5 +119,5 @@ RUN /bin/bash -c "ln -s /usr/local/lib/liboai_usrpdevif.so /usr/local/lib/liboai
|
||||
|
||||
WORKDIR /opt/oai-nr-ue
|
||||
COPY --from=nr-ue-base /tini /tini
|
||||
CMD ["/opt/oai-nr-ue/bin/nr-uesoftmodem", "-O", "/opt/oai-nr-ue/etc/nr-ue.conf"]
|
||||
CMD ["/opt/oai-nr-ue/bin/nr-uesoftmodem"]
|
||||
ENTRYPOINT ["/tini", "-v", "--", "/opt/oai-nr-ue/bin/entrypoint.sh"]
|
||||
|
||||
@@ -64,7 +64,8 @@ RUN apt-get update && \
|
||||
iputils-ping \
|
||||
iproute2 \
|
||||
iperf3 \
|
||||
iperf && \
|
||||
iperf \
|
||||
libyaml-cpp-dev && \
|
||||
# if the --sanitize option was used to build, additional packages are required
|
||||
/bin/bash -c 'if [[ "$BUILD_OPTION" = "--sanitize" ]]; then DEBIAN_FRONTEND=noninteractive apt-get install --yes \
|
||||
#libasan5 \ # see below
|
||||
@@ -97,6 +98,7 @@ COPY --from=nr-ue-build \
|
||||
/oai-ran/cmake_targets/ran_build/build/libtelnetsrv.so \
|
||||
/oai-ran/cmake_targets/ran_build/build/libtelnetsrv_ciUE.so \
|
||||
/oai-ran/cmake_targets/ran_build/build/libtelnetsrv_5Gue.so \
|
||||
/oai-ran/cmake_targets/ran_build/build/libparams_yaml.so \
|
||||
/usr/local/lib/
|
||||
|
||||
# Now we are copying from builder-image the UHD files.
|
||||
@@ -123,5 +125,5 @@ RUN /bin/bash -c "ln -s /usr/local/lib/liboai_usrpdevif.so /usr/local/lib/liboai
|
||||
|
||||
WORKDIR /opt/oai-nr-ue
|
||||
COPY --from=nr-ue-base /tini /tini
|
||||
CMD ["/opt/oai-nr-ue/bin/nr-uesoftmodem", "-O", "/opt/oai-nr-ue/etc/nr-ue.conf"]
|
||||
CMD ["/opt/oai-nr-ue/bin/nr-uesoftmodem"]
|
||||
ENTRYPOINT ["/tini", "-v", "--", "/opt/oai-nr-ue/bin/entrypoint.sh"]
|
||||
|
||||
@@ -9,8 +9,13 @@ echo "=================================="
|
||||
echo "/proc/sys/kernel/core_pattern=$(cat /proc/sys/kernel/core_pattern)"
|
||||
|
||||
if [ ! -f $CONFIGFILE ]; then
|
||||
echo "No configuration file found: please mount at $CONFIGFILE"
|
||||
exit 255
|
||||
echo "No configuration file $CONFIGFILE found: attempting to find YAML config"
|
||||
YAML_CONFIGFILE=$PREFIX/etc/nr-ue.yaml
|
||||
if [ ! -f $YAML_CONFIGFILE ]; then
|
||||
echo "No configuration file $YAML_CONFIGFILE found. Please mount either at $CONFIGFILE or $YAML_CONFIGFILE"
|
||||
exit 255
|
||||
fi
|
||||
CONFIGFILE=$YAML_CONFIGFILE
|
||||
fi
|
||||
|
||||
echo "=================================="
|
||||
@@ -35,6 +40,9 @@ while [[ $# -gt 0 ]]; do
|
||||
shift
|
||||
done
|
||||
|
||||
new_args+=("-O")
|
||||
new_args+=("$CONFIGFILE")
|
||||
|
||||
# enable printing of stack traces on assert
|
||||
export OAI_GDBSTACKS=1
|
||||
|
||||
|
||||
Reference in New Issue
Block a user