DFU-UTIL(1)
πΈ NAME πΈ
dfu-util β Device firmware update (DFU) USB programmer
β¨ SYNOPSIS β¨
bestie, here's how you summon it:
dfu-util -l [-v] [-d vid:pid[,vid:pid]] [-p path] [-c configuration] [-i
interface] [-a alt-intf] [-S serial[,serial]]
dfu-util [-v] [-d vid:pid[,vid:pid]] [-p path] [-c configuration] [-i
interface] [-a alt-intf] [-S serial[,serial]] [-t size] [-Z size]
[-w] [-s address] [-R] [-D|-U file]
dfu-util [-hV]
π¦ DESCRIPTION π¦
dfu-util</prouple> is a program that implements the host (computer) side of the USB DFU (Universal Serial Bus Device Firmware Upgrade) protocol. no cap, it's literally the computer half of the handshake π
It talks to devices that implement the device side of the USB DFU protocol, and it's often used to upgrade the firmware of those devices. it's giving glow-up but for hardware β¨
π OPTIONS π
-l,--listβ List the currently attached DFU capable USB devices. it's the "who's here" check π«Ά-d,--device [Run-Time VENDOR]:[Run-Time PRODUCT][,[DFU Mode VENDOR]:[DFU Mode PRODUCT]]β Specify run-time and/or DFU mode vendor and/or product IDs of the DFU device to work with. VENDOR and PRODUCT are hexadecimal numbers (no prefix needed),"*"(match any), or"-"(match nothing). By default, any DFU capable device in either run-time or DFU mode will be considered.
If you only have one standards-compliant DFU device attached to your computer, this parameter is optional. But the second you have multiple DFU devices connected, dfu-util will detect this and abort, asking you to specify which device to use. it will not pick for you, it is not your wingman π
If only run-time IDs are specified (e.g. "--device 1457:51ab"), then in addition to the specified run-time IDs, any DFU mode devices will also be considered. This is beneficial to allow a DFU capable device to be found again after a switch to DFU mode, since the vendor and/or product ID of a device usually changes in DFU mode. main character behavior fr fr π
If only DFU mode IDs are specified (e.g. "--device ,951:26"), then all run-time devices will be ignored, making it easy to target a specific device in DFU mode. so clean, so targeted.
If both run-time and DFU mode IDs are specified (e.g. "--device 1457:51ab,:2bc"), then unspecified DFU mode components will use the run-time value specified.
Examples:
--device 1457:51ab,951:26Work with a device in run-time mode with vendor ID 0x1457 and product ID 0x51ab, or in DFU mode with vendor ID 0x0951 and product ID 0x0026--device 1457:51ab,:2bcWork with a device in run-time mode with vendor ID 0x1457 and product ID 0x51ab, or in DFU mode with vendor ID 0x1457 and product ID 0x02bc--device 1457:51abWork with a device in run-time mode with vendor ID 0x1457 and product ID 0x51ab, or in DFU mode with any vendor and product ID--device ,951:26Work with a device in DFU mode with vendor ID 0x0951 and product ID 0x0026--device *,-Work with any device in run-time mode, and ignore any device in DFU mode--device ,Ignore any device in run-time mode, and Work with any device in DFU mode
-p,--path BUS-PORT. ... .PORTβ Specify the path to the DFU device. it's the address, the coordinates, the lil map πΊοΈ-c,--cfg CONFIG-NRβ Specify the configuration of the DFU device. heads up though: this is only used for matching β the configuration is not set bydfu-util. it looks, it does not touch π-i,--intf INTF-NRβ Specify the DFU interface number.-a,--alt ALTβ Specify the altsetting of the DFU interface by name or by number.-S,--serial [Run-Time SERIAL][,[DFU Mode SERIAL]]β Specify the run-time and DFU mode serial numbers used to further restrict device matches. If multiple, identical DFU devices are simultaneously connected to a system then vendor and product ID will be insufficient for targeting a single device. In this situation, it may be possible to use this parameter to specify a serial number which also must match.
If only a single serial number is specified, then the same serial number is used in both run-time and DFU mode. An empty serial number will match any serial number in the corresponding mode.
-t,--transfer-size SIZEβ Specify the number of bytes per USB transfer. The optimal value is usually determined automatically so this option is rarely useful. If you need to use this option for a device, please report it as a bug. π (like, genuinely, that's a them problem not a you problem)-Z,--upload-size SIZEβ Specify the expected upload size, in bytes. Note that the value is only used for scaling the progress bar β the actual upload size is determined by the device. so it's cosmetic, it's the aesthetic, it's the fit check π-U,--upload FILEβ Read firmware from device into FILE.-D,--download FILEβ Write firmware from FILE into device. When FILE is-, the firmware is read from stdin.-R,--resetβ Issue USB reset signalling after upload or download has finished. the lil goodbye wave π-e,--detachβ Request that the device re-enumerate out of run-time mode and into DFU mode as when uploading or downloading, but exit immediately after sending the request. it says what it needs to say and leaves, iconic.-E,--detach-delay SECONDSβ When uploading or downloading, wait SECONDS seconds for the device to re-enumerate after sending the detach request before giving up. Defaults to 5 seconds. This option has no effect with-e, since that causesdfu-utilto immediately exit after sending the detach request.-w,--waitβ Wait until matching device appears on the USB bus. the "I'll wait π₯Ί" option.-s,--dfuse-address [ADDRESS][:LENGTH][:MODIFIERS]β Specify target address for raw binary download/upload on DfuSe devices. Do not use this option for downloading DfuSe (.dfu) files. A length can be specified for uploads. Modifiers can be added after the address, separated by a colon, to perform special DfuSE commands such as"leave"DFU mode,"unprotect"and"mass-erase"flash memory. If the device can be expected to reset itself after the operation,"will-reset"should be added. The"force"modifier will override some sanity checks, and is also needed for the"unprotect"and"mass-erase"operations.
okay so "force" is literally overriding sanity checks. that's giving "hold my iced coffee" energy. know what you're doing before you type it π
-v,--verboseβ Print more information aboutdfu-util's operation. A second-vadds more details. A third-vactivates verbose logging of USB requests (libusb debug output). yes, it stacks. three is the maximum drama setting π₯-h,--helpβ Show a help text and exit.-V,--versionβ Show version information and exit.
π EXAMPLES π
Using dfu-util in the OpenMoko project
(with the Neo1973 hardware)
Flashing the rootfs:
$ dfu-util -a rootfs -R -D /path/to/openmoko-devel-image.jffs2
Flashing the kernel:
$ dfu-util -a kernel -R -D /path/to/uImage
Flashing the bootloader:
$ dfu-util -a u-boot -R -D /path/to/u-boot.bin
Copying a kernel into RAM:
$ dfu-util -a 0 -R -D /path/to/uImage
Once this has finished, the kernel will be available at the default load address of 0x32000000 in Neo1973 RAM.
Note: You cannot transfer more than 2MB of data into RAM using this method. that's the limit bestie, no pushing past it π
Using dfu-util with a DfuSe device
Flashing a .dfu (special DfuSe format) file to the device:
$ dfu-util -D /path/to/dfuse-image.dfu
Reading out 1 KB of flash starting at address 0x8000000:
$ dfu-util -a 0 -s 0x08000000:1024 -U newfile.bin
Flashing a binary file to address 0x8004000 of device memory and ask the device to leave DFU mode:
$ dfu-util -a 0 -s 0x08004000:leave -D /path/to/image.bin
π BUGS π
Please report any bugs to the dfu-util bug tracker at http://sourceforge.net/p/dfu-util/tickets/. Please use the --verbose option (repeated as necessary) to provide more information in your bug report. the more -v you stack, the more the devs can actually see what went wrong, so don't be shy π«Ά
π SEE ALSO π
The dfu-util home page is http://dfu-util.sourceforge.net/ β go say hi π
π HISTORY π
dfu-util was originally written for the OpenMoko project by Weston Schmidt <weston_schmidt@yahoo.com> and Harald Welte <hwelte@hmw-consulting.de>. Over time, nearly complete support of DFU 1.0, DFU 1.1 and DfuSe ("1.1a") has been added. glow-up arc, honestly π
βοΈ LICENCE βοΈ
dfu-util is covered by the GNU General Public License (GPL), version 2 or later. free as in freedom bestie π
Β©οΈ COPYRIGHT Β©οΈ
This manual page was originally written by Uwe Hermann <uwe@hermann-uwe.de>, and is now part of the dfu-util project.
okay that's the whole page!! this was dfu-util version 0.11, from September 2021, and yeah the manual name up top is DFU-UTIL(1) in case you were wondering why it's all shouty π
mwah, go flash something responsibly π¦β¨
π¦ where this page comes from
- alpine 3.24: dfu-util-doc 0.11-r1 Β· GPL-2.0-only
- arch rolling: dfu-util 0.11-3 Β· GPL2
- debian bookworm: dfu-util 0.11-1 Β· GPL-2.0-or-later
- debian trixie: dfu-util 0.11-3 Β· GPL-2.0-or-later
- fedora 43: dfu-util 0.11-11.fc43 Β· GPL-2.0-or-later
- fedora 44: dfu-util 0.11-13.fc44 Β· GPL-2.0-or-later
- nixos 26.05: dfu-util 0.11
- nixpkgs unstable: dfu-util 0.11
- opensuse-leap 16.0: dfu-util 0.11-bp160.1.12 Β· GPL-2.0-only
- opensuse-leap 16.0: dfu-util 0.11-bp160.1.12 Β· GPL-2.0-only
- opensuse-leap 16.0: dfu-util 0.11-bp160.1.12 Β· GPL-2.0-only
- opensuse-leap 16.0: dfu-util 0.11-bp160.1.12 Β· GPL-2.0-only
- ubuntu noble: dfu-util 0.11-1 Β· GPL-2.0-or-later
- ubuntu questing: dfu-util 0.11-3
- ubuntu resolute: dfu-util 0.11-3build1 Β· GPL-2.0-or-later
- ubuntu stonking: dfu-util 0.11-3build1 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms