]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
docker: add Analog Devices tools to docker image
authorGreg Malysa <malysagreg@gmail.com>
Thu, 11 Dec 2025 08:03:56 +0000 (03:03 -0500)
committerTom Rini <trini@konsulko.com>
Fri, 23 Jan 2026 20:20:59 +0000 (14:20 -0600)
The boot ROM on Analog Devices ADSP-SC5xx SoCs requires code packaged
in the LDR format. Normally this is available as part of
our yocto-derived toolchain but, it is not a part of any other pre-made
toolchain anymore, so it is otherwise unavailable in the docker image
for CI. This patch adds a source build from the ADI maintained github
repository. In the future, a package available for install via apt will
be available, but currently there is no arm64 build upstream, so we must
build from source for the time being to support CI on both amd64 and
arm64 runners. The same ldr tool is used for arm and arm64 for all of
our boards with names adjusted to match the expected $(CROSS_COMPILE)
for these boards.

Signed-off-by: Greg Malysa <malysagreg@gmail.com>
tools/docker/Dockerfile

index 8ab1cff55843efad06ee9f89009544827ecea7a9..fb6c65c63887a17de80f9be0f16196c1e126afea 100644 (file)
@@ -342,6 +342,22 @@ RUN wget -O - https://coreboot.org/releases/coreboot-25.03.tar.xz | tar -C /tmp
     sudo cp build/coreboot.rom build/cbfstool /opt/coreboot/ && \
     rm -rf /tmp/coreboot-25.03
 
+# Build ldr tool for Analog Devices boards and create prefixed symlinks to match
+# $(CROSS_COMPILE) as used by different supported platforms
+RUN git clone --depth=1 -b v1.0.2 https://github.com/analogdevicesinc/adsp-ldr.git /opt/adi-adsp-ldr && \
+       cd /opt/adi-adsp-ldr && \
+       python3 -m venv venv && \
+       . venv/bin/activate && \
+       pip install meson && \
+       meson setup build && \
+       cd build && \
+       meson compile && \
+       cd .. && \
+       ln -s build/ldr arm-linux-gnueabi-ldr && \
+       ln -s build/ldr aarch64-linux-ldr && \
+       deactivate
+ENV PATH="${PATH}:/opt/adi-adsp-ldr"
+
 # Create our user/group
 RUN echo uboot ALL=NOPASSWD: ALL > /etc/sudoers.d/uboot
 RUN useradd -m -U uboot