# Software Setup

## Jetpack 4.3 Installation

Download the [Nvidia SDK Manager](https://developer.nvidia.com/nvidia-sdk-manager)

Download the [J120 Firmware 3](https://auvidea.eu/firmware/) for the J120 / TX2

or

Download the [Obritty Firmware](http://connecttech.com/product/orbitty-carrier-for-nvidia-jetson-tx2-tx1/)&#x20;

Start the SDK Manager

```bash
sdkmanager
```

Select Jetpack 4.3 and make sure you have the host machine unchecked.&#x20;

![In this case it will be Jetpack 4.3](https://lh6.googleusercontent.com/ib7yndWI0S9YGbAZ3hpptNI6jocUCtLJEpsWTcCMLq4TGSA-Nt3C-UdMZec-AA0EoxBst0EN9dm3EPWo6zXTJeGAFhuL6Funy3GIY-KUdgRRt7rbNaMj8EtMq2ytWBMoamG1XJhzfBo)

First we need to populate the \~/nvidia/nvidia\_sdk folder.&#x20;

You need to **only check the Jetson OS** **components** for download and installation.

* Note you **cannot** choose the "Download now. Install later" option because we need the \~/nvidia/nvidia\_sdk files to be populated so we can migrate our firmware into these files for the J120.&#x20;
* We will install the SDK components later on.&#x20;
* Once the OS image is downloaded and the /nvidia/nvidia\_sdk folder is populated we can skip the flash and then navigate to the carrier board firmware directory.

Check the README file in the firmware folder, and verfiy that the correct paths and files are copied over into the /nvidia/nvidia\_sdk folder.&#x20;

For example the J120 would be something like this

```bash
cp -r ~/Downloads/J120_4.2/J120_kernel/* /home/<user>/nvidia/nvidia_sdk/JetPack_4.2_Linux_JETSON_TX2/Linux_for_Tegra/
cd /home/<user>/nvidia/nvidia_sdk/JetPack_4.2_Linux_JETSON_TX2/Linux_for_Tegra/
sudo ./apply_binaries.sh
```

after running the ./apply\_binaries.sh you should not get any errors, and then you are good to move to the next step.

Re-Flashing with the J120 firmware patch installed

* Now you need to turn off the TX2 on the J120 and boot back into recovery mode.
* connect a micro-usb cable to the J120 and to your computer (preferably the one that came with the TX2 that has the little green controller symbol on it).
* connect power to the J120 and the green LED should not come on indicating the OS has not booted.&#x20;
* then, you need to boot into recovery mode.&#x20;

  &#x20;\--> hold the REC (Recovery) button and then press the power button (still holding REC)

  &#x20;\--> press the reset button once while STILL holding the REC button and then wait 2 seconds until releasing the REC button.
* Now to verify the device is connected to the HOST PC you can run 'lsusb' and if NvidiaCorp shows up as a listed USB device you are set.&#x20;
* Another way to verify the TX2 has booted in recovery mode is to hook up the HDMI to a display, nothing should appear on the display if properly booted into recovery mode
* Then follow the sdkmanager steps as we did before. ONLY install the Jetson OS components for download and installation. NOT the sdk components.&#x20;
* It should indicate that the OS image is ready with a green check mark because we already populated and flashed before, but now we modified that image and it will re-flash.

OS Boot up and Set-up

* Once the sdkmanager has completed the flash you should see the TX2 boot up if you are connected to an HDMI.&#x20;
* verify that the J120 patch worked by checking to see if both the top and bottom USB ports are working.&#x20;
* note that only the upper USB port is USB3, the bottom is USB2.&#x20;
* also **note that the micro-usb port does not work** so you wont see it appear using lsusb anymore, only in forced recovery mode will it appear using lsusb. You cant use this port in normal operation.&#x20;
* while we are here we can configure our username/password then once those basics are finished on the setup wizard you can move to the next step.

Installing the SDK components from sdkmanager

* Now this next step was traditionally done using an ethernet connection but now they have updated it to where the usb to micro-usb connection acts as usb-ethernet.&#x20;
* If you remember, **our carrier board disabled the micro-usb port** and in order to install the SDK components we **cannot** be in forced recovery mode. That mode is only used for flashing!!
* So here is where it gets silly
* Power down the TX2 and remove it from the J120 carrier board.&#x20;
* Get out the old development board and install the TX2 onto there and make sure you bring your antenna's with you because we need to connect to the internet.&#x20;
* Once you have everything moved over, boot up and login
* open a terminal and run

```bash
sudo apt-get install update && sudo apt-get install upgrade
```

* Now connect the micro-usb to your HOST PC and run the sdkmanager.&#x20;
* run ifconfig on the TX2 and your host machine to ensure the IP's are 192.168.55.1 and 192.168.55.100 respectively.&#x20;
* run lsusb and see if the NvidiaCorp device shows up, **it should**.&#x20;
* **ONLY check the sdk components for download and installation**.&#x20;
* after the download is complete a window will appear asking for your username and password with a defualt IP address that correlates to the serial connection you have over usb w/ the TX2.&#x20;
* continue the installation and hopefully since we already updated the packages earlier we wont have any failed packages. (Maintain internet connection during install just to be safe)

Complete

* run nvcc --version and see if CUDA is there!
* you can verify any other packages a swell, but that's all. Easy! ;D

### Install Jetsonstats

Jetsonstats is a great package that allows you to check all of the critical information and health on the TX2 quickly.&#x20;

```bash
sudo apt install python-pip

sudo -H pip install -U jetson-stats

#Reboot/Logout & Login

sudo jtop
```

here you can change the power mode to MAX N and start the jetson\_clocks service

Alternatively you can run

```bash
sudo nvpmodel -m 0
jetson_clocks
```

## Installing GAAS Dependencies

{% hint style="warning" %}
The TX2 only has 32 GB of memory, it is recommended that a SD card >128GB is installed and the GAAS repo and dependency files are stored on the SD card. All other software (ROS, ZED SDK, ect) can be stored on the 32Gb partition.&#x20;
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://clemson-autonomous-systems.gitbook.io/clemson-university-autonomous-systems/development-projects/untitled/software-setup.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
