Nx bootup failed after upgraded to Jetpack 5.1

Following the instructions in https://developer.nvidia.com/embedded/jetson-linux, I upgraded my nx to Jetpack 5.1 . With a successful hint of flash_ssd, when reboot the nx, it cannot bootup successfully.
ASSERT [DxeCore] /out/nvidia/bootloader/uefi/Jetson_RELEASE/edk2/MdeModulePkg/Core/Dxe/DxeMain/DxeMain.c(562): !(((INTN)(RETURN_STATUS)(Status)) < 0)

Resetting the system in 5 seconds.
Shutdown state requested 1
Rebooting system …

How to fix it, please help. BTW, I used the same methods on Jetpack 5.0.2, it will be OK.
nx5.1.bad.log (15.5 KB)

1 Like

Are you using the devkit or custom board for Xavier NX?

Do you connect any peripherals on your board?

It seems an assertion in UEFI.
Could you also help to update UEFI image to enable debug messages?

i’m using the devkit, and with a pcie-ssd harddrive by using command: nvsdkmanager_flash.sh --storage nvme0n1p1

And could you give a simple instruction for “update UEFI image to enable debug messages”, or a link, I am not sure how to do that. Thanks.

please help.

If you are using the devkit, it should work as normal because we have many Xavier NX boot successfully with Jetpack 5.1.

Does your board could boot up with internal eMMC or SD card w/o NVMe driver connected?

You could refer to the following link to build and flash UEFI image.
Home · NVIDIA/edk2-nvidia Wiki · GitHub

Thanks for your reply.
After I flash sdk to ssd, I got the error I mentioned before. Then I flash it to emmc, it works.
In detail, if I bootup with ssd, NX bootup by using the system on ssd. And I bootup without ssd, NX will bootup by using the system on EMMC. It seems wierd, isn’t it?
Or, they are the exactly correct routine? So, where is uefi installed?

Please provide the result of lsblk on your board with NVMe SSD connected.

You may refer the guide to build and flash uefi image, which is located in Linux_for_Tegra/bootloader/uefi_jetson.bin

lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
loop0 7:0 0 16M 1 loop
zram0 251:0 0 857.2M 0 disk [SWAP]
zram1 251:1 0 857.2M 0 disk [SWAP]
zram2 251:2 0 857.2M 0 disk [SWAP]
zram3 251:3 0 857.2M 0 disk [SWAP]
nvme0n1 259:0 0 477G 0 disk
├─nvme0n1p1 259:1 0 476.2G 0 part /
├─nvme0n1p2 259:2 0 64M 0 part
├─nvme0n1p3 259:3 0 448K 0 part
├─nvme0n1p4 259:4 0 32M 0 part
├─nvme0n1p5 259:5 0 64M 0 part
├─nvme0n1p6 259:6 0 448K 0 part
├─nvme0n1p7 259:7 0 32M 0 part
├─nvme0n1p8 259:8 0 80M 0 part
├─nvme0n1p9 259:9 0 512K 0 part
├─nvme0n1p10 259:10 0 300M 0 part
├─nvme0n1p11 259:11 0 64M 0 part
├─nvme0n1p12 259:12 0 80M 0 part
├─nvme0n1p13 259:13 0 512K 0 part
└─nvme0n1p14 259:14 0 64M 0 part

What I mean is where is the uefi installed in NX devkit? flash (/dev/mtd0) ? or emmc? or ssd(nvme)?

Why there’s no mmcblk0 on your board?
It seems rootfs has been mounted on your NVMe SSD.

It should be in internal eMMC (mmcblk0) with the name of “cpu-bootloader”.
You could refer to the flash_l4t_t194_spi_emmc_p3668.xml for configuration of all partitions.

Yes, if I bootup the borad without ssd, rootfs will use the one on emmc. The system looks “adaptable”…
All these happened after I run the two commands.
1 “nvsdkmanager_flash.sh --storage nvme0n1p1”, (only run this, bootup failed as I mentioned in the first palce)
2 “flash.sh jetson-xavier-nx-devkit-emmc mmcblk0p1”.

Have I made this clear? I suppose command 2 is not necessary, am I right? Again, only doing command 1 does work on my 5.0.2 environment.

This behavior seems as expected to me. If you don’t have NVMe SSD connected, it would use internal eMMC to boot up.

Sorry, I’m not very clear about your problem at this moment. From beginning, it seems an assertion in UEFI causing boot up failed, but it seems could boot up successfully so that you could show me the result of lsblk and NVMe is mounted as rootfs as expected.

The first command from you is using sdkm script to flash into NVMe, it will call l4t_initrd_flash.sh for external device.
The second command from you is using to flash internal eMMC.
The usage of both command depends on what you want to do now.

The problem is: if I run command 1 only, which I want to flash system the nvme, it cannot boot up successfully with the error I mentioned at the beginning.

Could it boot up successfully if you run both commands?

To boot up from NVMe drive, you have to make sure the board could boot up successfully with internal eMMC first (w/o NVMe connected). After that, connecting an NVMe drive and flash the image into it.

The problem is: if I run command 1 only, which I want to flash system the nvme, it cannot boot up successfully with the error I mentioned at the beginning.

There are two cases on my testbed.
1, flash nvme, then flash emmc, the system can bootup with both nvme and emmc. (with or without ssd attached)
2, flash emmc, then flash nvme, the system cannot bootup with neither nvme nor emmc. (with or without ssd attached)

Thanks for your clarification.

Let’s talk about 2nd case and simplify it to 3 steps.
Step 1. Flash eMMC (w/o SSD connected)
Step 2. Flash NVMe
Step 3. Boot up failed (as you mentioned)

Does your board can boot up successfully after Step 1?
If yes, please help to provide the flash log of Step1/Step2 and serial log of Step3 for further check.

Yes, attached zip included 2 flashing logs
nv.nx5.1.zip (44.6 KB)
and 1 bootup-failed log. Please check. Thanks a lot.

Do you use this command to flash into NVMe drive?

Is your NVMe drive 512GB physically?

I found there are some errors in flash_ssd.log, not sure it would relate to your issue.

Fix/Ignore? Error: The backup GPT table is not at the end of the disk, as it should be.  Fix, by moving the backup to the end (and removing the old backup)?
Fix
Warning: Not all of the space available to /dev/nvme0n1 appears to be used, you can fix the GPT to use all of the space (an extra 880677551 blocks) or continue with the current setting? 

1 Yes, it is the command I used.
2 Yes, it is 512GB.
3 According the log, it seems ok “Fix, by moving the backup to the end (and removing the old backup)?
Fix”. And the impact is that perhaps cannot use all of the space of nvme, seems not big deal.
And, after I flash emmc again, the syetem on nvme can boot up successfullly. It looks flash emmc fixed some bugs caused by flashing nvme…

And can you reproduce this bug on you devkit?
To me, I can reproduce it 100 percent.