fwupd/plugins/dfu
Richard Hughes cddf5b5b89 Only auto-add counterpart GUIDs when required
Doing this unconditionally means we accidentally 'bleed' one device mode into
another in a non-obvious way. For instance, a device might have two operating
modes with different GUIDs. If firmware is supplied for both modes in the same
cabinet archive then we might accidentally match the 'wrong' firmware when
the daemon has observed a mode switch and added the counterpart GUIDs.

We only really need the counterpart GUIDs when switching between Jabra, 8bitdo
and DFU devices where the DFU bootloader VID:PID is not manually tagged with
`CounterpartGuid` in a quirk file. In the general case lets keep it simple to
avoid difficult to find bugs.
2020-04-08 13:55:39 +01:00
..
contrib Do not use /usr/bin/env in the shebang line 2018-07-12 07:08:53 -05:00
fuzzing Fuzz the SREC and IHEX file parsers once more 2019-10-02 16:28:28 +01:00
tests Use FuFirmware as a container for firmware images 2019-08-08 13:10:57 +01:00
dfu-common.c dfu: Remove XTEA support 2019-10-09 20:56:38 +01:00
dfu-common.h dfu: Remove support for the Metadata Store Proposal 2019-10-09 20:56:38 +01:00
dfu-device.c Only auto-add counterpart GUIDs when required 2020-04-08 13:55:39 +01:00
dfu-device.h jabra: Move the Jabra-specific detach out into its own plugin 2019-10-30 15:09:49 +00:00
dfu-element.c trivial: Fix up some typos from codespell 2019-11-01 14:21:20 +00:00
dfu-element.h dfu: Remove two completely unused helpers 2019-10-15 13:04:09 +01:00
dfu-firmware.c trivial: Fix up some typos from codespell 2019-11-01 14:21:20 +00:00
dfu-firmware.h dfu: Make DfuFirmware derive from FuFirmware 2019-10-14 15:24:08 -05:00
dfu-format-dfu.c dfu: Make DfuFirmware derive from FuFirmware 2019-10-14 15:24:08 -05:00
dfu-format-dfu.h dfu: Use FwupdInstallFlags rather than a DFU-specific version 2019-10-11 13:19:46 +01:00
dfu-format-dfuse.c dfu: Make DfuFirmware derive from FuFirmware 2019-10-14 15:24:08 -05:00
dfu-format-dfuse.h dfu: Use FwupdInstallFlags rather than a DFU-specific version 2019-10-11 13:19:46 +01:00
dfu-format-raw.c dfu: Make DfuFirmware derive from FuFirmware 2019-10-14 15:24:08 -05:00
dfu-format-raw.h dfu: Use FwupdInstallFlags rather than a DFU-specific version 2019-10-11 13:19:46 +01:00
dfu-image.c dfu: Make DfuImage derive from FuFirmwareImage 2019-10-14 15:24:08 -05:00
dfu-image.h dfu: Make DfuImage derive from FuFirmwareImage 2019-10-14 15:24:08 -05:00
dfu-sector.c trivial: Fix up some typos from codespell 2019-11-01 14:21:20 +00:00
dfu-sector.h dfu: Remove private headers that do not need to exist 2019-10-14 15:24:08 -05:00
dfu-self-test.c trivial: Unexport fu_test_get_filename() 2019-11-27 12:45:35 +00:00
dfu-target-avr.c dfu: Remove private headers that do not need to exist 2019-10-14 15:24:08 -05:00
dfu-target-avr.h trivial: Remove G_BEGIN_DECLS from all private headers 2019-10-09 20:02:16 +01:00
dfu-target-private.h dfu: Remove private headers that do not need to exist 2019-10-14 15:24:08 -05:00
dfu-target-stm.c Fix some typos spotted using codespell 2019-04-08 12:47:53 +01:00
dfu-target-stm.h trivial: Remove G_BEGIN_DECLS from all private headers 2019-10-09 20:02:16 +01:00
dfu-target.c dfu: Remove private headers that do not need to exist 2019-10-14 15:24:08 -05:00
dfu-target.h dfu: Remove XTEA support 2019-10-09 20:56:38 +01:00
dfu-tool.c trivial: Remove now-unused functionality in dfu-tool 2020-03-09 21:12:01 +00:00
dfu-tool.h2m use help2man for dfu-tool too 2018-02-09 17:26:18 +00:00
dfu.quirk add STM32F745 stm dfuse quirk 2020-04-02 13:22:53 +01:00
fu-plugin-dfu.c Set the protocol per-device not per-plugin 2019-11-25 18:01:54 +00:00
fuzzing.md trivial: Remove the fuzzing details for DfuPatch 2019-10-10 16:18:26 +01:00
meson.build Convert libfwupdprivate to a shared library libfwupdplugin 2019-11-27 11:32:43 +00:00
README.md dfu: Add a way to set the timeout from a quirk 2020-04-02 13:22:28 +01: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

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