Files
openairinterface5g/docker/Dockerfile.base.ubuntu.cross-arm64
Robert Schmidt 19e3cbd66a Extend UHD patch to v4.9/v4.10, remove sed
The existing patch (generated through sed) works also in UHD versions
beyond 4.8, so allow to use that.

Further, since sed is confusing, store the patch directly. Update the
dockerfiles so that docker copies the right file for UHD 4.8.

Signed-off-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2026-05-21 15:21:20 +02:00

81 lines
2.9 KiB
Docker

# SPDX-License-Identifier: LicenseRef-CSSL-1.0
#---------------------------------------------------------------------
#
# Dockerfile for the Open-Air-Interface BUILD service
# Valid for Ubuntu 24.04 to cross-compile for ARM64
#
#---------------------------------------------------------------------
# Very important, the noble image shall not be using mirrors. A lot of them do NOT support ARM64.
ARG UBUNTU_IMAGE=ubuntu:noble
FROM ${UBUNTU_IMAGE} AS ran-base
ENV DEBIAN_FRONTEND=noninteractive
ENV TZ=Europe/Paris
# Specifying a working version of SIMDE for ARM:
ENV SIMDE_VERSION=389f360a66d4a3bec62b7d71ad8be877487809ba
#install developers pkg/repo
RUN apt-get update && \
apt-get upgrade --yes && \
#enabling arm64 architecture
dpkg --add-architecture arm64 && \
echo "deb [arch=arm64] http://ports.ubuntu.com/ noble main restricted\n" \
"deb [arch=arm64] http://ports.ubuntu.com/ noble-updates main restricted\n" \
"deb [arch=arm64] http://ports.ubuntu.com/ noble universe\n" \
"deb [arch=arm64] http://ports.ubuntu.com/ noble-updates universe\n" \
"deb [arch=arm64] http://ports.ubuntu.com/ noble multiverse\n" \
"deb [arch=arm64] http://ports.ubuntu.com/ noble-updates multiverse\n" \
"deb [arch=arm64] http://ports.ubuntu.com/ noble-backports main restricted universe multiverse" \
| tee /etc/apt/sources.list.d/arm-cross-compile-sources.list && \
cp /etc/apt/sources.list "/etc/apt/sources.list.`date`.backup" && \
sed -i -E "s/(deb)\ (http:.+)/\1\ [arch=amd64]\ \2/" /etc/apt/sources.list && \
sed -i '/^Components:/a Architectures: amd64' /etc/apt/sources.list.d/ubuntu.sources && \
apt-get update && \
apt-get upgrade --yes && \
apt-get install --yes \
build-essential \
psmisc \
git \
tzdata \
xxd \
# ARM64 packages
libreadline-dev:arm64 \
libgnutls28-dev:arm64 \
libconfig-dev:arm64 \
libsctp-dev:arm64 \
libssl-dev:arm64 \
libtool:arm64 \
zlib1g-dev:arm64 \
libyaml-cpp-dev:arm64 \
# cross build libs and compilers
libc6-dev-i386 \
gcc-aarch64-linux-gnu \
g++-aarch64-linux-gnu && \
apt-get clean
# Add "Tini - A tiny but valid init for containers", https://github.com/krallin/tini
# it will be copied into target containers, to print exit numbers and handle signals properly
ENV TINI_VERSION=v0.19.0
ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /tini
RUN chmod +x /tini
# Copying only the needed files to create ran-base
WORKDIR /oai-ran/cmake_targets/tools
COPY cmake_targets/tools/build_helper \
cmake_targets/tools/uhd-4.5plus-tdd-patch.diff \
./
WORKDIR /oai-ran/cmake_targets
COPY cmake_targets/build_oai .
WORKDIR /oai-ran
COPY oaienv .
#run build_oai -I to get the builder image
RUN /bin/sh oaienv && \
cd cmake_targets && \
mkdir -p log && \
./build_oai -I && \
apt-get clean