Flash Jetson OS

From Take-Air Wiki
Revision as of 09:04, 14 October 2021 by Joost.Weijs (talk | contribs) (Created page with "'''NVIDIA SDK Manager can only flash your Jetson when running Ubuntu 18 on the host PC'''. Use a virtual machine if you are running another OS, e.g. virtualbox. XXXDetailed in...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

NVIDIA SDK Manager can only flash your Jetson when running Ubuntu 18 on the host PC. Use a virtual machine if you are running another OS, e.g. virtualbox. XXXDetailed instructions for USB passthroughXXX

  1. Download the NVIDIA SDK Manager (.deb): https://developer.nvidia.com/nvidia-sdk-manager.
    Note: This requires an NVIDIA developer account (free).
  2. Install NVIDIA SDK Manager.
    In terminal, go to the directory where you downloaded the SDK Manager, e.g.:
    $ cd ~/Downloads
    Install the SDK Manager (note that the version number might differ):
    $ sudo apt install ./sdkmanager_1.6.1-8175_amd64.deb
  3. Make sure that the Open.OC2 board is not connected to your PC before proceeding to the next step
  4. Run the SDK Manager.
    Either start from your desktop environment, or from the terminal:
    $ sdkmanager
    You will be required to log in to your NVIDIA developer account.
  5. Verify the settings in SDK Manager and click CONTINUE
  6. Select desired target components, and review and accept NVIDIA's terms and condition.
    Note: Minimum required: Jetson OS Image
  7. When the download and image building have finished, SDK Manager will show a prompt to Flash the Jetson module, choose "SKIP", then choose "FINISH and EXIT" to quite the SDK Manager.
  8. Download the Open.OC kernel image and device tree XXXHEREXXX.
  9. Identify the location of the Jetpack installation files downloaded by the SDK Manager, they can be found here: ~/nvidia/nvidia_sdk.
    Find the directory corresponding to the Jetpack version you just downloaded (e.g. ~/nvidia/nvidia_sdk/JetPack_4.6_Linux_JETSON_NANO_TARGETS) and not this path for the next step.
    Important: Verify that the version of the downloaded files by SDK Manager matches that of the modified kernel and device tree.
  10. In the terminal, go to the directory where the custom kernel and device tree were downloaded, e.g.:
    $ cd ~/Downloads
  11. Unpack the custom kernel and device tree:
    $ tar -xzvf OpenOC2_TA_customKernelDT.tar.gz
  12. Copy the custom kernel and device tree to the Jetpack installation files, take care to use the correct destination directory that you identified in a previous step:
    $ cp Image ~/nvidia/nvidia_sdk/JetPack_4.5.1_Linux_JETSON_NANO_DEVKIT/Linux_for_Tegra/kernel/
    $ cp xxx.dtb ~/nvidia/nvidia_sdk/JetPack_4.6_Linux_JETSON_NANO_TARGETS/Linux_for_Tegra/kernel/dtb
  13. Make sure that your board is powered off.
  14. Connect your Open.OC2 board with the provided USB-cable to your PC.
  15. Power your board in recovery mode. To do this, bridge jumper "Force recovery" (see XXX) and then power on the board.
    After a few seconds, remove the jumper again. For troubleshooting recovery mode, see XXX.
  16. In terminal, enter the Linux-for_Tegra directory
    $ cd ~/nvidia/nvidia_sdk/JetPack_4.5.1_Linux_JETSON_NANO_DEVKIT/Linux_for_Tegra
  17. Start the flashing procedure
    $ sudo ./flash.sh jetson-nano-emmc mmcblk0p1
    When completed, do the initial setup described in the next section "First boot".

First boot

  1. Make sure screen is installed on your pc. If it is not, you can do so in e.g Ubuntu with the following command: sudo apt install screen.
  2. Connect your Open.OC board with the provided USB cable to your PC
  3. Power on the board
  4. On your PC, a new serial device should appear (e.g. /dev/ttyACM0), connect to it: screen /dev/ttyACM0. Not that the name of the serial device might vary depending on other connected devices, Linux distribution, etc.
  5. When successfully connected, you should be guided through nvidia's initial setup wizard. If this does not happen, press SPACE bar and/or ENTER to see if it appears.
  6. Complete the initial setup wizard, where you will be able to set up a user account, keyboard settings, network settings, etc.
  7. When done, the board is ready for use. By default, SSH is enabled so if your board is connected to your LAN you will not need the USB connection to your PC anymore.

Troubleshooting

Force recovery mode

To check whether the board has successfully booted in recovery mode, issue the terminal command lsusb while the board is connected over USB.
This will return a list of detected USB devices, and should contain an entry similar to:

Bus XXX Device XXX: ID 0955:7f21 NVidia Corp.

If the entry exists: The Jetson module has properly booted in recovery mode, and is correctly detected by the host PC.
Else: The host PC could not detect the Jetson module in recovery mode. Make sure that the "force recovery" jumper is bridged during power-on. Check that the USB-cable is connected properly to the Open.OC2 board and your PC.
If this does not work, contact Take-Air for further assistance.

Flashing fails to complete

On the host PC, install xmllint:

sudo apt install libxml2-utils