NVIDIA / edk2-nvidia

NVIDIA EDK2 platform support
Other
77 stars 37 forks source link

Failed to build module #98

Closed MinghanShi closed 4 months ago

MinghanShi commented 4 months ago

Hi I am trying to build UEFI for NVIDIA Platforms without Docker for NX (jetson-xavier-nx-devkit-emmc), I followed the instructions Build-without-docker. My x86 host machine is

anshu@jetson-ubuntu22 :~/nvidia uefi [r35.2.1 updates] $python3-- version
Python 3.10.12
anshu@jetson-ubuntu22 :~/nvidia uefi [r35.2.1 updates]$
anshu@jetson-ubuntu22 :~/nvidia uefi [r35.2.1 updates] $lsd_release - a
No LSB modules are available
Distributor ID: Ubuntu
Description: Ubuntu 22.04.4 LTS
Release: 22.04
Codename: Jammy

I encountered an error

Uefi/Build/Jetson/DEBUG_GCC5/AARCH64/MedeModulePkg/Universal/Console/ConPlatformDxe/ConPlatformDxe/OUTPUT/ConPlatformDxe. efi&&GenSec - s EFI-SectiON-PE32- o/home/anshu/nvidia uefi/Build/Jetson/DEBUG_GCC5/Fv/Ffs/51ccf399-4fdf-4e55-a45b-e123f84d456aConPlatformDxe/51ccf399-4fdf-4e55-a 45b-e123f84d456aSEC2.1.pe32/home/anshu/nvidia uefi/Build/Jetson/DEBUG_GCC5/AARCH64/MedeModulePkg/Universal/Console/ConPlatformDxe/ConPlatformDxe/OUTPUT/ConPlatformDxee.efi
INFO - collect2: error: ld returned 1 exit status
INFO - make: * * * [GNUmakefile: 576:/home/anshu/nvidia uefi/Build/Jetson/DEBUG_GCC5/AARCH64/Silicon/NVIDIA/Drivers/EqosDeviceDxe/EqosDeviceDxe/DEBUG/EqosDeviceDxe. ll] Error 1
INFO-
INFO-
INFO - build. py
INFO -: error 7000: Failed to execute command
INFO - make tbuild [/home/anshu/nvidia uefi/Build/Jetson/DEBUG_GCC5/AARCH64/Silicon/NVIDIA/Drivers/EqosDeviceDxe/EqosDeviceDxe]
INFO-
INFO-
INFO - build. py
INFO -: error F002: Failed to build module
INFO -/home/anshu/nvidia uefi/edk2 nvidia/Silicon/NVIDIA/Drivers/EqosDeviceDxe/EqosDeviceDxe. inf [AARCH64, GCC5, DEBUG]
INFO-
INFO -- Failed-
INFO - Build end time: 03:03:15, May.15 2024
INFO - Build total time: 00:07:33
INFO-
INFO -------------------------------------------------
INFO -------- Command Output Completed---------------
INFO -- Running Time (mm: ss): 07:33----------
INFO -------- Return Code: 0x00000001------------
INFO -------------------------------------------------
Error - Compiler # 7000 from: Failed to execute command
Error - EDK2 # 002 from: Failed to build module
CRITICAL - Build failed
PROCESS - End time: 2024-05-15 03:03:15.760337 Total time Elapsed: 0:07:33
Section - Log file is located at:/home/anshu/nvidia uefi/Building/BUILDLOG_Jetson.txt
Section - Summary
Error - Error

I encountered this error on both r35.2.1 updates and r35.2.1 Combo

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

Does anyone know how to solve it, this is BUILDLOG_Jetson.txt during r35.2.1-updates BUILDLOG_Jetson.txt

MinghanShi commented 4 months ago

I did not encounter this error when building the main branch edkrepo clone nvidia-uefi NVIDIA-Platforms main Can I use this main branch UEFI to flash.sh R35.2.1 with jetson-xavier-nx-devkit-emmc ?

jgarver commented 4 months ago

Can I use this main branch UEFI to flash.sh R35.2.1 with jetson-xavier-nx-devkit-emmc ? Unfortunately, no. The main branch will require R35.5 for xavier.

I'll look into the build error, but at the time that r35.2.1 was released, I think we were not supporting ubuntu22 yet. Perhaps we can make it work, though. I'll get back to you.

jgarver commented 4 months ago

For reference, here's the actual error in the build.

INFO - /usr/lib/gcc-cross/aarch64-linux-gnu/12/../../../../aarch64-linux-gnu/bin/ld: /tmp/ccEyYmO1.ltrans1.ltrans.o: in function `eqos_pad_calibrate':
INFO - /home/anshu/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/anshu/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/ccEyYmO1.ltrans1.ltrans.o: in function `osi_lock_irq_enabled.lto_priv.0.lto_priv.0':
INFO - /home/anshu/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/ccEyYmO1.ltrans1.ltrans.o: in function `osi_unlock_irq_enabled.lto_priv.0.lto_priv.0':
INFO - /home/anshu/nvidia-uefi/edk2-nvidia/Silicon/NVIDIA/Drivers/EqosDeviceDxe/nvethernetrm/include/../osi/common/common.h:148: undefined reference to `__aarch64_cas4_sync'
jgarver commented 4 months ago

Please try cherry-picking this change into your edk2-nvidia tree: https://github.com/NVIDIA/edk2-nvidia/commit/b36195917e35ead29ae7e4495696f2fe7d540ef6

I think this will resolve the issue you've run into. Please let me know.

MinghanShi commented 4 months ago

Please try cherry-picking this change into your edk2-nvidia tree: b361959

I think this will resolve the issue you've run into. Please let me know.


INFO - ------------------------------------------------
INFO - --------------Cmd Output Finished---------------
INFO - --------- Running Time (mm:ss): 10:35 ----------
INFO - ----------- Return Code: 0x00000000 ------------
INFO - ------------------------------------------------
PROGRESS - Running Post Build
INFO - Generating uefi image /home/anshu/nvidia-uefi/images/uefi_Jetson_RELEASE.bin
INFO - Copying boot app /home/anshu/nvidia-uefi/images/BOOTAA64_Jetson_RELEASE.efi
INFO - Copying DTB images/BootOrderHttp_Jetson_RELEASE.dtbo
INFO - Copying DTB images/BootOrderEmmc_Jetson_RELEASE.dtbo
INFO - Copying DTB images/AcpiBoot_Jetson_RELEASE.dtbo
INFO - Copying DTB images/BootOrderUsb_Jetson_RELEASE.dtbo
INFO - Copying DTB images/BootOrderUfs_Jetson_RELEASE.dtbo
INFO - Copying DTB images/L4TConfiguration_Jetson_RELEASE.dtbo
INFO - Copying DTB images/BootOrderPxe_Jetson_RELEASE.dtbo
INFO - Copying DTB images/BootOrderNvme_Jetson_RELEASE.dtbo
INFO - Copying DTB images/BootOrderSata_Jetson_RELEASE.dtbo
DEBUG - Plugin Success: Linux GCC5 Tool Chain Support
INFO - Writing BuildToolsReports to /home/anshu/nvidia-uefi/Build/Jetson/RELEASE_GCC5/BUILD_TOOLS_REPORT
DEBUG - Plugin Success: Build Tools Report Generator
PROGRESS - End time: 2024-05-16 02:02:49.223922  Total time Elapsed: 0:10:37
SECTION - Log file is located at: /home/anshu/nvidia-uefi/Build/BUILDLOG_Jetson.txt
SECTION - Summary
PROGRESS - Success

Thank you. It works.