Skip to contentSkip to conversation

CI: Move to Ubuntu 24.04 'Noble' as the base

PATCH In review Tom Rini 1 participant 2 messages Nov 1, 2025 – Nov 11, 2025

lore
Share & tools
lore

Tom Rini

author
#0 lore raw

PATCH 1/1 CI: Move to Ubuntu 24.04 'Noble' as the base

The changes here are that we need to ensure python setuptools are in our build virtual environments as they will no longer come in via python even in a virtual environment. As part of this ensure setuptools is in our cache and also include pytest-azurepipelines as we should have been doing. Next, we move away from using apt-key directly and move that stanza towards the rest of the apt work. This also lets us drop directly installing gnupg2. These steps are not strictly required for 24.04 but will be for later releases and are valid now. Finally, we drop the unused PTYHONPATH ENV line.

In order to use these containers however, we need to stop running the event_dump test as the 'addr2line' tool provided by binutils no longer is able to decode those specific events in most cases. As this is a problem with binutils and present for some time now, disabling the test until someone has time to work with upstream this seems reasonable.

---
For completeness, this depends on Heinrich's patch to drop the python2.7 package from the Dockerfile.

---
 .azure-pipelines.yml    |  9 +++++++--
 .gitlab-ci.yml          |  7 ++++++-
 tools/docker/Dockerfile | 16 +++++++++-------
 3 files changed, 22 insertions(+), 10 deletions(-)
.azure-pipelines.yml +7 -2
index fc55c8b21006..c4d84d0c66e7 100644
@@ -2,7 +2,7 @@ variables:
   windows_vm: windows-2022
   ubuntu_vm: ubuntu-24.04
   macos_vm: macOS-14
-  ci_runner_image: trini/u-boot-gitlab-ci-runner:jammy-20250714-25Jul2025
+  ci_runner_image: trini/u-boot-gitlab-ci-runner:noble-20251001-31Oct2025
   # Add '-u 0' options for Azure pipelines, otherwise we get "permission
   # denied" error when it tries to "useradd -m -u 1001 vsts_azpcontainer",
   # since our $(ci_runner_image) user is not root.
@@ -352,6 +352,8 @@ stages:
         sandbox:
           TEST_PY_BD: "sandbox"
           TEST_PY_EXTRA: "--timing"
+          # addr2line in Ubuntu 'Noble' and later are broken.
+          TEST_PY_TEST_SPEC: "not event_dump"
         sandbox_asan:
           TEST_PY_BD: "sandbox"
           OVERRIDE: "-a ASAN"
@@ -359,6 +361,8 @@ stages:
         sandbox_clang:
           TEST_PY_BD: "sandbox"
           OVERRIDE: "-O clang-18"
+          # addr2line in Ubuntu 'Noble' and later are broken.
+          TEST_PY_TEST_SPEC: "not event_dump"
         sandbox_clang_asan:
           TEST_PY_BD: "sandbox"
           OVERRIDE: "-O clang-18 -a ASAN"
@@ -638,7 +642,8 @@ stages:
           python3 -m venv /tmp/venv
           . /tmp/venv/bin/activate
           pip install -r tools/binman/requirements.txt \
-            -r tools/buildman/requirements.txt
+            -r tools/buildman/requirements.txt \
+            setuptools
           EOF
           cat << "EOF" >> build.sh
           if [[ "${BUILDMAN}" != "" ]]; then
.gitlab-ci.yml +6 -1
index 73ff975e5746..e1409af57e4c 100644
@@ -20,7 +20,7 @@ workflow:
 
 # Grab our configured image.  The source for this is found
 # in the u-boot tree at tools/docker/Dockerfile
-image: ${MIRROR_DOCKER}/trini/u-boot-gitlab-ci-runner:jammy-20250714-25Jul2025
+image: ${MIRROR_DOCKER}/trini/u-boot-gitlab-ci-runner:noble-20251001-31Oct2025
 
 # We run some tests in different order, to catch some failures quicker.
 stages:
@@ -146,6 +146,7 @@ build all platforms in a single job:
       . /tmp/venv/bin/activate;
       pip install -r tools/binman/requirements.txt
         -r tools/buildman/requirements.txt
+        setuptools
     - ret=0;
       git config --global --add safe.directory "${CI_PROJECT_DIR}";
       ./tools/buildman/buildman -o /tmp -PEWM -x xtensa || ret=$?;
@@ -271,6 +272,8 @@ sandbox test.py:
   variables:
     TEST_PY_BD: "sandbox"
     TEST_PY_EXTRA: "--timing"
+    # addr2line in Ubuntu 'Noble' and later are broken.
+    TEST_PY_TEST_SPEC: "not event_dump"
   <<: *buildman_and_testpy_dfn
 
 sandbox with clang test.py:
@@ -283,6 +286,8 @@ sandbox with clang test.py:
   variables:
     TEST_PY_BD: "sandbox"
     OVERRIDE: "-O clang-18"
+    # addr2line in Ubuntu 'Noble' and later are broken.
+    TEST_PY_TEST_SPEC: "not event_dump"
   <<: *buildman_and_testpy_dfn
 
 sandbox64 test.py:
tools/docker/Dockerfile +9 -7
index 95ce1fdc6cc1..fa6eeb4ba51e 100644
@@ -2,7 +2,7 @@
 # This Dockerfile is used to build an image containing basic stuff to be used
 # to build U-Boot and run our test suites.
 
-FROM ubuntu:jammy-20250714
+FROM ubuntu:noble-20251001
 LABEL org.opencontainers.image.authors="Tom Rini <[email protected]>"
 LABEL org.opencontainers.image.description=" This image is for building U-Boot inside a container"
 
@@ -27,12 +27,10 @@ ENV TCVER=14.2.0
 
 RUN echo "Building on $BUILDPLATFORM, for target $TARGETPLATFORM"
 
-# Add LLVM repository
+# Add tools to fetch archives with
 RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
     --mount=type=cache,target=/var/lib/apt,sharing=locked \
-    apt-get update && apt-get install -y gnupg2 wget xz-utils
-RUN wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add -
-RUN echo deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-18 main | tee /etc/apt/sources.list.d/llvm.list
+    apt-get update && apt-get install -y wget xz-utils
 
 # Create a list of URLs to process, then pass them into a 'while read' loop
 RUN if [ "$TARGETPLATFORM" = "linux/amd64" ]; then HOSTARCH=x86_64; else HOSTARCH=arm64; fi; ( \
@@ -54,6 +52,10 @@ RUN if [ "$TARGETPLATFORM" = "linux/amd64" ]; then \
 		wget -O - https://github.com/foss-xtensa/toolchain/releases/download/2020.07/x86_64-2020.07-xtensa-dc233c-elf.tar.gz | tar -C /opt -xz; \
 	fi
 
+# Add LLVM repository
+RUN wget -qO- https://apt.llvm.org/llvm-snapshot.gpg.key | tee /etc/apt/trusted.gpg.d/apt.llvm.org.asc
+RUN echo deb http://apt.llvm.org/noble/ llvm-toolchain-noble-18 main | tee /etc/apt/sources.list.d/llvm.list
+
 # Update and install things from apt now
 RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
     --mount=type=cache,target=/var/lib/apt,sharing=locked \
@@ -325,7 +327,8 @@ RUN python3 -m venv /tmp/venv && \
 		-r /tmp/binman-requirements.txt \
 		-r /tmp/buildman-requirements.txt \
 		-r /tmp/patman-requirements.txt \
-		-r /tmp/u_boot_pylib-requirements.txt && \
+		-r /tmp/u_boot_pylib-requirements.txt \
+		setuptools pytest-azurepipelines && \
 	deactivate && \
 	rm -rf /tmp/venv /tmp/*-requirements.txt
 
@@ -343,4 +346,3 @@ RUN /bin/echo -e "\nx86 = i386" >> ~/.buildman;
 
 # Add mkbootimg tool
 RUN git clone https://android.googlesource.com/platform/system/tools/mkbootimg /home/uboot/mkbootimg
-ENV PYTHONPATH="${PYTHONPATH}:/home/uboot/mkbootimg"
Signature · 1 line
2.43.0
author
#1 lore raw
Quoted 11 lines · Tom Rini

The changes here are that we need to ensure python setuptools are in our build virtual environments as they will no longer come in via python even in a virtual environment. As part of this ensure setuptools is in our cache and also include pytest-azurepipelines as we should have been doing. Next, we move away from using apt-key directly and move that stanza towards the rest of the apt work. This also lets us drop directly installing gnupg2. These steps are not strictly required for 24.04 but will be for later releases and are valid now. Finally, we drop the unused PTYHONPATH ENV line.

[...]

Applied to u-boot/next, thanks!

[1/1] CI: Move to Ubuntu 24.04 'Noble' as the base

      commit: 9420160a0d145be2e4b53742612fdf4fb43d11af
Signature · 1 line
Tom