Skip to content

Flashing the Jetson Dev Kit

Matt Madison edited this page Mar 30, 2019 · 32 revisions

This total-beginner's guide will walk you through the process of flashing a newly-generated image your Jetson development kit! This is supported on all three Jetson development kits -- TK1, TX1, and TX2 -- as of the rocko branch.

  • Before we begin, you'll need to generate your image with some extra settings. Add the following lines to the local.conf in your build directory:

      IMAGE_CLASSES += "image_types_tegra"               
      IMAGE_FSTYPES = "tegraflash"
    

This will generate an additional flashing script along with the image that we'll use to program the bootloader, rootfs, and other necessary artifacts to the Jetson's on-board eMMC. While you're generating the image with these new settings, feel free to continue on to the next step (or go get a soda or something).

  • Bitbake should have now made a new zip file called <image-type>-${MACHINE}.tegraflash.zip in the output directory. Extract this to somewhere else that's convenient. The package includes copies of the necessary tools for flashing the device, as well as the image and bootloader files that will be put there.

  • Now, make sure the board is plugged in and powered on before continuing.

  • Plug a micro-USB cable into the board's USB0 port and connect it to your host machine.

  • On your board, while holding the recovery button (REC), press reset (RST) to boot into recovery mode. You'll see the lights briefly flash off and on. You may need to hold the REC button down for at least three seconds after releasing RST to have the device fully switch to recovery mode.

  • Now, simply sudo ./doflash.sh, wait for it to do its thing, and voila! The script will cold-reboot the Jetson, and you've got a hot new image flashed!

    • Note: Depending on your python configuration, you may need to modify the second line of doflash.sh from something like tegraflash.py --bl cboot.bin... to python tegraflash.py --bl cboot.bin...

Flashing without root access

To avoid having to use sudo or be root to program the Jetson flash, add some udev rules to put the USB interface into a group that you belong to. For example:

# Jetson TK1
SUBSYSTEMS=="usb", ATTRS{idVendor}=="0955", ATTRS{idProduct}=="7140", GROUP="plugdev"
# Jetson TX1
SUBSYSTEMS=="usb", ATTRS{idVendor}=="0955", ATTRS{idProduct}=="7721", GROUP="plugdev"
# Jetson TX2
SUBSYSTEMS=="usb", ATTRS{idVendor}=="0955", ATTRS{idProduct}=="7c18", GROUP="plugdev"
# Jetson Xavier
SUBSYSTEMS=="usb", ATTRS{idVendor}=="0955", ATTRS{idProduct}=="7019", GROUP="plugdev"
# Jetson Nano
SUBSYSTEMS=="usb", ATTRS{idVendor}=="0955", ATTRS{idProduct}=="7f21", GROUP="plugdev"

Add these rules to a file under /etc/udev/rules.d on your development host.

Clone this wiki locally