Installing Jetpack 4.2 on a jetson tx2 using a vm (Windows)

Date written: 7/2019, date posted: 9/2019.

Versions

•       Windows 10, x64

•       VMWare Workstation

•       Ubuntu 16.04 LTS

•       JetPack 4.2

•       Cuda 10.0

Notes before getting started

•       The VM should have more than 50GB storage, recommended 75-100GB

•       This process uninstalls ROS- will need to reinstall after

•       Would recommend backing up current VM or using a new one and be prepared to scrap it after

Supplies needed

•       HDMI cable + monitor for TX2

•       MicroUSB-USB cable (included with TX2)

•       Keyboard

•       USB hub for mouse and keyboard

•       Mouse

•       Power adapter (included with TX2)

•       Host computer with VMWare installed and 16.04 LTS Ubuntu on the VM

Instructions

Create an NVIDIA developer account and download the NVIDIA SDK Manager on the VM.

Boot up and configure the TX2 for the first time. This will install Ubuntu 18.04 on the TX2.

  • Follow instructions on the set up screen:

  • cd “${HOME}/NVIDIA-INSTALLER”
  • sudo ./installer.sh
  • Username: nvidia ; password: nvidia

  • Reboot the system

On VMWare, make sure that these are the settings:

  • VM → Settings → Network Adapter → Bridged: Connected directly to the physical network, check the box for Replicate physical network state

  • VM → Settings → USB Controller → Present, USB 3.0

If you’re on a workplace proxy, find the hardware/MAC address of the TX2 and register it with your workplace’s device manager.

  • On the TX2: Settings → Network → Wired

Boot the TX2 into force recovery mode and connect the TX2 to the computer via MicroUSB/USB. A window will pop up: New USB Device Detected, Choose where you would like to connect Nvidia APX. Select “Connect to a Virtual Machine” and click on the name of the VM that you’re using to install Jetpack.

Verify the connection from the TX2 to the VM by typing

lsusb

in Terminal on the VM. “Nvidia Corp.” should show up as one of the devices.

In Terminal on the VM:

sudo apt install bzip2=1.0.6-8 libbz2-1.0=1.0.6-8

to get the compatible version of the zip/unzipping package for Jetpack. This will uninstall ROS.

Then type:

sudo apt-add-repository -r bionic/main

This will allow the NVIDIA SDK Manager to get access to the arm64 bionic repositories for Jetpack.

In the NVIDIA SDK Manager:

  • Target hardware: TX2, Jetpack 4.2, etc.

  • Accept the license and check both Jetpack 4.2 OS & Jetpack 4.2 SDK Components.

  • Accept and install.

First, it will flash the Jetpack OS. The TX2 should still be connected to a monitor via HDMI, even though there is nothing on the screen. When it finishes flashing the OS, the screen will become active and you can configure the system (set up the username, password, etc.). The SDK Manager on the VM will have directions on there as well. After you finish setting up the username and password and such on the TX2, it will rebood. Then, you can enter your username and password for the TX2 into the window on the SDK Manager to continue on to the SDK Components installation. If you are not on a workplace proxy, you should be done after this.

If you are on a workplace proxy, follow your workplace’s instructions for setting up a proxy network on the TX2 BEFORE you move on to the SDK Components Installation. A network connection is required for the successful installation of the SDK Components. You can check this if you’re successfully connected by typing the following commands in Terminal:

sudo apt-get update 
sudo apt-get upgrade

to get the latest updates for the TX2 and check your connection to ports.ubuntu.com. The update might take a while. Then reboot the TX2 into Hardware Recovery Mode, but after flashing Jetpack OS, going into recovery mode via the hardware buttons won’t work anymore. Just turn on the TX2 normally while it’s connected to the VM via USB and it’ll automatically go into USB mode.

On the VM, open SDK Manager and go through the installation process but uncheck Jetpack OS and only install SDK Components.

Build CUda on the tx2

This will verify the correct installation of Cuda.

Open up Terminal.

/usr/local/cuda-10.0/bin/cuda-install-samples-10.0.sh ~

This will copy Cuda samples to the home directory.

cd NVIDIA_CUDA_10.0_Samples
make

This will build all the examples. It will take a while, but once completed successfully, you should be good to go.

Troubleshooting

This is just a list of errors that I ran into during the installation process, and what worked for me to solve it. Some helpful tips are also included here.

ERROR: Flash Jetson TX2: Lost connection

Probably not in USB device mode or force recovery mode. When initially connecting to the VM, make sure to immediately connect to the VM instead of first connecting to Windows and then disconnecting it from the host to connect to the VM. (Don’t use VM → Removable Devices → Nvidia APX until after Jetpack OS has been flashed).

Pre Jetpack OS flashing: turn off and turn back on into force recovery mode

Post Jetpack OS: make sure USB device mode is enabled and reboot. The folder L4T-README should open when you connect it and Ubuntu will give you a notification “You are now connected to Wired connection [#].”

INFO: Cuda Toolkit for L4T: Cannot initiate the connection to ports.ubuntu.com:80 (2001:67c:1360:8001::22). - connect (101: Network is unreachable) Could not connect to ports.ubuntu.com:80 (91.189.88.150), connection timed out

 Follow directions for setting up your workplace’s network/proxy!

Check to make sure that the TX2 has internet access. Log in to the TX2 and set up the proxy for your workplace. Make sure date and time is correct. In the VM, Settings → Network → Wired (TX2) → Options →Cloned MAC address set to match the VM’s MAC address. Make sure you followed ALL the steps for the proxy set up.

Make sure that you’re flashing the OS first, setting up proxy, and then going on to the SDK components. When installing the SDK components, make sure to uncheck flashing the OS in the SDK Manager.

Note: Nvidia SDK Manager tends to crash

If you leave it open for a while when you’re not actively installing/downloading things with it. It also tends to crash if you use Firefox while it’s open or running.

Checking connection from VM to TX2

ping 192.165.55.1

All TX2s will have the same IP address.

Unable to login to SDK Manager- “Incorrect username/password”

Checked debug logs for SDK Manager (Menu (three dots)→ Export debug logs): not sure if this was the issue but “crontab read failure with Error: command failed: crontab -l no crontab for [VM admin name]”

Able to login to developer.nvidia.com via browser but not SDK Manager.

Solution: Menu (three dots)→ Settings → Proxy settings → Manual configuration

Enter your workplace’s proxy. No username or password required. More broadly, I think this is due to a lack of internet connection, perhaps from being blocked on a firewall, for the SDK Manager.

INFO: Cuda Toolkit for L4T: dpkg: error: dpkg frontend is locked by another process. Waiting 5 seconds for apt to be available

On the TX2 Terminal:

sudo rm /var/lib/dpkg/lock-frontend 

You can also try the following:

On the VM & TX2:

sudo rm /var/lib/dpkg/lock 

On the VM only:

sudo rm /var/lib/dpkg/lock-frontend

You might need to reboot both after running this command.