SDKManager 2.0.0 File System and OS Install Error on WSL2 Ubuntu 22.04

My plan is to run a command line QSPI bootloader update from WSL2 ubuntu 22.04 for my Nvidia Jetson Orin Nano Dev Kit so that I can run Jetpack 6.0 DP. I already have Jetpack 6.0 DP on an SD Card via the SD Card Image method.

In order to run the QSPI bootloader update, I still had to install sdkmanager 2.0.0, which worked fine. Then I ran steps 01 thru 04 to get the flash tools, but ran into an installation problem. See image below:

.
SDKmanager summary of errors is as follows:

03:16:46 ERROR: File System and OS - target_image: W: https://download.sublimetext.com/apt/stable/InRelease: Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details.
03:17:02 ERROR: File System and OS - target_image: [exec_command]: /bin/bash -c /tmp/tmp_NV_L4T_FILE_SYSTEM_AND_OS_COMP.if743a.sh; [error]: W: https://download.sublimetext.com/apt/stable/InRelease: Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details.
03:17:02 ERROR: File System and OS - target_image: command terminated with error
03:17:02 SUMMARY: File System and OS - target_image: First Error: Installation failed.
03:46:14 ERROR: File System and OS - target_image: W: https://download.sublimetext.com/apt/stable/InRelease: Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details.
03:46:15 ERROR: File System and OS - target_image: [exec_command]: /bin/bash -c /tmp/tmp_NV_L4T_FILE_SYSTEM_AND_OS_COMP.if743a.sh; [error]: W: https://download.sublimetext.com/apt/stable/InRelease: Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details.
03:46:15 ERROR: File System and OS - target_image: command terminated with error
03:46:15 SUMMARY: File System and OS - target_image: First Error: Installation failed.
04:29:22 ERROR: File System and OS - target_image: W: https://download.sublimetext.com/apt/stable/InRelease: Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details.
04:29:23 ERROR: File System and OS - target_image: command terminated with error

Given that all I want to do is flash the updated QSPI bootloader on my Orin Nano Dev Kit from the command line, and the ā€œDrivers for Jetsonā€ installed properly based on the sdkmanager image above, am I okay to proceed with the command line flash? I verified that the flash tools are in place in the ā€œLinux_for_Tegraā€ directory.

Read this:

1 Like

@fchkjwlsq, I read your link several times. Basically it says the deprecation issue is a warning. But the sdkmanager is interpreting this issue as an ERROR. Seems like a problem with the sdkmanager then. Ultimately I don’t need the sdkmanager, I just need the flash tools to execute the command line flash. The image above does show the ā€œDrivers for Jetsonā€ installed correctly. I did verify the Linux_for_Tegra folder is installed (5.9gb, 129,047 files) and includes flash.sh, the *.conf files, etc.

You can just run this:

sudo ./flash.sh --no-systemimg -c bootloader/generic/cfg/flash_t234_qspi.xml jetson-orin-nano-devkit mmcblk0p1

@DaveYYY, can you verify if it’s possible to only flash the QSPI bootloader without the SD card installed? I already have Jetpack 6.0 installed on a fast SD card using the Image method (very fast, very robust).

YES, it should be feasible.

@DaveYYY, regarding your flash command line, I corrected the last argument from mmcblk0p1 (for eMMC) to mmcblk1p1 (for SD card), which is what I’m after. @linuxdev caught this. I want the Orin Nano Dev Kit to boot from the SD card.

Since I only want to flash the QSPI bootloader, I did not plug-in the SD card. I ran the lsusb command and verified the Orin Nano Dev Kit was attached.

:$ lsusb
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 002: ID 0955:7523 NVIDIA Corp. APX
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Then I ran the following flash command in WSL2 Ubuntu 22.04:

sudo ./flash.sh --no-systemimg -c bootloader/generic/cfg/flash_t234_qspi.xml jetson-orin-nano-devkit mmcblk1p1 2>&1 | tee log_flash.txt

The arguments after mmcblk1p1 capture the output of the flash command. @DaveYYY, I cannot tell if the QSPI bootloader was flashed correctly, can you? The complete flash output is here:

log_flash.txt (16.3 KB)

The last few lines of the flash output are as follows:

bootloader(/mnt/d/projects/nvidia/nvidia_sdk/JetPack_6.0_DP_Linux_DP_JETSON_ORIN_NANO_TARGETS/Linux_for_Tegra/bootloader/mb2_t234.bin) reused.
bl is uefi
Making Boot image… done.
Not signing of boot.img
Making recovery ramdisk for recovery image…
Re-generating recovery ramdisk for recovery image…
cp: cannot stat ā€˜ā€™: No such file or directory
failed command: cp -f .cpio.gz

Is Linux_for_Tegra/rootfs/boot/initrd present?
Did you run sudo ./apply_binaries.sh?

@DaveYYY, the file initrd is NOT present in Linux_for_Tegra/rootfs/boot, but is present in Linux_for_Tegra/bootloader, however the file size is 0. I did not run sudo ./apply_binaries.sh. The whole Linux_for_Tegra file structure was downloaded from sdkmanager2.0.0.

When I try to do sudo ./apply_binaries.sh, I get this error:

Using rootfs directory of: /mnt/d/projects/nvidia/nvidia_sdk/JetPack_6.0_DP_Linux_DP_JETSON_ORIN_NANO_TARGETS/Linux_for_Tegra/rootfs
||||||||||||||||||||||| ERROR |||||||||||||||||||||||


  1. The root filesystem, provided with this package,
    has to be extracted to this directory:
    /mnt/d/projects/nvidia/nvidia_sdk/JetPack_6.0_DP_Linux_DP_JETSON_ORIN_NANO_TARGETS/Linux_for_Tegra/rootfs

  1. The root filesystem, provided with this package,
    has to be extracted with ā€˜sudo’ to this directory:
    /mnt/d/projects/nvidia/nvidia_sdk/JetPack_6.0_DP_Linux_DP_JETSON_ORIN_NANO_TARGETS/Linux_for_Tegra/rootfs

Consult the Development Guide for instructions on
extracting and flashing your device.
|||||||||||||||||||||||||||||||||||||||||||||||||||||

It appears sdkmanager2.0.0 does not download all the tools needed to run a command line flash.

Please don’t put the SDK in a Windows partition, as you don’t have root permissions there. (It’s not even ext4.)
Select the download path inside the WSL2 container and try again.

The download path is set inside the WSL2 container. Did you mean the Target HW image folder? The target path in sdkmanger2.0.0 is greyed out. See image below. How do I undo that?

I originally had it set to a folder in a drive separate from the windows C: drive called the d: drive (linux path: /mnt/d/projects/nvidia). Why did the sdkmanager write a huge amount of files including flash.sh, but not the initrd file? Also, do I really need to run apply_binaries.sh if the sdkmanager was used?

All I need to do is flash the QSPI bootloader for my Nvidia Orin Nano Dev kit from the command line, that’s it. I already have Jetpack 6.0 DP imaged to an SD card (quick, simple, robust). Is there another method of obtaining the flash tools that does not involve the sdkmanger? Is there a package out there that has the necessary flash scripts ready to go?

You don’t necessarily need SDK Manager here.
Download the BSP at:
https://developer.nvidia.com/downloads/embedded/l4t/r36_release_v2.0/release/jetson_linux_r36.2.0_aarch64.tbz2
https://developer.nvidia.com/downloads/embedded/l4t/r36_release_v2.0/release/tegra_linux_sample-root-filesystem_r36.2.0_aarch64.tbz2

Then follow the guide to set it up:
https://docs.nvidia.com/jetson/archives/r36.2/DeveloperGuide/IN/QuickStart.html

@DaveYYY, making progress now. I downloaded the two *.tbz2 tar files, and followed the instructions in the r36.2 dev guide:

cd /home/if743a/nvidia/nvidia_sdk/manual
tar xf ${L4T_RELEASE_PACKAGE}
sudo tar xpf ${SAMPLE_FS_PACKAGE} -C Linux_for_Tegra/rootfs/
cd Linux_for_Tegra/
sudo ./apply_binaries.sh
sudo ./tools/l4t_flash_prerequisites.sh

After the apply_binaries.sh step, the output ended with ā€œSuccessā€:

…
Removing QEMU binary from rootfs
Removing stashed Debian packages from rootfs
L4T BSP package installation completed!
Disabling NetworkManager-wait-online.service
Disable the ondemand service by changing the runlevels to ā€˜K’
Success!

The ./tools/l4t_flash_prerequisites.sh step echoed back many ā€œalready the newest versionā€ messages, and ended with the following. I think its ready. The necessary *.sh files are in-place.

…
nfs-kernel-server is already the newest version (1:2.6.1-1ubuntu1.2).
openssl is already the newest version (3.0.2-0ubuntu1.12).
udev is already the newest version (249.11-0ubuntu3.11).
qemu-user-static is already the newest version (1:6.2+dfsg-2ubuntu6.15).
0 upgraded, 0 newly installed, 0 to remove and 7 not upgraded.
Reading package lists… Done
Building dependency tree… Done
Reading state information… Done
python2 is already the newest version (2.7.18-3).
0 upgraded, 0 newly installed, 0 to remove and 7 not upgraded.
Reading package lists… Done
Building dependency tree… Done
Reading state information… Done
lz4 is already the newest version (1.9.3-2build2).
0 upgraded, 0 newly installed, 0 to remove and 7 not upgraded.

.
Now I’m ready to flash the Orin Nano Dev Kit without the SD card installed. I already have an SD card on standby with Jetpack 6.0 DP through the SD Card Image method.

The documentation for flashing the ā€œJetson Orin Nano Developer Kit (SD card)ā€ via the command line is:

sudo ./tools/kernel_flash/l4t_initrd_flash.sh --external-device mmcblk0p1
-c tools/kernel_flash/flash_l4t_external.xml -p ā€œ-c bootloader/generic/cfg/flash_t234_qspi.xmlā€
–showlogs --network usb0 jetson-orin-nano-devkit internal

Question #1 for @DaveYYY - should the external-device argument be mmcblk0p1 or mmcblk1p1? This is confusing because the flash.sh script has the following comment inside:

ā€œ# ./flash.sh <target_board> mmcblk1p1 - boot <target_board> from SDCARDā€

Question #2, any other arguments needed for my case where the SD card is not installed?

Hi,

I will add some more details about how these flashing stuff works.

You don’t need to care about the command on the document. They are used to flash the whole device (QSPI + SD/NVMe/USB), and since you are only flashing the QSPI, please just use the command I gave you. Moreover, whether it is

sudo ./flash.sh --no-systemimg -c bootloader/generic/cfg/flash_t234_qspi.xml jetson-orin-nano-devkit mmcblk0p1

or

sudo ./flash.sh --no-systemimg -c bootloader/generic/cfg/flash_t234_qspi.xml jetson-orin-nano-devkit mmcblk1p1

(Actually mmcblk1p1 is invalid as the SD card is being recognized as mmc0 on 36.2, while it’s mmc1 on 35.4.1.)

or even

sudo ./flash.sh --no-systemimg -c bootloader/generic/cfg/flash_t234_qspi.xml jetson-orin-nano-devkit nvme0n1p1

Makes no difference. They only matters when you are building a whole system image, and this parameter controls what device is going to be mounted as the rootfs, and is stored in /boot/extlinux/extlinux.conf. For the case of SD card image, this parameter is fixed in the image, and you won’t be able to change it by flashing the QSPI bootloader.

For your second question, the answer is NO. I believe that the case is the same whether SD card is inserted or not.

Good news! But first, some information to help others. @DaveYYY, prior to your last response, I went with the flashing command per the documentation you directed me to. It did not work. Aside from being the wrong command, another problem was that the usb connection kept detaching & attaching during the flash process, and in the end, I received this error:

…
Waiting for target to boot-up…
Unknown device ā€œ/sys/class/net/bonding_mastersā€: No such device
Unknown device ā€œ/sys/class/net/bonding_mastersā€: No such device
Waiting for target to boot-up…
Timeout
Cleaning up…

.
.
To help others, let me summarize the goal and solution:

GOALS

  • Update/flash QSPI bootloader for new Nvidia Orin Nano Dev Kit to enable use of latest Jetpack 6.0 DP using a simple command line approach.
  • Avoid sdkmanager altogether (too many issues with Win10 WSL2).
  • Avoid purchasing separate dedicated Ubuntu machine
  • Separately, install Jetpack 6.0 on SD Card with SD Card Image method on Windows 10 (simple, fast, robust).
  • Use Windows 10 WSL2 with Ubuntu 22.04 without changing WSL2 kernels.
  • Only flash QSPI bootloader on Orin Nano Dev Kit WITHOUT the SD card installed.

APPROACH

  • Install WSL2 with Ubuntu 22.04. The following steps worked for me on a Win10.

  • Download and move the following files somewhere inside your WSL2 container
    https://developer.nvidia.com/downloads/embedded/l4t/r36_release_v2.0/release/jetson_linux_r36.2.0_aarch64.tbz2
    https://developer.nvidia.com/downloads/embedded/l4t/r36_release_v2.0/release/tegra_linux_sample-root-filesystem_r36.2.0_aarch64.tbz2

  • Download Nvidia flashing software from r36.2 developer guide

    • tar xf ${L4T_RELEASE_PACKAGE}
      sudo tar xpf ${SAMPLE_FS_PACKAGE} -C Linux_for_Tegra/rootfs/
      cd Linux_for_Tegra/
      sudo ./apply_binaries.sh
      sudo ./tools/l4t_flash_prerequisites.sh

  • Install additional USB related tools from Nvidia WSL Doc

    • Caution: for Win10 WSL with Ubuntu 22.04 the steps outlined in the documentation were not sufficient.
    • Specifically, it would not install the usbip tool
    • Without usbip, communication with the Orin Nano is impossible and flashing will not work.
  • Install ā€˜usbip’ tools from usbipd-win github page

    • Simplest installation of usbipd-win tools is to download the *.msi installer, double-click that file, and let it install it for you.
    • Check for the latest version. At the time of this writing, 4.0.0 was the latest
  • Put Orin Nano Dev Kit into Force Recovery Mode

  • Run Win10 PowerShell with Admin privileges.

    • in powershell, run usbipd list to list connected devices. This is my output:

    • PS C:\WINDOWS\system32> usbipd list
      Connected:
      BUSID VID:PID DEVICE STATE
      1-4 27b1:0001 USB Serial Device (COM4) Not shared
      1-9 0955:7523 APX Attached
      1-11 046d:c548 Logitech USB Input Device, USB Input Device Not shared
      1-12 046d:c52b Logitech USB Input Device, USB Input Device Not shared
      1-13 0b05:19af AURA LED Controller, USB Input Device Not shared
      1-14 8087:0026 Intel(R) Wireless Bluetooth(R) Not shared
      1-23 04e8:4001 USB Attached SCSI (UAS) Mass Storage Device Not shared

    • Orin Nano Dev Kit is the second entry (busid 1-9)

    • while still in powershell, run:

    • usbipd attach --busid 1-9 --auto-attach --wsl
      usbipd: info: Using WSL distribution ā€˜Ubuntu-22.04’ to attach; the device will be available in all WSL 2 distributions.
      usbipd: info: Using IP address 172.20.48.1 to reach the host.
      usbipd: info: Starting endless attach loop; press Ctrl+C to quit.

  • While Powershell runs in the background, open a WSL Ubuntu terminal window. DO NOT CLOSE POWERSHELL window.

  • In Ubuntu terminal, verify Orin Nano Dev Kit is attached with lsusb command

  • READY TO FLASH QSPI BOOTLOADER WITHOUT SD CARD INSTALLED

    • In Ubuntu terminal, change to Linux_for_Tegra directory

    • Flash command:

    • sudo ./flash.sh --no-systemimg -c bootloader/generic/cfg/flash_t234_qspi.xml jetson-orin-nano-devkit mmcblk0p1

    • On my system, process takes about 6 minutes

    • Orin Nano Dev Kit fan should start running prior to end of flash - this is a very good sign

    • Last few lines of flash process:

    • [ 453.1240 ] Bootloader version 01.00.0000
      [ 453.1302 ] Writing partition B_MEM_BCT with mem_coldboot_sigheader.bct.encrypt [ 243712 bytes ]
      [ 453.1303 ] […] 100%
      [ 456.1773 ] Flashing completed
      [ 456.1774 ] Coldbooting the device
      [ 456.1777 ] tegrarcm_v2 --chip 0x23 0 --ismb2
      [ 456.1779 ] MB2 version 01.00.0000
      [ 456.1828 ] Coldbooting the device
      [ 456.1830 ] tegrarcm_v2 --chip 0x23 0 --reboot coldboot
      [ 456.1832 ] MB2 version 01.00.0000
      *** The target generic has been flashed successfully. ***
      Reset the board to boot from internal eMMC.

    • Full flash output: log_flash2.txt (84.2 KB)

.
I hope this helps you.

Just a followup, I removed the jumper and got out of force-recovery-mode, inserted the SD Card imaged with Jetpack 6.0 DP (Win10 + Etcher), and fired up the Orin Nano Dev Kit. It booted properly, stepped through the first-time setup process, and I ran the following checks. I’m writing this message from my Orin Nano. Thank you for your help @DaveYYY.

:~$ sudo apt-cache show nvidia-jetpack
Package: nvidia-jetpack
Version: 6.0-b52
Architecture: arm64
Maintainer: NVIDIA Corporation
Installed-Size: 194
Depends: nvidia-jetpack-runtime (= 6.0-b52), nvidia-jetpack-dev (= 6.0-b52)
…

:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 22.04.3 LTS
Release: 22.04
Codename: jammy

6 Likes

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