Timeout when try to flash NVMe on AGX Orin

Hi Nvidia:
I have a system.img cloned from AGX Orin eMMC. I am trying to flash it into other NVMe on other agx orins, which is similar to Link 2 below.
I am using JetPack 5.1.2, Host Ubuntu 20.04
I tried the the link :
Link 1
Link 2
None of them working.

Following Link 1:

When flashing comes to Step 3, the script is trying to boot up Agx orin, it just timeout and report no other errors. Display of Devkit looks empty, just a underline blinking.
On Serial Port, “No known UDC device found” is dumped went into the bash.


Following Link 2:
I first use: (BOARDID, SKU were query via sudo ./nvautoflash.sh --query )

sudo BOARDID=3701 BOARDSKU=0005 FAB=TS4 BOARDREV=M.0 ./tools/kernel_flash/l4t_initrd_flash.sh --no-flash jetson-agx-orin-devkit external

Then

sudo BOARDID=3701 BOARDSKU=0005 FAB=TS4 BOARDREV=M.0 ./tools/kernel_flash/l4t_initrd_flash.sh --flash-only jetson-agx-orin-devkit external

Host reported: might be timeout during USB write. (I changed a few USB lines. This issue happens all the times)
UART logs seems trying to boot via NVMe?

Here are the log attahced:
putty_Host_Link1.log (385.4 KB)
putty_Host_Link2.log (235.1 KB)
putty_UART_Link1.log (96.7 KB)
putty_UART_Link2.log (72.2 KB)


After reading documents about flashing, seems like making AGX Orin devkit boot using NVMe, requires:

  1. Bootloader in AGX Orin eMMC need to be flashed as External (sudo ./flash.sh jetson-agx-orin-devkit external)
  2. NVMe need to flashed as reconizable rootfs. To do so, use direct flash or the way I mentioned above, initrd flashing, should do the trick.
    Am I right?

Please help.

Many thanks.

I don’t really know what you are doing.
Please first make sure your device can be flashed with this command

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_t234_qspi.xml" \
  --showlogs --network usb0 jetson-agx-orin-devkit internal

Hi DaveYYY:
The issue remains. Here are the logs:
putty_UART_internal.log (96.7 KB)

flashLogs_20240401.log (274.0 KB)

[   63.182119] usb usb2-port2: Cannot enable. Maybe the USB cable is bad?
[   63.182333] usb usb2-port2: config error
[   67.000025] usb 1-4.2: USB disconnect, device number 3
[   67.258158] usb usb2-port2: Cannot enable. Maybe the USB cable is bad?
[   67.258358] usb usb2-port2: config error
[   68.337889] usb 1-4.2: new low-speed USB device number 4 using tegra-xusb
[   68.446265] usb 1-4.2: New USB device found, idVendor=0461, idProduct=4e84, bcdDevice= 1.00
[   68.446511] usb 1-4.2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[   68.446722] usb 1-4.2: Product: USB Optical Mouse
[   68.446852] usb 1-4.2: Manufacturer: PixArt
[   68.451865] input: PixArt USB Optical Mouse as /devices/platform/3610000.xhci/usb1/1-4/1-4.2/1-4.2:1.0/0003:0461:4E84.0002/input/input2
[   68.453012] hid-generic 0003:0461:4E84.0002: input,hidraw0: USB HID v1.11 Mouse [PixArt USB Optical Mouse] on usb-3610000.xhci-4.2/input0
[   68.453636] tegra-xudc 3550000.xudc: failed to get usbphy-0: -517

The error log alreay explained.
Please try again with a different USB cable.

Hi DaveYYY:
We fixed the USB issue, but we still can’t flash NVMe on Orin.

flashLogs_noUsbErr.log (273.9 KB)
uartLogs_noUsbErr.log (93.0 KB)

Do you have another carrier board for testing?
Looks like either the USB port on the board or the USB cable is problematic.

The initrd flash server is looking for 3550000.xudc . However the kernel fail to create it here

[   68.453636] tegra-xudc 3550000.xudc: failed to get usbphy-0: -517

Did you modify the kernel?

It is also possible to write the content directly to an NVMe SSD that is attached to your host PC if you prefer this way Flashing Support — Jetson Linux Developer Guide documentation . After that you can use that NVMe SSD for your Jetson.

1 Like

Hi lhoang:
We indeed modified the kernel. And to verify if the modification caused the issue, we also tried Dev kit + JP 512 non-modified kernel downloaded from Here, including rootfs, and BSP.
However, the issue remains.

As for flash nvme directly, we are working on it.

Many thanks.

Did you try to flash with the directly downloaded BSP from the website without any modification?

Hi lhoang, DaveYYY:
Thank you for your support. As the readme file in initrd said, ethernet protocal is far more stable then USB protocal. We now can use the Ethernet to flash.

Here is the steps to finish the initrd flash:

  1. Get AGX orin IP, then reboot to recovery mode:
    Flash a bootable image to AGX Orin. Boot then use tools like ifconfig to get AGX Orin ip, netmask.

  2. Get Host IP:
    ifconfig should do the work.

  3. Connect the AGX orin and host like normal flashing, then use the command to flash:
    $ cd Linux_for_Tegra
    $ 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_t234_qspi.xml” --showlogs --network eth0:<ORIN_IP> / < NETMASK > :<HOST_IP> jetson-agx-orin-devkit internal

This command will use “flash_l4t_external.xml” as the partition table to flash the NVMe. Modify this one if necessary.
It is noted that the connection of SSH become ready takes more time then expected. You might need to change the “maxcount” variable in l4t_network_flash.func script.


Here are my assumptions, please correct me if anything wrong:
Initrd flashing is to make AGX Orin boot via initrd.img, then flash the external (or maybe internal also?) storages.
Since the flashing tools are still on the host machine, it is required to somehow ship them onto AGX Orin. In this case, it’s through internet.
To create the internet connection between AGX Orin and your host, at least two ways are supported: eth and USB. Eth way is pretty stright, USB way is more complicated.

The script will send initrd.img onto AGX Orin → boot orin using inird.img → flash
But, how can host know Orin boot up successfully? Orin will try to modify type C functions, so host can see a USB device show up in /dev/ folder. So, if you changed the type C functions in somewhere, errors like tegra-xudc 3550000.xudc: failed to get usbphy-0: -517 will happen. And since the USB is not configured successfully → Host can’t find the USB device → Host think AGX Orin didn’t boot up, report timeout. Just like the flash log reports.

I tried to skip the USB checking section and make the script directly ssh to AGX Orin after the orin the boot up (check by human, to see if bash 5.0# available). Now, the script can ssh onto AGX Orin, but errors like “rtnetlink answers: file exists” or “RTNETLINK answers: Operation not possible due to RF-kill” pops out. We don’t even know where to start to fix them.
So, using USB as connection to ship flashing tools failed. Even a single connection can’t be established.

For some reasons, using AGX Orin USB type C port as Eth connection is very unstable compare to Orin nano, NX, etc. If you are using dev kit, please consider using eth to do the initrd flash. Don’t use the type C.

I don’t go through the whole discussion here.

If you are using a custom board, and does not have type C on your board, it means default device tree does not work on your board.

Initrd flash needs usb device mode to launch the connection between host and Jetson.

You could file a new topic to check your usb issue.

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