Unable to flash Jetson Orin Nano 8gb Dev Kit w/ NVMe using sdkmanager on WSL2

Hey there,

I’ve been having trouble flashing an image to a Jetson Orin Nano Dev Kit’s NVMe drive using the sdkmanager. I’m currently running Ubuntu 20.04 in WSL2, which from what I can tell has successfully been done before (see here and here).

Here are my current steps:

  1. Short the GND and FC REC pins to force it into Recovery Mode
  2. Plug in Jetson using USB C port and provide power with barrel connector
  3. Attach Jetson device (with auto-attach) to WSL2 using
usbipd wsl attach -a --busid 1-1 --distribution Ubuntu-20.04
  1. Launch sdkmanager in WSL2 and attempt to flash Jetson

During this process, the device disconnects and reconnects often with the name NVIDIA USB Device (APX). However, around 30% completion, it disconnects and reconnects as NVIDIA USB Device (Linux for Tegra). I’m not sure if this is intended behavior or not, but it subsequently fails as it gets stuck on Unknown device "/sys/class/net/bonding_masters": No such device.

Any advice on how to proceed here?

EDIT: I’ve attached the logs here as reference
SDKM_logs_JetPack_5.1.2_Linux_for_Jetson_Orin_Nano_modules_2023-10-15_13-46-24.zip (185.3 KB)

Hi,

Please just don’t use virtual machines or WSL for flashing Jetson devices.
Someone managing to get it to work does not necessarily mean it would also work for you.

Isn’t it officially supported though? The documentation even has instructions on how to do so, yet I haven’t had any success with it: Windows Subsystem for Linux (WSL) — sdk-manager 2.0.0 documentation

Then can you setup the connection in WSL2 like what is shown in the link,
and flash using flashing commands instead of SDK Manager?
https://docs.nvidia.com/jetson/archives/r35.4.1/DeveloperGuide/text/IN/QuickStart.html

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-orin-nano-devkit internal

Please also capture the serial console log to know if the device is booting up properly.
This can be done in Windows natively.

Tried flashing using commands, same issue in where it gets stuck on

Unknown device "/sys/class/net/bonding_masters": No such device
Waiting for target to boot-up...

I’ve also attached the serial console log, please let me know if you require anything else.
COM3_2023_10_15.21.38.45.743.txt (94.7 KB)

I’ve had better luck using -d with the USB device id instead of the bus id. The device id should not change (well neither should the bus id but who knows if the USB stuff gets unhappy when BPMP resets for flashing) and it should probably work. Note that it’s very inconsistent and doesn’t work every time. Make sure you’re on latest SDKManager and try swapping USB ports or something…it’s very finicky.

Incidentally, this is from a missing kernel driver:

Unknown device "/sys/class/net/bonding_masters": No such device

You’d have to replace the WSL2 kernel (add a driver to it) if this is required and missing. It’s far easier to use actual Linux (e.g., dual boot; I know that sounds like a pain, but if you either (A) have enough disk space to split off a partition, or (B) add a second disk, then it is very practical).

I’m assuming you’re referring to -i correct? -d I believe is the flag for selecting which distribution to attach to. Either way it didn’t seem to help at all, still resulting in the same error. I’ve tried changing cables, USB ports, but no progress yet.

Hmm interesting, I’m not knowledgeable enough with Linux devices to try and replace the kernel. I could definitely dual-boot since I am already dual-booting Ubuntu 22, however, it’s just a bit of a pain to go through the entire installation process for just one use case. I’d much rather flash through WSL to save time, but it seems like the option isn’t really there at this point.

In the case of any kind of VM it is up to the end user and the VM support (you’d have to call Microsoft help to get WSL/WSL2 support) since the flash software has no ability to alter its VM (this is in fact part of why people use a VM: To isolate the host o/s for security reasons). Otherwise I’ll recommend Ubuntu 20.04. You could use 22.04 if you flash only on command line. The restriction to JetPack 5.x requiring either Ubuntu 18.04 or 20.04 is due to the GUI front end; the command line flash software can use other flavors and releases of L4T.

Unfortunately, Windows has a lot to be desired when developing for Linux.

Interesting to know that Ubuntu 22.04 works with the command line; I wasn’t aware that the only restriction was the GUI. I’ll probably explore the custom WSL2 kernel posted here as it seems to have worked for the OP, but I’m not too optimistic.

1 Like

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