To setup your Windows and windows subsystem for Linux Jetpack with modifications so you can install with 1 or 2 at bottom. I just did most of this to confirm it. I’ve not flashed my Thor from Windows so that would need your testing.
If not already done, to download a new JetPack version on Windows, from a "powershell terminal":
For interactive command line and initial logon to Nvidia devzone:
NvSDKManager.exe --cli --login-type devzone --product Jetson
Or non-interactive:
NvSDKManager.exe --cli --action downloadonly --login-type devzone `
--product Jetson --target-os Linux --version 7.2.1 `
--target JETSON_AGX_THOR_TARGETS --install-method direct_flash `
--license accept
Create a directory on Windows for your JetPack modifications. Replace scott with your Windows user name:
cd C:\Users\scott
md jp721-mods
List the available WSL distributions:
wsl -l -v
Start the sdkmanager WSL environment:
wsl -d Nvidia_SDKM_Ubuntu_22.04_JetPack_7.2.1 -u nvidia
Once inside WSL:
cd ~/nvidia/nvidia_sdk/JetPack_7.2.1_Linux_JETSON_AGX_THOR_TARGETS/Linux_for_Tegra
The Windows directory created above is accessible from WSL at:
ls /mnt/c/Users/scott/jp721-mods
Modify JetPack 7.2.1 Linux_for_Tegra
L4T="$HOME/nvidia/nvidia_sdk/JetPack_7.2.1_Linux_JETSON_AGX_THOR_TARGETS/Linux_for_Tegra"
For example, copy a modified device tree from Windows into the BSP:
cp /mnt/c/Users/scott/jp721-mods/kernel_tegra264-p4071-0000+p3834-0008-nv.dtb \
"$L4T/kernel/dtb/"
Or copy a directory tree containing multiple modifications:
sudo rsync -av --chown=root:root \
/mnt/c/Users/scott/jp721-rootfs/ \
"$L4T/rootfs/"
Or within wsl rsync entire Linux_for_Tegra directory from source Linux computer into wsl.
sudo rsync -av --chown=root:root \
scott@192.1.1.60:~/jp721/Linux_for_Tegra/ \
"$L4T/"
Return to Linux_for_Tegra/:
cd "$L4T"
Copy files directly from another Linux system
While inside the sdkmanager WSL environment, you can also use scp to copy a single file from a linux system
scp scott@192.168.1.123:/path/to/kernel_tegra264-p4071-0000+p3834-0008-nv.dtb \
"$L4T/kernel/dtb/"
Once the sdkmanager wsl Jetpack instance is configured to your needs and any changes have been made to Linux_for_Tegra directory, you can flash the Jetson using either of the following methods:
- From within the SDK Manager WSL environment
cd ~/nvidia/nvidia_sdk/JetPack_7.2.1_Linux_JETSON_AGX_THOR_TARGETS/Linux_for_Tegra
sudo ./l4t_initrd_flash.sh --erase-all --showlogs jetson-agx-thor-devkit internal
#Once that flash is completed and you logon to Thor run
sudo apt update && sudo apt install nvidia-jetpack
2. From Windows using Windows SDK Manager executible:
From a Windows PowerShell terminal:
NvSDKManager.exe --cli --action install --login-type devzone `
--product Jetson --version 7.2.1 --target-os Linux --host `
--target JETSON_AGX_THOR_DEVKIT --flash
A stopped JetPack/SDK Manager WSL2 distribution can be copied from one Windows 11 PC to another. Microsoft documents
wsl --export / wsl --import for copying WSL distributions between machines.
For your case, I would use the VHDX method, because it preserves the WSL2 filesystem as-is and avoids rebuilding a large Linux_for_Tegra tree from a tar archive.
Export
On the source Windows PC, first identify the exact distro name:
wsl -l -v
Stop it if running:
wsl --shutdown
Then export it to usb drive, external ssd or network share. Change to correct drive letter.
mkdir D:\WSL-Backup
wsl --shutdown
wsl --export Nvidia_SDKM_Ubuntu_22.04_JetPack_7.2.1 `
D:\WSL-Backup\JetPack-7.2.1-golden.vhdx `
--format vhd
Then import to other Windows computers with sdkmanager installed, configured logged on to devzone identical to how you did it above:
Create a permanent location for the imported WSL instance
mkdir C:\WSL\JetPack-7.2.1-golden
Copy the golden VHDX to that directory.
copy D:\WSL-Backup\JetPack-7.2.1-golden.vhdx C:\WSL\JetPack-7.2.1-golden\JetPack-7.2.1-golden.vhdx
wsl --import-in-place Nvidia_SDKM_Ubuntu_22.04_JetPack_7.2.1-golden `
C:\WSL\JetPack-7.2.1-golden\JetPack-7.2.1-golden.vhdx