fwupd/plugins/dfu
Dirk-Jan C. Binnema 79536a0265 dfu-tool: Avoid runtime warning (overriding error)
We were seeing:

,----
| (dfu-tool:1139827): GLib-WARNING **: 17:34:42.671: GError set over the top of a previous GError or uninitialized memory.
| This indicates a bug in someone's code. You must ensure an error is NULL before it's set.
| The overwriting error message was: no device matches for 1234:abcd
`----

This is because we were attempting to overwrite libgusb's error with one
for fwupd, and glib rightfully complains. So let's prefix it instead.
2021-04-05 14:42:04 -05:00
..
contrib Use black to format python source in a consistent manner 2020-04-13 23:06:30 +01:00
dfu.quirk Simplify the quirk file format 2021-03-03 08:30:34 +00:00
fu-dfu-common.c dfu: Modernize the coding style to match the other plugings 2021-02-24 10:36:45 +00:00
fu-dfu-common.h dfu: Modernize the coding style to match the other plugings 2021-02-24 10:36:45 +00:00
fu-dfu-device.c Remove FuFirmwareImage and just use FuFirmware instead 2021-03-09 21:14:12 +00:00
fu-dfu-device.h dfu: Modernize the coding style to match the other plugings 2021-02-24 10:36:45 +00:00
fu-dfu-sector.c dfu: Modernize the coding style to match the other plugings 2021-02-24 10:36:45 +00:00
fu-dfu-sector.h dfu: Modernize the coding style to match the other plugings 2021-02-24 10:36:45 +00:00
fu-dfu-self-test.c dfu: Modernize the coding style to match the other plugings 2021-02-24 10:36:45 +00:00
fu-dfu-target-avr.c dfu: Use DeviceInstanceIDs to merge AVR quirk metadata 2021-03-03 08:30:34 +00:00
fu-dfu-target-avr.h dfu: Modernize the coding style to match the other plugings 2021-02-24 10:36:45 +00:00
fu-dfu-target-private.h dfu: Modernize the coding style to match the other plugings 2021-02-24 10:36:45 +00:00
fu-dfu-target-stm.c dfu: Correctly erase STM32 devices when transfer size is less than sector size 2021-03-01 17:04:34 +00:00
fu-dfu-target-stm.h dfu: Modernize the coding style to match the other plugings 2021-02-24 10:36:45 +00:00
fu-dfu-target.c Remove FuFirmwareImage and just use FuFirmware instead 2021-03-09 21:14:12 +00:00
fu-dfu-target.h Remove FuFirmwareImage and just use FuFirmware instead 2021-03-09 21:14:12 +00:00
fu-dfu-tool.c dfu-tool: Avoid runtime warning (overriding error) 2021-04-05 14:42:04 -05:00
fu-dfu-tool.h2m dfu: Modernize the coding style to match the other plugings 2021-02-24 10:36:45 +00:00
fu-plugin-dfu.c Split out a shared system context 2021-04-01 21:11:29 +01:00
meson.build dfu: Modernize the coding style to match the other plugings 2021-02-24 10:36:45 +00:00
README.md Add a new internal flag to opt-in to GUID matching 2021-02-25 15:47:25 +00:00

DFU Support

Introduction

Device Firmware Update is a standard that allows USB devices to be easily and safely updated by any operating system.

Firmware Format

The daemon will decompress the cabinet archive and extract a firmware blob in DFU or DfuSe file format.

This plugin supports the following protocol IDs:

  • org.usb.dfu
  • com.st.dfuse

GUID Generation

These devices use the standard USB DeviceInstanceId values, e.g.

  • USB\VID_273F&PID_1003&REV_0001
  • USB\VID_273F&PID_1003
  • USB\VID_273F

Update Behavior

A DFU device usually presents in runtime mode (with optional DFU runtime), but on detach re-enumerates with an additional required DFU descriptor. On attach the device again re-enumerates back to the runtime mode.

For this reason the REPLUG_MATCH_GUID internal device flag is used so that the bootloader and runtime modes are treated as the same device.

Vendor ID Security

The vendor ID is set from the USB vendor, for example USB:0x0A12

Quirk use

This plugin uses the following plugin-specific quirks:

Quirk Description Minimum fwupd version
DfuFlags Optional quirks for a DFU device which doesn't follow the DFU 1.0 or 1.1 specification 1.0.1
DfuForceVersion Forces a specific DFU version for the hardware device. This is required if the device does not set, or sets incorrectly, items in the DFU functional descriptor. 1.0.1
DfuForceTimeout Forces a specific device timeout, in ms 1.4.0
DfuForceTransferSize Forces a target transfer size, in bytes 1.5.6

External interface access

This plugin requires read/write access to /dev/bus/usb.