Commit 199f8c21 authored by Robert Schmidt's avatar Robert Schmidt

Update cross-compilation builder to Ubuntu 22

Update instructions and CI for cross-compilation on Ubuntu 22.
Note that for the dockerfile, we use egrep -L which has changed and does
not exit with code 0 on no match. Instead, use -vqz to invert return
code (0 if nothing found, otherwise 1).
parent 70719c3b
......@@ -321,7 +321,7 @@ class Containerize():
imageNames.append(('oai-nr-cuup', 'nr-cuup', 'oai-nr-cuup-asan', '--build-arg "BUILD_OPTION=--sanitize"'))
result = re.search('build_cross_arm64', self.imageKind)
if result is not None:
self.dockerfileprefix = '.ubuntu20.cross-arm64'
self.dockerfileprefix = '.ubuntu22.cross-arm64'
# Workaround for some servers, we need to erase completely the workspace
if self.forcedWorkspaceCleanup:
......
......@@ -89,8 +89,8 @@ information on how the images are built.
- [RAN-ARM-Cross-Compile-Builder](https://jenkins-oai.eurecom.fr/job/RAN-ARM-Cross-Compile-Builder/)
~BUILD-ONLY ~4G-LTE ~5G-NR
- orion: Cross-compilation from Intel to ARM
- base image from `Dockerfile.base.ubuntu20.cross-arm64`
- build image from `Dockerfile.build.ubuntu20.cross-arm64` (no target images)
- base image from `Dockerfile.base.ubuntu22.cross-arm64`
- build image from `Dockerfile.build.ubuntu22.cross-arm64` (no target images)
- [RAN-cppcheck](https://jenkins-oai.eurecom.fr/job/RAN-cppcheck/)
~BUILD-ONLY ~4G-LTE ~5G-NR
- bellatrix
......
......@@ -5,7 +5,7 @@
## Environment
- OS: ubuntu 20.04
- OS: ubuntu 22.04
### Set up the environment
......@@ -15,21 +15,21 @@ Set up for install the package for aarch64.
sudo dpkg --add-architecture arm64
echo -e \
"deb [arch=arm64] http://ports.ubuntu.com/ focal main restricted\n"\
"deb [arch=arm64] http://ports.ubuntu.com/ focal-updates main restricted\n"\
"deb [arch=arm64] http://ports.ubuntu.com/ focal universe\n"\
"deb [arch=arm64] http://ports.ubuntu.com/ focal-updates universe\n"\
"deb [arch=arm64] http://ports.ubuntu.com/ focal multiverse\n"\
"deb [arch=arm64] http://ports.ubuntu.com/ focal-updates multiverse\n"\
"deb [arch=arm64] http://ports.ubuntu.com/ focal-backports main restricted universe multiverse"\
"deb [arch=arm64] http://ports.ubuntu.com/ jammy main restricted\n"\
"deb [arch=arm64] http://ports.ubuntu.com/ jammy-updates main restricted\n"\
"deb [arch=arm64] http://ports.ubuntu.com/ jammy universe\n"\
"deb [arch=arm64] http://ports.ubuntu.com/ jammy-updates universe\n"\
"deb [arch=arm64] http://ports.ubuntu.com/ jammy multiverse\n"\
"deb [arch=arm64] http://ports.ubuntu.com/ jammy-updates multiverse\n"\
"deb [arch=arm64] http://ports.ubuntu.com/ jammy-backports main restricted universe multiverse"\
| sudo tee /etc/apt/sources.list.d/arm-cross-compile-sources.list
sudo cp /etc/apt/sources.list "/etc/apt/sources.list.`date`.backup"
sudo sed -i -E "s/(deb)\ (http:.+)/\1\ [arch=amd64]\ \2/" /etc/apt/sources.list
sudo apt update
sudo apt install -y gcc-9-aarch64-linux-gnu \
g++-9-aarch64-linux-gnu
sudo apt install -y gcc-11-aarch64-linux-gnu \
g++-11-aarch64-linux-gnu
sudo apt-get install -y \
libatlas-base-dev:arm64 \
......
......@@ -21,12 +21,12 @@
#---------------------------------------------------------------------
#
# Dockerfile for the Open-Air-Interface BUILD service
# Valid for Ubuntu 20.04 to cross-compile for ARM64
# Valid for Ubuntu 22.04 to cross-compile for ARM64
#
#---------------------------------------------------------------------
# Very important, the focal image shall not be using mirrors. A lot of them do NOT support ARM64.
FROM ubuntu:focal AS ran-base
# Very important, the jammy image shall not be using mirrors. A lot of them do NOT support ARM64.
FROM ubuntu:jammy AS ran-base
ENV DEBIAN_FRONTEND=noninteractive
ENV TZ=Europe/Paris
# Specifying a working version of SIMDE for ARM:
......@@ -37,13 +37,13 @@ RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get upgrade --yes && \
#enabling arm64 architecture
dpkg --add-architecture arm64 && \
echo "deb [arch=arm64] http://ports.ubuntu.com/ focal main restricted\n" \
"deb [arch=arm64] http://ports.ubuntu.com/ focal-updates main restricted\n" \
"deb [arch=arm64] http://ports.ubuntu.com/ focal universe\n" \
"deb [arch=arm64] http://ports.ubuntu.com/ focal-updates universe\n" \
"deb [arch=arm64] http://ports.ubuntu.com/ focal multiverse\n" \
"deb [arch=arm64] http://ports.ubuntu.com/ focal-updates multiverse\n" \
"deb [arch=arm64] http://ports.ubuntu.com/ focal-backports main restricted universe multiverse" \
echo "deb [arch=arm64] http://ports.ubuntu.com/ jammy main restricted\n" \
"deb [arch=arm64] http://ports.ubuntu.com/ jammy-updates main restricted\n" \
"deb [arch=arm64] http://ports.ubuntu.com/ jammy universe\n" \
"deb [arch=arm64] http://ports.ubuntu.com/ jammy-updates universe\n" \
"deb [arch=arm64] http://ports.ubuntu.com/ jammy multiverse\n" \
"deb [arch=arm64] http://ports.ubuntu.com/ jammy-updates multiverse\n" \
"deb [arch=arm64] http://ports.ubuntu.com/ jammy-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 && \
......@@ -69,8 +69,8 @@ RUN apt-get update && \
zlib1g-dev:arm64 \
# cross build libs and compilers
libc6-dev-i386 \
gcc-9-aarch64-linux-gnu \
g++-9-aarch64-linux-gnu && \
gcc-11-aarch64-linux-gnu \
g++-11-aarch64-linux-gnu && \
apt-get clean
# Add "Tini - A tiny but valid init for containers", https://github.com/krallin/tini
......
......@@ -21,7 +21,7 @@
#---------------------------------------------------------------------
#
# Dockerfile for the Open-Air-Interface BUILD service
# Valid for Ubuntu 20.04 to cross-compile for ARM64
# Valid for Ubuntu 22.04 to cross-compile for ARM64
#
#---------------------------------------------------------------------
......@@ -47,6 +47,6 @@ RUN /bin/sh oaienv && \
ninja dlsim ulsim ldpctest polartest smallblocktest nr_pbchsim nr_dlschsim nr_ulschsim nr_dlsim nr_ulsim nr_pucchsim nr_prachsim lte-softmodem nr-softmodem nr-cuup oairu lte-uesoftmodem nr-uesoftmodem params_libconfig coding rfsimulator > ../../log/all.txt 2>&1; \
# displaying errors and warnings
egrep -A3 "warning:|error:" ../../log/all.txt || true && \
# will fail only for errors
egrep -L "error:" ../../log/all.txt && \
# will fail only if string "errors:" is found
egrep "error:" -vqz ../../log/all.txt && \
echo "====== End of log for cross-build executables ======"
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