tegrarcm man page

tegrarcm — tegra firmware download utility


tegrarcm [ options ]


This program is used to send code to a Tegra device in recovery mode. It does not supported locked devices with an encrypted boot key, only open devices such as the ventana or cardhu reference boards. It is not capable of flashing firmware to a device, but can be used to download firmware that is then capable of flashing. For example in ChromeOS tegrarcm is used to download a special build of u-boot to the target Tegra device with a payload that it then flashes to the boot device.

Platforms supported


How to use

Connect a USB cable from your development system to your Tegra device. You will either need a USB A to A cable or A to micro B depending on the target board.
Find the appropriate BCT file for your board. For reference boards, BCT files can be found in the L4T distribution from NVIDIA.
Build some firmware for your device (such as u-boot)
Run tegrarcm to download the firmware


Read the BCT from the target device and write it to bctfile.


--bct bctfile
Specify the BCT file to download to the Tegra device. This file contains memory configuation information for the board. BCT files can be obtained through the NVIDIA L4T distribution or generated with cbootimage and a proper configuration file.
--bootloader blfile
Specify the bootloader file to download to the Tegra device. This is the firmware file that will be downloaded and executed.
--loadaddr loadaddr
Specify the address the bootloader will be loaded at. This should be specified in hex and is typically 0x108000 for a Tegra20 device or 0x80108000 for a Tegra30, Tegra114, or Tegra124 device.
--entryaddr entryaddr
Specify the entry address that control will be passed to after the firmware is loaded. This should be specified in hex. If this option is omitted it is assumed to be the same as the load address.
Print the version number and exit.
Print help text and exit.
--miniloader mlfile
Read the miniloader from the specified file instead of using the built-in one.
--miniloader_entry mlentry
Specify the entry address of the miniloader.
--usb-port-path path
Specify the physical USB port path of the Tegra device to control.

USB Port Path

By default, tegrarcm operates on the first USB applicable device it finds. In a system that contains multiple Tegra devices, the user may wish to specify which device tegrarcm should operate upon. The --usb-port-path option allows this, and in a manner that is most immune to the set of attached USB devices varying.

Note that the USB port path is associated with a physical USB port on a particular hub. This value will vary if you physically re-organize your USB connections. This feature is still useful even if your USB topology changes, providing you have some other mechanism to differentiate attached devices. For example, you could use a wrapper script around tegrarcm that identifies the appropriate device by other means, then automatically calculates the USB port path using the procedures below, and passes the value to tegrarcm.

To determine the USB port path of a device, you must plug it in and find the current USB bus and USB device number of the device, then map that to the USB port path. Simply run lsusb to find the current USB bus and device number. If you have multiple NVIDIA devices attached, you may need to unplug and replug the Tegra device to ensure you know which is which (all while not changing the state of any other USB devices so you don't confuse yourself).

$ lsusb
Bus 003 Device 039: ID 0955:7721 NVidia Corp.
Bus 003 Device 045: ID 0955:7140 NVidia Corp.

Then, to determine the USB port path, do one of:


Execute udevmadm on the USB device, and look for the DEVPATH entry. The
final component in the path is the USB port path:

$ udevadm info /dev/bus/usb/003/045
P: /devices/pci0000:00/0000:00:14.0/usb3/3-10/3-10.4
N: bus/usb/003/045
E: DEVPATH=/devices/pci0000:00/0000:00:14.0/usb3/3-10/3-10.4

Look at all the sub-directories of /sys/bus/usb/devices/* that do not contain either ":" or "usb". Each of these will contain a busnum and devnum file. Find the directory which matches the lsusb output, and use its name:

$ cat /sys/bus/usb/devices/3-10.4/busnum
$ cat /sys/bus/usb/devices/3-10.4/devnum

Alternatively, you may already have udev rules that create a device node symlink for the device (after some specific identification algorithm). In that case, you can search the udev output for MAJOR/MINOR values, or /sys/bus/usb/devices/* directories for "dev" files, that match the device node the symlink points to.

Once the port path is known, this value will not vary unless your USB connections are physically changed, so you can use it over and over without repeating the steps above.


To download u-boot firmware to a Tegra20 seaboard:

$ sudo tegrarcm --bct seaboard.bct --bootloader u-boot.bin --loadaddr 0x108000
bct file: seaboard.bct
booloader file: u-boot.bin
load addr 0x108000
entry addr 0x108000
device id: 0x7820
uid:  0x33c20c0413fb217
RCM version: 2.1
downloading miniloader to target...
miniloader downloaded successfully
Chip UID:                0x33c20c0413fb217
Chip ID:                 0x20
Chip ID Major Version:   0x1
Chip ID Minor Version:   0x4
Chip SKU:                0x18 (t25)
Boot ROM Version:        0x1
Boot Device:             0x3 (SPI)
Operating Mode:          0x3 (developer mode)
Device Config Strap:     0x0
Device Config Fuse:      0x0
SDRAM Config Strap:      0x0
sending file: seaboard.bct
- 4080/4080 bytes sent
seaboard.bct sent successfully
sending file: u-boot.bin
- 268314/268314 bytes sent
u-boot.bin sent successfully

To read the BCT from a system:

$ sudo tegrarcm --bct ventana.bct readbct
bct file: ventana.bct
device id: 0x7820
reading BCT from system, writing to ventana.bct...done!

Return Value

If any error occurs a non zero exit status is returned.

See Also



Allen Martin, <amartin@nvidia.com>

Referenced By

bct_dump(1), cbootimage(1).

Explore man page connections for tegrarcm(1).

tegrarcm 1.7 29 November 2012