Building UEFI for Jetson Orin AGX - r36.4.4

I’m building a custom UEFI using these instructions on the edk2-nvidia repo: Build with docker · NVIDIA/edk2-nvidia Wiki · GitHub

Previously this worked, however I’m currently getting errors such as virtualenv not being able to activate in the build scripts. This is an issue described here: venv/bin/activate: No such file or directory · Issue #104 · NVIDIA/edk2-nvidia · GitHub and fixed in the following commit: fix(scripts): Work-around virtualenv posix_local bug · NVIDIA/edk2-nvidia@ba00283 · GitHub

Since I’m building UEFI for the Jetson Orin AGX with Jetson Linux version r36.4.4 I’m using the following workspace:

edk2_docker edkrepo clone nvidia-uefi-r36.4.4 NVIDIA-Platforms r36.4.4

I noticed that the fix for the virtualenv is not included in this workspace and the combo is listed under archive: Combos · NVIDIA/edk2-nvidia Wiki · GitHub

Does that means r36.4.4 is not being actively supported anymore and I can’t build an UEFI bootloader for this? Do I need to use a different combo?

Aside from the virtualenv I’m getting multiple other errors. I’m building on a system using Ubuntu 22.04. The error I’m currently getting is:

“ModuleNotFoundError: No module named ‘kconfiglib’” from line 178 of edk2-nvidia/Silicon/NVIDIA/edk2nv/stuart/builder.py

*** Please note that this reply is generated by LLM automatically ***

Based on the information provided, it appears that you are trying to build a custom UEFI bootloader for the Jetson AGX Orin using the edk2-nvidia repository. However, you are encountering errors related to virtualenv not being able to activate in the build scripts.

The issue you are experiencing is described in the edk2-nvidia repository’s issue tracker, specifically in issue #104. The fix for this issue was committed in ba00283, which is not included in the workspace you are using (r3644).

The fact that the combo is listed under “archive” in the edk2-nvidia repository’s wiki suggests that it may not be actively supported anymore. This could mean that you may not be able to build an UEFI bootloader for the Jetson AGX Orin using this combo.

However, it’s worth noting that the edk2-nvidia repository is actively maintained, and new commits are being made regularly. It’s possible that the fix for the virtualenv issue may be included in a newer combo.

To resolve the issue, you have a few options:

  1. Use a different combo: You can try using a newer combo that includes the fix for the virtualenv issue. You can check the edk2-nvidia repository’s wiki for a list of available combos and their corresponding workspaces.
  2. Apply the fix manually: You can try applying the fix for the virtualenv issue manually by cherry-picking the commit ba00283 into your workspace.
  3. Use a different build system: If you are experiencing multiple errors, it may be worth considering using a different build system, such as the one provided by the Jetson Linux SDK.

In terms of the other errors you are experiencing, it’s difficult to provide a specific solution without more information. However, you may want to try the following:

  • Check the edk2-nvidia repository’s issue tracker to see if the errors you are experiencing are known issues.
  • Check the edk2-nvidia repository’s wiki for documentation on building UEFI bootloaders for the Jetson AGX Orin.
  • Try building the UEFI bootloader on a different system or with a different version of Ubuntu.

It’s also worth noting that building a custom UEFI bootloader can be a complex and error-prone process. If you are not experienced in building UEFI bootloaders, it may be worth considering using a pre-built bootloader or seeking assistance from a qualified developer.

In comparison to other Jetson modules, the Jetson AGX Orin is a relatively new module, and it’s possible that the build process for the UEFI bootloader may not be as well-documented or supported as it is for other modules. However, the edk2-nvidia repository is actively maintained, and the community is generally responsive to issues and questions.

In terms of the Jetson Linux version, r3644 is a relatively old version, and it’s possible that the build process for the UEFI bootloader may not be compatible with this version. You may want to consider using a newer version of Jetson Linux, such as r3650 or later, to see if the build process is more stable and well-supported.

*** Please give the thumbs up if you get answers you like. Or provide feedback to help us improve the answer. ***

Hi Foly,

It is the expected command to sync the source for r36.4.4.
Do you have any customization in UEFI source?

Would it work if you apply that commit to r36.4.4 source manually?

Please also share the full logs when you are building the UEFI source.

Hi Kevin,

Thank you for your answer. Because of the errors I’ve tried it without customizations first.

I’ve indeed applied the commit manually which fixed that particular error. I’ve traced the other error to a deprecated module “pkg_resources” in setuptools. This module is removed in Python setuptools version 82.0.0. I fixed this by adding “setuptools==81.0.0” to the “pip-requirements.txt” file in the “edk2” repository to pin the setuptools version to a version that still includes the pkg_resource module.

Luckely I can now build the UEFI, but I guess Linux versions like r36.4.4 are not maintained anymore and only the ones listed under “Combos” can be used? Thus we might have to update the Linux version to still get updates in the future.

You may also try the following steps as workaround.

cd <nvidia-uefi-r36.4.4>/
edk2_docker bash
source venv/bin/activate
pip install 'setuptools<70'
python -c "import pkg_resources; print(pkg_resources.__file__)"
deactivate
exit

Yes, we will maintain the latest release for each SW version.