Optimizing boot time on Orin NX (JP5.1.2)

@KevinFFF

Even on JP5.3.1 it is the same
Is it because of boot from USB?

[2024-03-20 10:47:35] 
                      [2024-03-20 10:47:35] L4TLauncher: Attempting Direct Boot
[2024-03-20 10:47:41] EFI stub: Booting Linux Kernel...
[2024-03-20 10:47:41] EFI stub: Using DTB from configuration table
[2024-03-20 10:47:41] EFI stub: Loaded initrd from LINUX_EFI_INITRD_MEDIA_GUID device path
[2024-03-20 10:47:41] EFI stub: Exiting boot services and installing virtual address map...
[2024-03-20 10:47:41] ��I/TC: Secondary CPU 1 initializing

I verified it with booting from NVMe SSD.
Could you also verify using NVMe SSD and check if there’s still 5s delay at this moment?

@KevinFFF

I will check.
May I know what is the current boot time from power on to log on on your end?

It’s about 31s, you can refer to the following serial console log.
boot.log (139.8 KB)

@KevinFFF

Without any optimization it is supposed to be 31 seconds i see.

But on my end it is not. The only difference i see is on the kernel end , the kernel itself takes 40 seconds after a fresh flash. This includes the wait time and some extra nodes in Early memory node ranges Here is my log, after applying the uefi changes. I have taken it from the Orin dev board.

orin_nx_log.txt (140.3 KB)

Could you please share the flash command as well.

Also any changes made to extlinux.conf file?

31 seconds result includes the optimization in UEFI as I shared yesterday.

Flash command as following:

$ sudo ADDITIONAL_DTB_OVERLAY_OPT="BootOrderNvme.dtbo" ./tools/kernel_flash/l4t_initrd_flash.sh --external-device nvme0n1p1 -c tools/kernel_flash/flash_l4t_external.xml -p "-c bootloader/t186ref/cfg/flash_t234_qspi.xml" --showlogs --network usb0 jetson-orin-nano-devkit internal

I don’t have modification in extlinux.conf.

@KevinFFF

Yes even i applied the uefi changes and flashed.
The only difference i see here is nvme ssd and usb device.
I will boot the orin with nvme ssd and share the console log.

1 Like

@KevinFFF

On doing a fresh flash on Orin with the Uefi changes shared , on NVMe SSD, i was able to boot the Orin in 32 seconds.

The wait time at random places is not there.

But the USB takes longer time to boot up
orin_nvme_boot_log.txt (141.8 KB)

For optimization i cannot disable PCIE as ethernet and display get disconnected.

Okay, would it meet your boot time requirement to boot from NVMe SSD?

@KevinFFF

We want to reach 15 seconds, the UEFI and MB1 MB2 together take 13 seconds.
Kernel takes 17 seconds on SSD
And 40 seconds on USB

@KevinFFF

Can we further reduce the UEFI time?

@KevinFFF

i face the same issue on custom carrier board, there is no EEPROM.

Above change I shared is to optimize the boot time in UEFI.
If you want to get more optimized boot time, please customize through configuration file in UEFI for your use case to meet your requirement.

I would suggest you checking what modification in UEFI source causes the assertion in UEFI.

@KevinFFF

Is it possible to flash the UEFI / bootloader alone? But we use initrd _flash for booting from USB on Orin


sudo ./flash.sh -r -k A_cpu-bootloader <board> <rootdev>

Please try the following command instead for your case.

$ sudo ./flash.sh -k A_cpu-bootloader -c bootloader/t186ref/cfg/flash_t234_qspi.xml jetson-orin-nano-devkit sda1
1 Like

@KevinFFF

Replacing the nvidia logo in the bootloader stage might be causing the synchronous exception error.

Since you are using the devkit, could you verify with the latest JP5.1.3 (L4T R35.5.0)?

@KevinFFF

Is there any known issue with JP5.1.2? It is working fine on the dev kit , unitl now i have not faced this synchronous issue on the dev kit for JP5.1.2.
Also, when i flash the UEFI multiple times, i suddenly hit this error. (custom board)

Initially i did not face this issue but as i kept flashing with other changes, it gets struck at the UEFI bootloader, and gives the error.

I observed that this happens when i replace the NVIDIA logo.

@KevinFFF

using the DEBUG UEFI image, i come across:


[2024-04-22 18:06:36] Driver CBD2E4D5-7068-4FF5-B462-9822B4AD8D60 was discovered but not loaded!!
[2024-04-22 18:06:36] Driver 9622E42C-8E38-4A08-9E8F-54F784652F6B was discovered but not loaded!!
[2024-04-22 18:06:36] Driver 1B6520D3-7F4D-4D64-85F5-7D8ED1C8B291 was discovered but not loaded!!
[2024-04-22 18:06:36] Driver F6C7812D-81BF-4E6D-A87D-E75AF17BD511 was discovered but not loaded!!
[2024-04-22 18:06:36] Driver 32DC7535-51EF-445E-BF29-3F6E894D6EB6 was discovered but not loaded!!
[2024-04-22 18:06:36] Driver 30DF5A51-535C-4FF7-ACF2-EF914016699B was discovered but not loaded!!
[2024-04-22 18:06:36] Driver FE5CEA76-4F72-49E8-986F-2CD899DFFE5D was discovered but not loaded!!
[2024-04-22 18:06:36] Driver E44CDDE6-EF19-4A7A-8C90-395747C35F7C was discovered but not loaded!!

I have disabled particular drivers in the edk2-nvidia path - NVIDIA.common.dsc.inc and NVIDIA.fvmain.fdf.inc

do i have to disable this driver elsewhere? because i see the image is probing for the drivers, please assist.

Which driver do you disable?
Would you still hit those errors after you add the driver back?

For the devkit, we would always verify with the latest release for all the possible fixes we’ve found.