最近我移植比较新的固件jetson36.4.3,发现UEFI开机时间太长,UEFI启动我花了40秒才到UEFI logo界面。

Continuing the discussion from 最近购买新的orin nano4GB开发板,开机失败,不停重启。:

开发板:orin nano 4G
开发环境:Ubuntu22.04
开发工具:jetson36.4.3

我是一个新手小白。
我按照 Build without docker · NVIDIA/edk2-nvidia Wiki已经拉取了UEFI源码。
请问我想优化启动时间,减少启动时间,需要如何调整?

Hi 56101855,

Are you using the devkit or custom board for Orin Nano?

Please share the command how did you clone the UEFI source.

You can just refer to miniUEFI Support for this use case.

我是通过这个命令获取的源码。

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

关于你提到的“ You can just refer to miniUEFI Support for this use case.” 我运行情况如图:

It is not the expected command to me to download UEFI source since you are using main branch.

Please use the following commands instead for Jetpack 6.2(L4T r36.4.3).

Clone source for r36.4.3:
$ edk2_docker edkrepo clone nvidia-uefi-r36.4.3 NVIDIA-Platforms r36.4.3

Building the miniUEFI:
$ edk2_docker edk2-nvidia/Platform/NVIDIA/JetsonMinimal/build.sh

感谢你的帮助,我按照你给的操作成功构建了最小UEFI。我将文件替换/home/ys/36.4/Jetson_Linux_R36.4.3_aarch64/Linux_for_Tegra/bootloader/uefi_jetson.bin.
通过sudo ./flash.sh -c bootloader/generic/cfg/flash_t234_qspi.xml --no-systemimg jetson-orin-nano-devkit nvme0n1p1刷入UEFI固件。现在刷入以后进不了系统。附件为开机调试信息。
MobaXterm_COM12USB-SERIALCH340COM12_20250513_145021.txt (146.8 KB)

我使用的NVME硬盘。

你好,在线吗?你能帮帮我吗?

Please run the following command to flash your board instead.

$ sudo ./flash.sh -c bootloader/generic/cfg/flash_t234_qspi.xml jetson-orin-nano-devkit internal
FindPartitionInfo: Failed to find parents - Not Found
ProcessExtLinuxConfig: Unable to find partition info
L4TLauncher: Unable to process extlinux config: Not Found

From the log you shared, it seems something lost.
It should not relate to miniUEFI, please check it locally.

我只是替换/home/ys/36.4/Linux_for_Tegra/bootloader/uefi_jetson.bin文件。我也按照你提供给我的指令操作。
MobaXterm_COM12USB-SERIALCH340COM12_20250513_181936.txt (146.8 KB)

在替换刷UEFI固件之前是可以正常进入系统的。但是更换UEFI固件就进不了系统了。尝试将UEFI固件还原,也能正常进入系统。

Are you using the devkit or custom board for Orin Nano 4GB?

Could you use debug UEFI binary and share the full serial console log again?

I found there’s <Linux_for_Tegra>/bootloader/uefi_jetson_minimal.bin in BSP package by default.
Could you also try using this binary instead?

$ cd <Linux_for_Tegra>/
$ cp bootloader/uefi_jetson_minimal.bin bootloader/uefi_jetson.bin
$ sudo ./flash.sh -c bootloader/generic/cfg/flash_t234_qspi.xml jetson-orin-nano-devkit internal

感谢你的回复!我确实使用的是Orin Nano 4GB开发套件。 我也尝试过使用 bootloader/uefi_jetson_minimal.bin文件。故障情况依旧存在。


你说的是这个调试信息?还是我使用uefi_JetsonMinimal_DEBUG.bin?
MobaXterm_COM12USB-SERIALCH340COM12_20250513_181936.txt (146.8 KB)

你好!这是我debug版本打印调试信息。
MobaXterm_COM12USB-SERIALCH340COM12_20250514_131043.txt (282.4 KB)

I can reproduce your issue on the devkit locally.
Please give me more time to do further check.

好的!感谢你的帮助!静候你的好消息。

After an internal check, it was found that the current miniUEFI only supports AGX Orin because it boots from eMMC.

Please refer to the following steps to verify:

Step 1. Use the following configurations for nvidia-uefi-r36.4.3/edk2-nvidiaPlatform/NVIDIA/JetsonMinimal/Jetson.defconfig

CONFIG_SOC_ORIN=y
CONFIG_SECURITY_TPM_FIRMWARE=y
CONFIG_SECURITY_MM_OPTEE=y
CONFIG_SECURITY_PHYSICAL_PRESENCE=y
CONFIG_VARIABLE_NON_SECURE_SUPPORTED=y
# CONFIG_USB is not set
CONFIG_NVIDIA_DISPLAY=y
CONFIG_SERIAL_PORT_CONSOLE_TEGRA=y
CONFIG_DEVICETREE=y
CONFIG_SMBIOS_ARM=y
CONFIG_BOOT_QUICK_BOOT=y
CONFIG_BOOT_QUICK_BOOT_ENABLED=y
CONFIG_BOOT_NATIVE_ANDROID_PARTITION_SUPPORT=y
CONFIG_SINGLE_BOOT_L4T_LAUNCHER=y
CONFIG_SOC_DISPLAY_HANDOFF_MODE_AUTO=y
CONFIG_L4T=y
# CONFIG_LOGO is not set
CONFIG_FIRMWARE_MANAGEMENT_FMP_ESRT_GUID="7C374309-1649-4682-8BEE-04F3A8399414"
# CONFIG_ARM_WATCHDOG is not set
# CONFIG_NETWORKING is not set
# CONFIG_FS_FAT is not set
CONFIG_FS_EXT4=y
# CONFIG_SHELL is not set

Step 2. Run the following commands to build miniUEFI for Orin Nano (booting from NVMe).

$ cd <nvidia-uefi-r36.4.3>
$ sudo rm -rf nvidia-config
$ edk2_docker edk2-nvidia/Platform/NVIDIA/JetsonMinimal/build.sh

Step 3. Run the following commands to flash

$ sudo ADDITIONAL_DTB_OVERLAY="BootOrderNvme.dtbo" ./flash.sh -c bootloader/generic/cfg/flash_t234_qspi.xml jetson-orin-nano-devkit internal

感谢你们的帮助,现在使用这个版本的UEFI可以启动了。但是启动时间并没有明显减少。
请问还有什么优化方法吗?启动时间太长了。

Please share the full serial console log with timestamp enabled before and after you updated UEFI binary.