How to build uefi bin and QSPI for Jetpack 5.1.3

HW: AGX Orin 64G

Jetpack: 5.1.3

hello Nvidia, my system block on uefi :“ASSERT [FvbNorFlashStandaloneMm] /dvs/git/dirty/git-master_linux/out/nvidia/optee.t234-uefi/StandaloneMmOptee_RELEASE/edk2-nvidia/Silicon/NVIDIA/Drivers/FvbNorFlashDxe/FvbNorFlashStandaloneMm.c(868):”, I had apply the patch to uefi, but I don’t kown How to build uefi(uefi_jetson.bin?) and QSPI

After applying the patch to the UEFI source, follow these steps to build and flash the firmware for Jetson AGX Orin with Jetpack 5.1.3:

Step 1: Build the UEFI StandaloneMmOptee RELEASE binary

Run the following command to build the patched UEFI binary:

$ edk2_docker edk2-nvidia/Platform/NVIDIA/StandaloneMmOptee/build.sh

This generates uefi_StandaloneMmOptee_RELEASE.bin.

Step 2: Build the tos-optee image

Refer to the steps in atf_and_optee_README.txt to build the tos image. Before building OP-TEE, set the environment variable to point to the UEFI binary you just built:

$ export UEFI_STMM_PATH=<UEFI source>/images/uefi_StandaloneMmOptee_RELEASE.bin

Then follow the README instructions to build the tos image.

Step 3: Update the tos-optee image in Linux_for_Tegra

Copy the built tos image to the bootloader directory:

$ cp tos.img <Linux_for_Tegra>/bootloader/tos-optee_t234.img

Step 4: Flash the QSPI

Flash only the QSPI to apply the changes:

$ sudo ./flash.sh -c bootloader/generic/cfg/flash_t234_qspi.xml jetson

The steps were very clearly, and I have successfully flashed qspi. Thank you very much.