Xavier NX 8G boot issue

I have 2 sets of 16GB Xavier NX units and 2 sets 8GB Xavier NX units.
If I flash the 16GB units i have no issues with the following command: sudo ./nvsdkmanager_flash.sh --storage nvme0n1p1

However once i do this on the 8GB units it flashes OK but it keeps hanging after the reboot screen goes dark.

ive attached a uart debug serial but i didnt get any wiser with that info

i would apreciate the help on these units

startup_xavier_8g.txt (58.9 KB)

Hi lightscape.nl,

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

Why you use this script (which is for SDK Manager to use) to flash the board?
Do you want to flash into eMMC or NVMe drive?

Could you help to use flash.sh instead?

I want to flash into the NVMe eventually and on the 16G version it does, but the emmc equivalent gives the same issue.

I also tried the initrd_flash version:
sudo ./tools/kernel_flash/l4t_initrd_flash.sh --no-flash jetson-xavier-nx-devkit-qspi internal
sudo ./tools/kernel_flash/l4t_initrd_flash.sh --no-flash --external-device nvme0n1p1 -c ./tools/kernel_flash/flash_l4t_external.xml --external-only --append jetson-xavier-nx-devkit-emmc external
sudo ./tools/kernel_flash/l4t_initrd_flash.sh --flash-only

But that gives the same result aswell

flash.sh doesnt do the NVMe as I read in multiple posts

Sorry, please use l4t_initrd_flash.sh instead of flash.sh to flash into NVMe drive.

Could you boot up with internal eMMC successfully (w/o NVMe drive connected)?
What’s the physical size of your NVMe drive?

Okay, Im using a regular dev kit and just to make sure i used the following commands:
sudo ./tools/kernel_flash/l4t_initrd_flash.sh --no-flash jetson-xavier-nx-devkit-qspi internal
sudo ./tools/kernel_flash/l4t_initrd_flash.sh --no-flash --external-device nvme0n1p1 -c ./tools/kernel_flash/flash_l4t_external.xml --external-only --append jetson-xavier-nx-devkit-emmc external
sudo ./tools/kernel_flash/l4t_initrd_flash.sh --flash-only
With a Samsung 256GB NVMe drive (tried different ones due to some posts I found but all ended with the same result) resulting in a NON Booting image debug logs are named: l4t_initrd_flash_8g_nvme.txt (103.7 KB)

Also tried the flash command:
sudo ./flash.sh jetson-xavier-nx-devkit-emmc mmcblk0p1
Using the internal EMMC with the NVMe detached, resulting in a BOOTING image debug logs are named: flash_8g_emmc.txt (143.3 KB)

What i was able to figure out was:
If I first flash the NVMe with the above l4t_initrd_flash.sh procedure and DIRECTLY AFTER use
sudo ./flash.sh jetson-xavier-nx-devkit-emmc nvme0n1p1
The Xavier NX boots but it has both emmc and NVMe exposed (root is on NVMe), however this doesn’t look like “normal” behavior to me. I have added these logs aswell: combined_flash.txt (101.0 KB)

The 16G models don’t need any of these extra steps and flash quite easy

I can’t quite get my head around it. What goes wrong, but what part isn’t flashed in my l4t_initrd_flash commands and how to flash that bit?
The reason why I ask is there might be a discrepancy there, that gets written by a normal flash but my l4t_initrd_flash rules skip.

You could make sure the board could boot up with internal eMMC before flash into NVMe drive.

Please also try the following command to flash the board

$ sudo ./tools/kernel_flash/l4t_initrd_flash.sh --external-device nvme0n1p1 -c tools/kernel_flash/flash_l4t_nvme.xml --external-only -S 240GiB --showlogs  jetson-xavier-nx-devkit-emmc nvme0n1p1

Before you run the above command, please check something in flash_l4t_nvme.xml . Modify num_sectors to make num_sectors*sector_size larger than 240GiB but less than actual physical size (256GB). ex. you could set 513802240 for num_sectors.

I first tried with the sector number you stated but it gave an error it was too big, so I did the following steps to get to the next stage.

  1. First flashed the Xavier using: sudo ./flash.sh jetson-xavier-nx-devkit-emmc mmcblk0p1
  2. Used sudo fdisk -l to find this NVMe value in my case:
    Disk /dev/nvme0n1: 238.49 GiB, 256060514304 bytes, 500118192 sectors (makes sense the sector number you stated gave an error)
    (Now I see that the 240GiB of the flash command you gave will not fit since the actual GiB’s of the drive are 238GiB, so I decided the flash command to go with 230GiB instead)
  3. Edited the /Linux_for_Tegra/tools/kernel_flash/flash_l4t_nvme.xml file to show the at step 2 found num sectors for the NVMe
  4. Used the following flash command you mostly provided:
    sudo ./tools/kernel_flash/l4t_initrd_flash.sh --external-device nvme0n1p1 -c tools/kernel_flash/flash_l4t_nvme.xml --external-only -S 230GiB --showlogs jetson-xavier-nx-devkit-emmc nvme0n1p1

The unit boots afterwards so thats good, however that means the EMMC is also filled with an OS and I can even entirely remove all partitions of that EMMC afterwards so the linking is done right with the flash.sh command, but manually removing the partitions on the EMMC after every flash is not really the right way (would be the same as the l4t_initrd_flash.sh command without --external-only and would wear the EMMC much more).

So I tested the above command combined with the flash of the QSPI, but then it won’t boot any longer.
sudo ./tools/kernel_flash/l4t_initrd_flash.sh jetson-xavier-nx-devkit-qspi internal
sudo ./tools/kernel_flash/l4t_initrd_flash.sh --external-device nvme0n1p1 -c tools/kernel_flash/flash_l4t_nvme.xml --external-only -S 230GiB --showlogs jetson-xavier-nx-devkit-emmc nvme0n1p1

In my assumption is that if the following command breaks an already working image that command must be wrong:
sudo ./tools/kernel_flash/l4t_initrd_flash.sh jetson-xavier-nx-devkit-qspi internal
And if I have a working image and the QSPI flash doesn’t break things, I have the right command for the given flashing procedure for NVMe without actually having an OS placed aswell on the EMMC.

Is there more info on how to flash it the same way the flash.sh command does?


Found the golden solution and wanted to share this to others, the following flash command can be used for Xavier NX modules to leave the EMMC intact (so if it’s empty, it remains that way) and the RootFS is on the NVMe for booting
I’ve also read that this can be used with some small alteration for Orin NX modules as well, only then the flash_t234_qspi.xml should be used.

Keep in mind that /Linux_for_Tegra/tools/kernel_flash/flash_l4t_nvme.xml needs to be edited to the total sector number of the NVMe drive you use. This can be found with fdisk -l

sudo ./tools/kernel_flash/l4t_initrd_flash.sh --external-device nvme0n1p1 -c tools/kernel_flash/flash_l4t_external.xml -p “-c bootloader/t186ref/cfg/flash_t194_uefi_qspi_p3668.xml --no-systemimg” --network usb0 jetson-xavier-nx-devkit-emmc external

Thanks for the pointer in the right direction. Now let’s see on getting it with SecureBoot operational but thats the next chapter :P

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.