Skip to content

Jetson Nano 1: Flashing JP 4.6.1, installation and prepare a setup

Loading

Jetson Nano: From Flashing to Running computer vision projects

1. Flash the SD card

There are multiple ways to flash the SD card. I personally recommend the first way using etcher application.

  1. Downloading the official Nvidia Jepack Os File and flash it in the SD card using the etcher application or flash the SD card directly over the jetson in headless mode.
  2. Use the Jetson SDK Manager https://docs.nvidia.com/sdk-manager/install-with-sdkm-jetson/index.html

    Required items

    • A PC or Laptop with Ubuntu/Windows/Mac.
    • A SD card preferabbly 32 GB or more.
    • SD card reader if you don't have a card reader in your PC or Laptop

      Steps

    • First download the jetpack os file from the official Nvidia website. (Caution : Choose the correct OS version. There are two versions for Jetson Nano developer. One with 4 GB and another one 2GB ). In this tutorial I have used 4GB version.
    • Download the etcher for flashing the os in SD card.
    • Unzip the Etcher file and use the application to flash the OS into SD card.

2. Remove unnecessary stuff from Jetson

Caution : This step is essential for only who use 16 GB SD card for flashing. As the OS occupies upto 14 GB of memory.
The Jetpack official version of contains alot of unwanted stuff which occupies quite some amount of memory.
The below script is modified version taken from here in gist.

./1_clean_jetson.sh

3. Install basics script

The basics script install the nano, curl, python3-dev, python-pip3, python setuptools, jetson stats for the CPU and GPU usage monitoring.

./2_basics_install.sh

4. Increase SWAP size

Increasing the SWAP is required when your projects have consumes alot of RAM memory, in addition it is will be helpful in installation of opencv from source.
This script is taken from here
Install a swap file on the NVIDIA Jetson Nano Developer Kit. This should help with memory pressure issues.

Setup Swap File

To install swap memory run this command in the terminal.

./installSwapFile.sh

The details of the swap script is described below.

installSwapFile.sh - Create a swap file ; Use on external media like USB drive or SSD

usage: installSwapFile.sh [[[-d directory ] [-s size] -a] | [-h]]

-d | --dir [directoryname] Directory to place swapfile (defaults to /mnt)

-s | --size [gigabytes] (defaults to 8 )

-a | --auto Enable swap on boot in /etc/fstab (default: "Y")

-h | --help This message

Defaults to creating a 6GB Swapfile in the current directory

Note: If you enable swap on boot, you should also automount the drive that you're using

Automount

Automount a device given the label

autoMount.sh - Automount a device, useful for external media like USB drives

5. Remotely connect the Jetson using VNC

Steps to connect the jetson nano using VNC
I have a Desktop PC and a Jetson Nano running in the same network. Here the Jetson and my Desktop PC is connected to same network

Steps

Jetson Desktop sharing needs a bit of a tweak.

  1. First open the terminal and paste the below command
    sudo nano /usr/share/glib-2.0/schemas/org.gnome.Vino.gschema.xml
  2. Copy and paste the below code in the structure of keys in the xml file. After pasting hit Ctrl + O to write and Ctrl + X for exit
    <key name='enabled' type='b'>
    <summary>Enable remote access to the desktop</summary>
    <description>
    If true, allows remote access to the desktop via the RFB
    protocol. Users on remote machines may then connect to the
    desktop using a VNC viewer.
    </description>
    <default>true</default>
    </key>
  3. Now compile the schemas for using the Gnome using the below command
sudo glib-compile-schemas /usr/share/glib-2.0/schemas
  1. Now go to jetson applications , looks for desktop sharing. click and launch
    screen_shot

    • Now check mark both the "Allow other users to view your desktop" and "Allow other users to control your desktop"
    • Then give a password in the place, "Require the user to enter this password" (Remember this password to connect from host PC)
  2. Open ‘startup applications’ using the search box that appears at the top of the screen. Now, click Add at the right of the box, then type ‘Vino’ in the name box, and then in the command box enter /usr/lib/vino/vino-server.
    Click Save at the bottom right of the box, and then close the app.

  3. The final step is to turn off the encryption and prompt. Copy and paste the below command in the jetson terminal.

gsettings set org.gnome.Vino require-encryption false
gsettings set org.gnome.Vino prompt-enabled false

7 . Now reboot the jetson