Skip to content

Build with docker

Jake Garver edited this page Oct 2, 2025 · 8 revisions

Building UEFI for NVIDIA Platforms with docker

UEFI for NVIDIA Platforms can be built using the following instructions.

In these instructions, we'll first install and configure docker. Then we'll use the Ubuntu 22 dev image to create a workspace and run the build.

Install docker

The process for installing docker will depend on your host operating system. Please consult the documentation for your host operating system.

For example, to install docker on Ubuntu and allow the current user to use it:

sudo apt install docker.io
sudo usermod -a -G docker ${USER}
# Log out, log back in

Configure docker

To build UEFI for NVIDIA Platforms, we'll use the Ubuntu-22 dev image from the tianocore/containers repository. This image requires parameters identifying the host user and home directory. In addition, you'll also need to mount a build root, which will contain the workspace. These parameters result in a long command line. It is recommended to setup an alias or script as a convenience. The specifics of how to do this depend on the host operationg system and shell.

For example, in bash, an alias can be created with:

# Point to the Ubuntu-22 dev image
export EDK2_DEV_IMAGE="ghcr.io/tianocore/containers/ubuntu-22-dev:latest"

# Required
export EDK2_USER_ARGS="-v \"${HOME}\":\"${HOME}\" -e EDK2_DOCKER_USER_HOME=\"${HOME}\""

# Required, unless you want to build in your home directory.
# Change "/build" to be a suitable build root on your system.
export EDK2_BUILD_ROOT="/build"
export EDK2_BUILDROOT_ARGS="-v \"${EDK2_BUILD_ROOT}\":\"${EDK2_BUILD_ROOT}\""

# Optional, build just the DEBUG or RELEASE image.  By default, both are built.
# export EDK2_BUILD_ARGS="-e UEFI_DEBUG_ONLY=yes"
# export EDK2_BUILD_ARGS="-e UEFI_RELEASE_ONLY=yes"

# Create the alias
alias edk2_docker="docker run -it --rm -w \"\$(pwd)\" ${EDK2_BUILDROOT_ARGS} ${EDK2_USER_ARGS} ${EDK2_BUILD_ARGS} \"${EDK2_DEV_IMAGE}\""

Verify the docker environment by running a simple command. If necessary, the image will be pulled.

edk2_docker echo hello

Configure edkrepo

edkrepo uses manifests to build workspaces and manifests are fetched from repositories. Before edkrepo can be used, we need to create it's base configuration in our home directory. Also, we need to add NVIDIA's manifest repository.

Add edkrepo's base configuration to the current user's home directory:

edk2_docker init_edkrepo_conf

Configure edkrepo with NVIDIA's manifest repository:

edk2_docker edkrepo manifest-repos add nvidia https://github.com/NVIDIA/edk2-edkrepo-manifest.git main nvidia

Create workspace

Now, edkrepo can be used to create workspaces for NVIDIA platforms. This is done using the clone command. The clone command needs to know where to create the workspace, what project to use, and which combination to sync. The project will always be NVIDIA-Platforms.

The syntax to create a workspace is:

edk2_docker edkrepo clone <workspace> NVIDIA-Platforms <combo>

It is important to select the right combination. For a list of available combinations, see NVIDIA Edkrepo Combinations.

For example, to create a workspace in nvidia-uefi using the main combination from the NVIDIA-Platforms project. It will be created under /build, which has been configured as the build root:

cd /build
edk2_docker edkrepo clone nvidia-uefi NVIDIA-Platforms main

Build UEFI

At this stage, the workspace is ready to build images. See the list of available images.

The remaining steps depend on whether you are building a Tegra image or a non-Tegra image.

Tegra can be used to generate images for multiple NVIDIA platforms. It uses Kconfig to configure the image's capabilities and features. Defconfig files are provided as configuration starting points. The Tegra platform was added with the uefi-202503 release.

Building a Tegra image

Tegra images must be configured with an initial defconfig. Defconfig files are provided in edk2-nvidia/Platform/NVIDIA/Tegra/DefConfigs.

For example, to build a Tegra image based on t26x_general.defconfig:

cd nvidia-uefi
edk2_docker edk2-nvidia/Platform/NVIDIA/Tegra/build.sh --init-defconfig edk2-nvidia/Platform/NVIDIA/Tegra/DefConfigs/t26x_general.defconfig

After providing the defconfig, --menuconfig can be used to customize the configuration. Note that when configuring, you might prefer to build just one image to avoid launching menuconfig twice. See Configure docker. The configuration is shared between DEBUG and RELEASE images.

edk2_docker edk2-nvidia/Platform/NVIDIA/Tegra/build.sh --menuconfig

You can also add --skipallbuild to skip the build after configuring.

edk2_docker edk2-nvidia/Platform/NVIDIA/Tegra/build.sh --menuconfig --skipallbuild

Building a non-Tegra image

To build non-Tegra image, such as StandaloneMmJetson:

cd nvidia-uefi
edk2_docker edk2-nvidia/Platform/NVIDIA/StandaloneMmJetson/build.sh

Clone this wiki locally