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:
Short the GND and FC REC pins to force it into Recovery Mode
Plug in Jetson using USB C port and provide power with barrel connector
Attach Jetson device (with auto-attach) to WSL2 using
usbipd wsl attach -a --busid 1-1 --distribution Ubuntu-20.04
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.
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.
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.