Debian Codegraph @

doc/dfu-util.1

raw
1 .TH "DFU\-UTIL" "1" "September 2021" "dfu\-util 0.11" ""
2 .SH NAME
3 dfu-util \- Device firmware update (DFU) USB programmer
4 .SH SYNOPSIS
5 .\" Listing devices
6 .HP
7 .B dfu-util
8 .B \-l
9 .RB [\| \-v \|]
10 .RB [\| \-d
11 .IR vid:pid [\|, vid:pid \|]\|]
12 .RB [\| \-p
13 .IR path \|]
14 .RB [\| \-c
15 .IR configuration \|]
16 .RB [\| \-i
17 .IR interface \|]
18 .RB [\| \-a
19 .IR alt-intf \|]
20 .RB [\| \-S
21 .IR serial [\|, serial \|]\|]
22 .\" Download to or upload from device
23 .HP
24 .B dfu-util
25 .RB [\| \-v \|]
26 .RB [\| \-d
27 .IR vid:pid [\|, vid:pid \|]\|]
28 .RB [\| \-p
29 .IR path \|]
30 .RB [\| \-c
31 .IR configuration \|]
32 .RB [\| \-i
33 .IR interface \|]
34 .RB [\| \-a
35 .IR alt-intf \|]
36 .RB [\| \-S
37 .IR serial [\|, serial \|]\|]
38 .RB [\| \-t
39 .IR size \|]
40 .RB [\| \-Z
41 .IR size \|]
42 .RB [\| \-w \|]
43 .RB [\| \-s
44 .IR address \|]
45 .RB [\| \-R \|]
46 .RB [\| \-D \||\| \-U
47 .IR file \|]
48 .\" --help and --version
49 .HP
50 .B dfu-util
51 .RB [\| \-hV \|]
52 .SH DESCRIPTION
53 .B dfu-util
54 is a program that implements the host (computer) side of the USB DFU
55 (Universal Serial Bus Device Firmware Upgrade) protocol.
56 .sp
57 dfu-util communicates with devices that implement the device side of the
58 USB DFU protocol, and is often used to upgrade the firmware of such
59 devices.
60 .SH OPTIONS
61 .TP
62 .B "\-l, \-\-list"
63 List the currently attached DFU capable USB devices.
64 .TP
65 .BR "\-d, \-\-device" " [\fIRun-Time VENDOR\fP]:[\fIRun-Time PRODUCT\fP][,[\fIDFU Mode VENDOR\fP]:[\fIDFU Mode PRODUCT\fP]]"
66 .RS
67 Specify run-time and/or DFU mode vendor and/or product IDs of the DFU device
68 to work with. \fBVENDOR\fP and \fBPRODUCT\fP are hexadecimal numbers (no prefix
69 needed), "*" (match any), or "-" (match nothing). By default, any DFU capable
70 device in either run-time or DFU mode will be considered.
71 .sp
72 If you only have one standards-compliant DFU device attached to your computer,
73 this parameter is optional. However, as soon as you have multiple DFU devices
74 connected, dfu-util will detect this and abort, asking you to specify which
75 device to use.
76 .sp
77 If only run-time IDs are specified (e.g. "\fB--device 1457:51ab\fP"), then in
78 addition to the specified run-time IDs, any DFU mode devices will also be
79 considered. This is beneficial to allow a DFU capable device to be found
80 again after a switch to DFU mode, since the vendor and/or product ID of a
81 device usually changes in DFU mode.
82 .sp
83 If only DFU mode IDs are specified (e.g. "\fB--device ,951:26\fP"), then all
84 run-time devices will be ignored, making it easy to target a specific device in
85 DFU mode.
86 .sp
87 If both run-time and DFU mode IDs are specified (e.g. "\fB--device
88 1457:51ab,:2bc\fP"), then unspecified DFU mode components will use the run-time
89 value specified.
90 .sp
91 Examples:
92 .TP
93 .B "--device 1457:51ab,951:26"
94 .br
95 Work with a device in run-time mode with
96 vendor ID 0x1457 and product ID 0x51ab, or in DFU mode with vendor ID 0x0951
97 and product ID 0x0026
98 .sp
99 .TP
100 .B "--device 1457:51ab,:2bc"
101 .br
102 Work with a device in run-time mode with vendor ID 0x1457 and product ID
103 0x51ab, or in DFU mode with vendor ID 0x1457 and product ID 0x02bc
104 .sp
105 .TP
106 .B "--device 1457:51ab"
107 .br
108 Work with a device in run-time mode with vendor ID 0x1457 and product ID
109 0x51ab, or in DFU mode with any vendor and product ID
110 .sp
111 .TP
112 .B "--device ,951:26"
113 .br
114 Work with a device in DFU mode with vendor ID 0x0951 and product ID 0x0026
115 .sp
116 .TP
117 .B "--device *,-"
118 .br
119 Work with any device in run-time mode, and ignore any device in DFU mode
120 .sp
121 .TP
122 .B "--device ,"
123 .br
124 Ignore any device in run-time mode, and Work with any device in DFU mode
125 .RE
126 .TP
127 .BR "\-p, \-\-path" " BUS-PORT. ... .PORT"
128 Specify the path to the DFU device.
129 .TP
130 .BR "\-c, \-\-cfg" " CONFIG-NR"
131 Specify the configuration of the DFU device. Note that this is only used for matching, the configuration is not set by dfu-util.
132 .TP
133 .BR "\-i, \-\-intf" " INTF-NR"
134 Specify the DFU interface number.
135 .TP
136 .BR "\-a, \-\-alt" " ALT"
137 Specify the altsetting of the DFU interface by name or by number.
138 .TP
139 .BR "\-S, \-\-serial" " [\fIRun-Time SERIAL\fP][,[\fIDFU Mode SERIAL\fP]]"
140 .RS
141 Specify the run-time and DFU mode serial numbers used to further restrict
142 device matches. If multiple, identical DFU devices are simultaneously
143 connected to a system then vendor and product ID will be insufficient for
144 targeting a single device. In this situation, it may be possible to use this
145 parameter to specify a serial number which also must match.
146 .sp
147 If only a single serial number is specified, then the same serial number is
148 used in both run-time and DFU mode. An empty serial number will match any
149 serial number in the corresponding mode.
150 .RE
151 .TP
152 .BR "\-t, \-\-transfer-size" " SIZE"
153 Specify the number of bytes per USB transfer. The optimal value is
154 usually determined automatically so this option is rarely useful. If
155 you need to use this option for a device, please report it as a bug.
156 .TP
157 .BR "\-Z, \-\-upload-size" " SIZE"
158 Specify the expected upload size, in bytes. Note that the value is only used
159 for scaling the progress bar, the actual upload size is determined by the device.
160 .TP
161 .BR "\-U, \-\-upload" " FILE"
162 Read firmware from device into
163 .BR FILE .
164 .TP
165 .BR "\-D, \-\-download" " FILE"
166 Write firmware from
167 .B FILE
168 into device. When
169 .B FILE
170 is \-, the firmware is read from stdin.
171 .TP
172 .B "\-R, \-\-reset"
173 Issue USB reset signalling after upload or download has finished.
174 .TP
175 .B "\-e, \-\-detach"
176 Request that the device re-enumerate out of run-time mode and into DFU mode as
177 when uploading or downloading, but exit immediately after sending the request.
178 .TP
179 .BR "\-E, \-\-detach-delay" " SECONDS"
180 When uploading or downloading, wait
181 .B SECONDS
182 seconds for the device to re-enumerate after sending the detach request before
183 giving up. Defaults to 5 seconds. This option has no effect with \fB-e\fP,
184 since that causes dfu-util to immediately exit after sending the detach request.
185 .TP
186 .B "\-w, \-\-wait"
187 Wait until matching device appears on the USB bus.
188 .TP
189 .BR "\-s, \-\-dfuse-address" " [\fIADDRESS\fP][:\fILENGTH\fP][:\fIMODIFIERS\fP]"
190 Specify target address for raw binary download/upload on DfuSe devices. Do
191 .B not
192 use this option for downloading DfuSe (.dfu) files.
193 A length can be specified for uploads. Modifiers can be added after the
194 address, separated by a colon, to perform special DfuSE commands such as
195 "leave" DFU mode, "unprotect" and "mass-erase" flash memory.
196 If the device can be expected to reset itself after the operation, "will-reset"
197 should be added. The "force" modifier will override some sanity checks, and is
198 also needed for the "unprotect" and "mass-erase" operations.
199 .TP
200 .B "\-v, \-\-verbose"
201 Print more information about dfu-util's operation. A second
202 .B -v
203 adds more details. A third
204 .B -v
205 activates verbose logging of USB requests (libusb debug output).
206 .TP
207 .B "\-h, \-\-help"
208 Show a help text and exit.
209 .TP
210 .B "\-V, \-\-version"
211 Show version information and exit.
212 .SH EXAMPLES
213 .SS Using dfu-util in the OpenMoko project
214 (with the Neo1973 hardware)
215 .PP
216 Flashing the rootfs:
217 .br
218 .B " $ dfu-util -a rootfs -R -D /path/to/openmoko-devel-image.jffs2"
219 .PP
220 Flashing the kernel:
221 .br
222 .B " $ dfu-util -a kernel -R -D /path/to/uImage"
223 .PP
224 Flashing the bootloader:
225 .br
226 .B " $ dfu-util -a u-boot -R -D /path/to/u-boot.bin"
227 .PP
228 Copying a kernel into RAM:
229 .br
230 .B " $ dfu-util -a 0 -R -D /path/to/uImage"
231 .sp
232 Once this has finished, the kernel will be available at the default load
233 address of 0x32000000 in Neo1973 RAM.
234 .B Note:
235 You cannot transfer more than 2MB of data into RAM using this method.
236 .sp
237 .SS Using dfu-util with a DfuSe device
238 .PP
239 Flashing a
240 .B .dfu
241 (special DfuSe format) file to the device:
242 .br
243 .B " $ dfu-util -D /path/to/dfuse-image.dfu"
244 .PP
245 Reading out 1 KB of flash starting at address 0x8000000:
246 .br
247 .B " $ dfu-util -a 0 -s 0x08000000:1024 -U newfile.bin"
248 .PP
249 Flashing a binary file to address 0x8004000 of device memory and
250 ask the device to leave DFU mode:
251 .br
252 .B " $ dfu-util -a 0 -s 0x08004000:leave -D /path/to/image.bin"
253 .\" There are no bugs of course
254 .SH BUGS
255 Please report any bugs to the dfu-util bug tracker at
256 .BR http://sourceforge.net/p/dfu-util/tickets/ .
257 Please use the
258 .IR --verbose " option (repeated as necessary) to provide more"
259 information in your bug report.
260 .SH SEE ALSO
261 The dfu-util home page is
262 .B http://dfu-util.sourceforge.net/
263 .SH HISTORY
264 dfu-util was originally written for the OpenMoko project by
265 Weston Schmidt <[email protected]> and
266 Harald Welte <[email protected]>. Over time, nearly complete
267 support of DFU 1.0, DFU 1.1 and DfuSe ("1.1a") has been added.
268 .SH LICENCE
269 .B dfu-util
270 is covered by the GNU General Public License (GPL), version 2 or later.
271 .SH COPYRIGHT
272 This manual page was originally written by Uwe Hermann <[email protected]>,
273 and is now part of the dfu-util project.