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).
This commit is contained in:
@@ -321,7 +321,7 @@ class Containerize():
|
|||||||
imageNames.append(('oai-nr-cuup', 'nr-cuup', 'oai-nr-cuup-asan', '--build-arg "BUILD_OPTION=--sanitize"'))
|
imageNames.append(('oai-nr-cuup', 'nr-cuup', 'oai-nr-cuup-asan', '--build-arg "BUILD_OPTION=--sanitize"'))
|
||||||
result = re.search('build_cross_arm64', self.imageKind)
|
result = re.search('build_cross_arm64', self.imageKind)
|
||||||
if result is not None:
|
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
|
# Workaround for some servers, we need to erase completely the workspace
|
||||||
if self.forcedWorkspaceCleanup:
|
if self.forcedWorkspaceCleanup:
|
||||||
|
|||||||
+2
-2
@@ -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/)
|
- [RAN-ARM-Cross-Compile-Builder](https://jenkins-oai.eurecom.fr/job/RAN-ARM-Cross-Compile-Builder/)
|
||||||
~BUILD-ONLY ~4G-LTE ~5G-NR
|
~BUILD-ONLY ~4G-LTE ~5G-NR
|
||||||
- orion: Cross-compilation from Intel to ARM
|
- orion: Cross-compilation from Intel to ARM
|
||||||
- base image from `Dockerfile.base.ubuntu20.cross-arm64`
|
- base image from `Dockerfile.base.ubuntu22.cross-arm64`
|
||||||
- build image from `Dockerfile.build.ubuntu20.cross-arm64` (no target images)
|
- build image from `Dockerfile.build.ubuntu22.cross-arm64` (no target images)
|
||||||
- [RAN-cppcheck](https://jenkins-oai.eurecom.fr/job/RAN-cppcheck/)
|
- [RAN-cppcheck](https://jenkins-oai.eurecom.fr/job/RAN-cppcheck/)
|
||||||
~BUILD-ONLY ~4G-LTE ~5G-NR
|
~BUILD-ONLY ~4G-LTE ~5G-NR
|
||||||
- bellatrix
|
- bellatrix
|
||||||
|
|||||||
+10
-10
@@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
## Environment
|
## Environment
|
||||||
|
|
||||||
- OS: ubuntu 20.04
|
- OS: ubuntu 22.04
|
||||||
|
|
||||||
### Set up the environment
|
### Set up the environment
|
||||||
|
|
||||||
@@ -15,21 +15,21 @@ Set up for install the package for aarch64.
|
|||||||
sudo dpkg --add-architecture arm64
|
sudo dpkg --add-architecture arm64
|
||||||
|
|
||||||
echo -e \
|
echo -e \
|
||||||
"deb [arch=arm64] http://ports.ubuntu.com/ focal main restricted\n"\
|
"deb [arch=arm64] http://ports.ubuntu.com/ jammy main restricted\n"\
|
||||||
"deb [arch=arm64] http://ports.ubuntu.com/ focal-updates main restricted\n"\
|
"deb [arch=arm64] http://ports.ubuntu.com/ jammy-updates main restricted\n"\
|
||||||
"deb [arch=arm64] http://ports.ubuntu.com/ focal universe\n"\
|
"deb [arch=arm64] http://ports.ubuntu.com/ jammy universe\n"\
|
||||||
"deb [arch=arm64] http://ports.ubuntu.com/ focal-updates universe\n"\
|
"deb [arch=arm64] http://ports.ubuntu.com/ jammy-updates universe\n"\
|
||||||
"deb [arch=arm64] http://ports.ubuntu.com/ focal multiverse\n"\
|
"deb [arch=arm64] http://ports.ubuntu.com/ jammy multiverse\n"\
|
||||||
"deb [arch=arm64] http://ports.ubuntu.com/ focal-updates multiverse\n"\
|
"deb [arch=arm64] http://ports.ubuntu.com/ jammy-updates multiverse\n"\
|
||||||
"deb [arch=arm64] http://ports.ubuntu.com/ focal-backports main restricted universe multiverse"\
|
"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 tee /etc/apt/sources.list.d/arm-cross-compile-sources.list
|
||||||
|
|
||||||
sudo cp /etc/apt/sources.list "/etc/apt/sources.list.`date`.backup"
|
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 sed -i -E "s/(deb)\ (http:.+)/\1\ [arch=amd64]\ \2/" /etc/apt/sources.list
|
||||||
|
|
||||||
sudo apt update
|
sudo apt update
|
||||||
sudo apt install -y gcc-9-aarch64-linux-gnu \
|
sudo apt install -y gcc-11-aarch64-linux-gnu \
|
||||||
g++-9-aarch64-linux-gnu
|
g++-11-aarch64-linux-gnu
|
||||||
|
|
||||||
sudo apt-get install -y \
|
sudo apt-get install -y \
|
||||||
libatlas-base-dev:arm64 \
|
libatlas-base-dev:arm64 \
|
||||||
|
|||||||
+12
-12
@@ -21,12 +21,12 @@
|
|||||||
#---------------------------------------------------------------------
|
#---------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
# Dockerfile for the Open-Air-Interface BUILD service
|
# 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.
|
# Very important, the jammy image shall not be using mirrors. A lot of them do NOT support ARM64.
|
||||||
FROM ubuntu:focal AS ran-base
|
FROM ubuntu:jammy AS ran-base
|
||||||
ENV DEBIAN_FRONTEND=noninteractive
|
ENV DEBIAN_FRONTEND=noninteractive
|
||||||
ENV TZ=Europe/Paris
|
ENV TZ=Europe/Paris
|
||||||
# Specifying a working version of SIMDE for ARM:
|
# Specifying a working version of SIMDE for ARM:
|
||||||
@@ -37,13 +37,13 @@ RUN apt-get update && \
|
|||||||
DEBIAN_FRONTEND=noninteractive apt-get upgrade --yes && \
|
DEBIAN_FRONTEND=noninteractive apt-get upgrade --yes && \
|
||||||
#enabling arm64 architecture
|
#enabling arm64 architecture
|
||||||
dpkg --add-architecture arm64 && \
|
dpkg --add-architecture arm64 && \
|
||||||
echo "deb [arch=arm64] http://ports.ubuntu.com/ focal main restricted\n" \
|
echo "deb [arch=arm64] http://ports.ubuntu.com/ jammy main restricted\n" \
|
||||||
"deb [arch=arm64] http://ports.ubuntu.com/ focal-updates main restricted\n" \
|
"deb [arch=arm64] http://ports.ubuntu.com/ jammy-updates main restricted\n" \
|
||||||
"deb [arch=arm64] http://ports.ubuntu.com/ focal universe\n" \
|
"deb [arch=arm64] http://ports.ubuntu.com/ jammy universe\n" \
|
||||||
"deb [arch=arm64] http://ports.ubuntu.com/ focal-updates universe\n" \
|
"deb [arch=arm64] http://ports.ubuntu.com/ jammy-updates universe\n" \
|
||||||
"deb [arch=arm64] http://ports.ubuntu.com/ focal multiverse\n" \
|
"deb [arch=arm64] http://ports.ubuntu.com/ jammy multiverse\n" \
|
||||||
"deb [arch=arm64] http://ports.ubuntu.com/ focal-updates multiverse\n" \
|
"deb [arch=arm64] http://ports.ubuntu.com/ jammy-updates multiverse\n" \
|
||||||
"deb [arch=arm64] http://ports.ubuntu.com/ focal-backports main restricted universe multiverse" \
|
"deb [arch=arm64] http://ports.ubuntu.com/ jammy-backports main restricted universe multiverse" \
|
||||||
| tee /etc/apt/sources.list.d/arm-cross-compile-sources.list && \
|
| tee /etc/apt/sources.list.d/arm-cross-compile-sources.list && \
|
||||||
cp /etc/apt/sources.list "/etc/apt/sources.list.`date`.backup" && \
|
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 -E "s/(deb)\ (http:.+)/\1\ [arch=amd64]\ \2/" /etc/apt/sources.list && \
|
||||||
@@ -69,8 +69,8 @@ RUN apt-get update && \
|
|||||||
zlib1g-dev:arm64 \
|
zlib1g-dev:arm64 \
|
||||||
# cross build libs and compilers
|
# cross build libs and compilers
|
||||||
libc6-dev-i386 \
|
libc6-dev-i386 \
|
||||||
gcc-9-aarch64-linux-gnu \
|
gcc-11-aarch64-linux-gnu \
|
||||||
g++-9-aarch64-linux-gnu && \
|
g++-11-aarch64-linux-gnu && \
|
||||||
apt-get clean
|
apt-get clean
|
||||||
|
|
||||||
# Add "Tini - A tiny but valid init for containers", https://github.com/krallin/tini
|
# Add "Tini - A tiny but valid init for containers", https://github.com/krallin/tini
|
||||||
+3
-3
@@ -21,7 +21,7 @@
|
|||||||
#---------------------------------------------------------------------
|
#---------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
# Dockerfile for the Open-Air-Interface BUILD service
|
# 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; \
|
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
|
# displaying errors and warnings
|
||||||
egrep -A3 "warning:|error:" ../../log/all.txt || true && \
|
egrep -A3 "warning:|error:" ../../log/all.txt || true && \
|
||||||
# will fail only for errors
|
# will fail only if string "errors:" is found
|
||||||
egrep -L "error:" ../../log/all.txt && \
|
egrep "error:" -vqz ../../log/all.txt && \
|
||||||
echo "====== End of log for cross-build executables ======"
|
echo "====== End of log for cross-build executables ======"
|
||||||
Reference in New Issue
Block a user