1tegrarcm(1) NVIDIA Tegra Firmware Download Tool tegrarcm(1)
2
3
4
6 tegrarcm - Tegra firmware download utility
7
9 tegrarcm [ options ]
10
12 This program is used to send code to a Tegra device in recovery mode.
13 It supports both unlocked devices, and those locked with a PKC (private
14 key). It is not capable of flashing firmware to a device, but can be
15 used to download firmware that is then capable of flashing. For exam‐
16 ple in ChromeOS tegrarcm is used to download a special build of U-Boot
17 to the target Tegra device with a payload that it then flashes to the
18 boot memory device.
19
20 Devices with PKC enabled may be handled in two different ways:
21
22
23 1. Data may be signed on-the-fly, during communication with the
24 Tegra device, by providing the --pkc options. This method is the
25 simplest, but requires access to the device's PKC during the
26 download process.
27
28
29 2. The signing and download steps may be separated. Signed data may
30 first be prepared offline, without requiring access to a Tegra
31 device, using the --gen-signed-msgs option. The signed data may
32 later be sent to a Tegra device using the --download-signed-msgs
33 option.
34
35 Both of these steps require use of the --signed-msgs-file option
36 to indicate where to write/read the signed messages. This option
37 provides a base filename, to which various extensions will be
38 appended, to form the final filenames for the various signed
39 data/messages.
40
41 This method is more complex, but allows separation of the down‐
42 load and signing processes. For example, a highly secure signing
43 machine could generate the signed messages and pass them to a
44 factory system for download to the Tegra device.
45
46
47 Platforms supported
48 · Tegra20
49
50 · Tegra30
51
52 · Tegra114
53
54 · Tegra124
55
56
57 How to use
58 — Connect a USB cable from your development system to your Tegra
59 device. You will either need a USB A to A cable or A to micro B
60 depending on the target board.
61
62 — Find the appropriate BCT file for your board. For reference
63 boards, BCT files can be found in the L4T distribution from
64 NVIDIA.
65
66 — Build some firmware for your device (such as U-Boot)
67
68 — Run tegrarcm to download the firmware
69
70
72 readbct
73 Read the BCT from the target device and write it to bctfile.
74
75
77 --bct bctfile
78 Specify the BCT file to download to the Tegra device. This file
79 contains memory configuration information for the board. BCT
80 files can be obtained through the NVIDIA L4T distribution or
81 generated with cbootimage and a proper configuration file.
82
83 --bootloader blfile
84 Specify the bootloader file to download to the Tegra device.
85 This is the firmware file that will be downloaded and executed.
86
87 --loadaddr loadaddr
88 Specify the address the bootloader will be loaded at. This
89 should be specified in hex and is typically 0x108000 for a
90 Tegra20 device or 0x80108000 for a Tegra30, Tegra114, or
91 Tegra124 device.
92
93 --entryaddr entryaddr
94 Specify the entry address that control will be passed to after
95 the firmware is loaded. This should be specified in hex. If
96 this option is omitted it is assumed to be the same as the load
97 address.
98
99 --version
100 Print the version number and exit.
101
102 --help Print help text and exit.
103
104 --miniloader mlfile
105 Read the miniloader from the specified file instead of using the
106 built-in one.
107
108 --miniloader_entry mlentry
109 Specify the entry address of the miniloader.
110
111 --usb-port-path path
112 Specify the physical USB port path of the Tegra device to con‐
113 trol.
114
115 --pkc key.der
116 Specify the key file for secured devices. The private key should
117 be in DER format.
118
119 --gen-signed-msgs
120 Generate signed messages for PKC secured devices.
121
122 --signed-msgs-file msg_file_prefix
123 Specify messages file name prefix.
124
125 --download-signed-msgs
126 Download signed messages.
127
128 --soc tegra_soc_#
129 Specify Tegra SoC chip model number, ie, 124.
130
131 --usb-timeout timeout_ms
132 Specify usb transfer timeout value in ms, 0 for unlimited time‐
133 out.
134
135
137 By default, tegrarcm operates on the first USB applicable device it
138 finds. In a system that contains multiple Tegra devices, the user may
139 wish to specify which device tegrarcm should operate upon. The
140 --usb-port-path option allows this, and in a manner that is most immune
141 to the set of attached USB devices varying.
142
143 Note that the USB port path is associated with a physical USB port on a
144 particular hub. This value will vary if you physically re-organize your
145 USB connections. This feature is still useful even if your USB topology
146 changes, providing you have some other mechanism to differentiate
147 attached devices. For example, you could use a wrapper script around
148 tegrarcm that identifies the appropriate device by other means, then
149 automatically calculates the USB port path using the procedures below,
150 and passes the value to tegrarcm.
151
152 To determine the USB port path of a device, you must plug it in and
153 find the current USB bus and USB device number of the device, then map
154 that to the USB port path. Simply run lsusb to find the current USB bus
155 and device number. If you have multiple NVIDIA devices attached, you
156 may need to unplug and replug the Tegra device to ensure you know which
157 is which (all while not changing the state of any other USB devices so
158 you don't confuse yourself).
159
160 $ lsusb
161 [...]
162 Bus 003 Device 039: ID 0955:7721 NVidia Corp.
163 Bus 003 Device 045: ID 0955:7140 NVidia Corp.
164 [...]
165
166 Then, to determine the USB port path, do one of:
167
168
169 1. Execute udevadm on the USB device, and look for the DEVPATH
170 entry. The final component in the path is the USB port path:
171
172 $ udevadm info /dev/bus/usb/003/045
173 P: /devices/pci0000:00/0000:00:14.0/usb3/3-10/3-10.4
174 N: bus/usb/003/045
175 E: BUSNUM=003
176 E: DEVNUM=045
177 E: DEVPATH=/devices/pci0000:00/0000:00:14.0/usb3/3-10/3-10.4
178
179
180 2. Look at all the sub-directories of /sys/bus/usb/devices/* that
181 do not contain either ":" or "usb". Each of these will contain a
182 busnum and devnum file. Find the directory which matches the
183 lsusb output, and use its name:
184
185 $ cat /sys/bus/usb/devices/3-10.4/busnum
186 3
187 $ cat /sys/bus/usb/devices/3-10.4/devnum
188 45
189
190 Alternatively, you may already have udev rules that create a
191 device node symlink for the device (after some specific identi‐
192 fication algorithm). In that case, you can search the udev out‐
193 put for MAJOR/MINOR values, or /sys/bus/usb/devices/* directo‐
194 ries for "dev" files, that match the device node the symlink
195 points to.
196
197 Once the port path is known, this value will not vary unless
198 your USB connections are physically changed, so you can use it
199 over and over without repeating the steps above.
200
201
203 1) To download U-Boot to Seaboard, with no PKC enabled:
204
205 $ sudo tegrarcm --bct seaboard.bct --bootloader u-boot.bin --loadaddr 0x108000
206 bct file: seaboard.bct
207 bootloader file: u-boot.bin
208 load addr 0x108000
209 entry addr 0x108000
210 device id: 0x7820
211 uid: 0x33c20c0413fb217
212 RCM version: 2.1
213 downloading miniloader to target...
214 miniloader downloaded successfully
215 Chip UID: 0x33c20c0413fb217
216 Chip ID: 0x20
217 Chip ID Major Version: 0x1
218 Chip ID Minor Version: 0x4
219 Chip SKU: 0x18 (t25)
220 Boot ROM Version: 0x1
221 Boot Device: 0x3 (SPI)
222 Operating Mode: 0x3 (developer mode)
223 Device Config Strap: 0x0
224 Device Config Fuse: 0x0
225 SDRAM Config Strap: 0x0
226 sending file: seaboard.bct
227 - 4080/4080 bytes sent
228 seaboard.bct sent successfully
229 sending file: u-boot.bin
230 - 268314/268314 bytes sent
231 u-boot.bin sent successfully
232
233 2) To read the BCT from a system:
234
235 $ sudo tegrarcm --bct ventana.bct readbct
236 bct file: ventana.bct
237 device id: 0x7820
238 reading BCT from system, writing to ventana.bct...done!
239
240 3) To download U-Boot to Jetson TK1, with PKC enabled, in one step:
241
242 $ sudo tegrarcm --bct=jetson-tk1.bct --bootloader=u-boot.bin --loadaddr=0x83d88000 --pkc=rsa_priv.der
243 bct file: jetson-tk1-bct.bct
244 bootloader file: u-boot.bin
245 load addr 0x83d88000
246 entry addr 0x83d88000
247 device id: 0x7140
248 uid: 0x640010017410b1000000000016020540
249 RCM version: 64.1
250 downloading miniloader to target at address 0x4000e000 (136920 bytes)...
251 miniloader downloaded successfully
252 Chip UID: 0x000000017410b1000000000016020540
253 Chip ID: 0x40
254 Chip ID Major Version: 0x1
255 Chip ID Minor Version: 0x1
256 Chip SKU: 0x81 (t124)
257 Boot ROM Version: 0x1
258 Boot Device: 0x2 (EMMC)
259 Operating Mode: 0x6 (odm secure mode with PKC)
260 Device Config Strap: 0x0
261 Device Config Fuse: 0x0
262 SDRAM Config Strap: 0x3
263 sending file: jetson-tk1-bct.bct
264 - 8192/8192 bytes sent
265 jetson-tk1-bct.bct sent successfully
266 sending file: u-boot.bin
267 | 440004/440004 bytes sent
268 u-boot.bin sent successfully
269
270 4) To generate signed messages that will allow later downloading of U-
271 Boot to Jetson TK1 with PKC enabled:
272
273 $ sudo tegrarcm --gen-signed-msgs --signed-msgs-file rel_1001.bin --bootloader=u-boot.bin --loadaddr 0x83d88000 --soc 124 --pkc rsa_priv.der
274 bootloader file: u-boot.bin
275 load addr 0x83d88000
276 entry addr 0x83d88000
277 Create file rel_1001.bin.qry...
278 Create file rel_1001.bin.ml...
279 Create file rel_1001.bin.bl...
280
281
282 5) To download previously-generated signed messages to Jetson TK1 with
283 PKC enabled:
284
285 $ sudo tegrarcm --download-signed-msgs --signed-msgs-file rel_1001.bin --bct=jetson-tk1-bct.bct --bootloader=u-boot.bin --loadaddr 0x83d88000
286 bct file: jetson-tk1-bct.bct
287 bootloader file: u-boot.bin
288 load addr 0x83d88000
289 entry addr 0x83d88000
290 device id: 0x7140
291 uid: 0x640010017410b1000000000016020540
292 download signed query version rcm from file rel_1001.bin.qry
293 RCM version: 64.1
294 download signed miniloader rcm from file rel_1001.bin.ml
295 downloading miniloader to target at address 0x4000e000 (137572 bytes)...
296 miniloader downloaded successfully
297 Chip UID: 0x000000017410b1000000000016020540
298 Chip ID: 0x40
299 Chip ID Major Version: 0x1
300 Chip ID Minor Version: 0x1
301 Chip SKU: 0x81 (t124)
302 Boot ROM Version: 0x1
303 Boot Device: 0x2 (EMMC)
304 Operating Mode: 0x6 (odm secure mode with PKC)
305 Device Config Strap: 0x0
306 Device Config Fuse: 0x0
307 SDRAM Config Strap: 0x3
308 sending file: jetson-tk1-bct.bct
309 - 8192/8192 bytes sent
310 jetson-tk1-bct.bct sent successfully
311 sending file: rel_1001.bin.bl
312 - 256/256 bytes sent
313 rel_1001.bin.bl sent successfully
314 sending file: u-boot.bin
315 | 440004/440004 bytes sent
316 u-boot.bin sent successfully
317
318
319
321 If any error occurs a non zero exit status is returned.
322
323
325 cbootimage(1),
326
327
329 Allen Martin, <amartin@nvidia.com>
330
331
332
333tegrarcm-1.8 29 November 2012 tegrarcm(1)