Building UEFI With Docker Error

I am trying to build the UEFI with Docker to replace the UEFI boot logo, but I am running into issues. I follow the instructions here but get caught up somewhere during the build script:

INFO - /usr/lib/gcc-cross/aarch64-linux-gnu/12/../../../../aarch64-linux-gnu/bin/ld: /tmp/ccG5xDlV.ltrans0.ltrans.o: in function `mgbe_handle_common_intr.lto_priv.0':
INFO - /home/joseph/nvidia-uefi/edk2-nvidia/Silicon/NVIDIA/Drivers/EqosDeviceDxe/nvethernetrm/osi/core/mgbe_core.c:3375: undefined reference to `__aarch64_ldadd4_sync'
INFO - /usr/lib/gcc-cross/aarch64-linux-gnu/12/../../../../aarch64-linux-gnu/bin/ld: /tmp/ccG5xDlV.ltrans0.ltrans.o:/home/joseph/nvidia-uefi/edk2-nvidia/Silicon/NVIDIA/Drivers/EqosDeviceDxe/nvethernetrm/osi/core/mgbe_core.c:3415: undefined reference to `__aarch64_ldadd4_sync'
INFO - /usr/lib/gcc-cross/aarch64-linux-gnu/12/../../../../aarch64-linux-gnu/bin/ld: /tmp/ccG5xDlV.ltrans0.ltrans.o:/home/joseph/nvidia-uefi/edk2-nvidia/Silicon/NVIDIA/Drivers/EqosDeviceDxe/nvethernetrm/osi/core/mgbe_core.c:3377: undefined reference to `__aarch64_ldadd4_sync'
INFO - /usr/lib/gcc-cross/aarch64-linux-gnu/12/../../../../aarch64-linux-gnu/bin/ld: /tmp/ccG5xDlV.ltrans0.ltrans.o: in function `osi_hal_handle_ioctl':
INFO - /home/joseph/nvidia-uefi/edk2-nvidia/Silicon/NVIDIA/Drivers/EqosDeviceDxe/nvethernetrm/osi/core/osi_hal.c:1428: undefined reference to `__aarch64_ldadd4_sync'
INFO - /usr/lib/gcc-cross/aarch64-linux-gnu/12/../../../../aarch64-linux-gnu/bin/ld: /tmp/ccG5xDlV.ltrans0.ltrans.o:/home/joseph/nvidia-uefi/edk2-nvidia/Silicon/NVIDIA/Drivers/EqosDeviceDxe/nvethernetrm/osi/core/osi_hal.c:1430: undefined reference to `__aarch64_ldadd4_sync'
INFO - /usr/lib/gcc-cross/aarch64-linux-gnu/12/../../../../aarch64-linux-gnu/bin/ld: /tmp/ccG5xDlV.ltrans0.ltrans.o:/home/joseph/nvidia-uefi/edk2-nvidia/Silicon/NVIDIA/Drivers/EqosDeviceDxe/nvethernetrm/osi/core/osi_hal.c:1455: more undefined references to `__aarch64_ldadd4_sync' follow
INFO - /usr/lib/gcc-cross/aarch64-linux-gnu/12/../../../../aarch64-linux-gnu/bin/ld: /tmp/ccG5xDlV.ltrans1.ltrans.o: in function `eqos_pad_calibrate':
INFO - /home/joseph/nvidia-uefi/edk2-nvidia/Silicon/NVIDIA/Drivers/EqosDeviceDxe/nvethernetrm/osi/core/eqos_core.c:859: undefined reference to `__aarch64_cas4_sync'
INFO - /usr/lib/gcc-cross/aarch64-linux-gnu/12/../../../../aarch64-linux-gnu/bin/ld: /home/joseph/nvidia-uefi/edk2-nvidia/Silicon/NVIDIA/Drivers/EqosDeviceDxe/nvethernetrm/osi/core/eqos_core.c:917: undefined reference to `__aarch64_cas4_sync'
INFO - /usr/lib/gcc-cross/aarch64-linux-gnu/12/../../../../aarch64-linux-gnu/bin/ld: /tmp/ccG5xDlV.ltrans1.ltrans.o: in function `osi_lock_irq_enabled.lto_priv.0.lto_priv.0':
INFO - /home/joseph/nvidia-uefi/edk2-nvidia/Silicon/NVIDIA/Drivers/EqosDeviceDxe/nvethernetrm/include/../osi/common/common.h:119: undefined reference to `__aarch64_cas4_sync'
INFO - /usr/lib/gcc-cross/aarch64-linux-gnu/12/../../../../aarch64-linux-gnu/bin/ld: /tmp/ccG5xDlV.ltrans1.ltrans.o: in function `osi_unlock_irq_enabled.lto_priv.0.lto_priv.0':
INFO - /home/joseph/nvidia-uefi/edk2-nvidia/Silicon/NVIDIA/Drivers/EqosDeviceDxe/nvethernetrm/include/../osi/common/common.h:148: undefined reference to `__aarch64_cas4_sync'
INFO - collect2: error: ld returned 1 exit status
INFO - make: *** [GNUmakefile:576: /home/joseph/nvidia-uefi/Build/Jetson/DEBUG_GCC5/AARCH64/Silicon/NVIDIA/Drivers/EqosDeviceDxe/EqosDeviceDxe/DEBUG/EqosDeviceDxe.dll] Error 1
INFO - 
INFO - 
INFO - build.py...
INFO -  : error 7000: Failed to execute command
INFO -  make tbuild [/home/joseph/nvidia-uefi/Build/Jetson/DEBUG_GCC5/AARCH64/Silicon/NVIDIA/Drivers/EqosDeviceDxe/EqosDeviceDxe]

Here is the full build log:
BUILDLOG_Jetson.txt (3.7 MB)

It appears to not be able to find __aarch64_ldadd4_sync and __aarch64_cas4_sync from what I can tell. I’m unfortunately not very familiar with docker usage, so this may be an issue on my end.

The only thing different from the linked instructions would be this:

edk2_docker edkrepo clone nvidia-uefi NVIDIA-Platforms r35.2.1

I have tried with this as well:

edk2_docker edkrepo clone nvidia-uefi NVIDIA-Jetson r35.2.1

I’ve tried this on both Ubuntu 20.04 and 22.04 host machines, and I want to build this for L4T r35.2.1 for a Jetson Xavier NX devkit. If anyone has any guidance, it would be appreciated. I have tried building without docker as well but so far have been running into many dependency errors related to gcc-12.

As an additional update, building the main combo seems to have worked fine, but we are currently limited to using L4T 35.2.1 only.

We have a thorough guide on the docker image usage:

Yes, that is the guide that I was following and linked in the first line. I am starting to wonder if this is an issue specific to the r35.2.1 release since the same process has no issues when building the main combo.

35.2.1 is a bit old now.
You may try if switching to the 20.04 image works.

:~/uefi/nvidia-uefi$ edk2_docker edk2-nvidia/Platform/NVIDIA/Jetson/build.sh
nvidia: building from workspace rooted at: /home/joseph/uefi/nvidia-uefi
nvidia: found command: python3.
nvidia: found command: virtualenv.
nvidia: found command: mono.
nvidia: found command: aarch64-linux-gnu-gcc.
nvidia: Activating Python virtual environment.
nvidia: Building from tarball
nvidia: Updating build environment (edk2-nvidia/Platform/NVIDIA/Jetson/PlatformBuild.py).
Traceback (most recent call last):
  File "/home/joseph/uefi/nvidia-uefi/venv/bin/stuart_update", line 5, in <module>
    from edk2toolext.invocables.edk2_update import main
ModuleNotFoundError: No module named 'edk2toolext'

I got this error when trying to manually build from 20.04 as well, and manually building from 22.04 gives the same error as the initial post.

Actually I apologize. When switching the docker container to use Ubuntu 20 on a machine that was also running 20.04, the build succeeded. Either the environment variables weren’t properly set when retrying it on the 22.04 machine, or the host machine also needs to be 20.04? I’m not sure, but it appears to be working now, thank you.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.