fwupd/plugins/dfu
Richard Hughes fbd8b5d325 Add fu_device_dump_firmware()
Conceptually we were trying to stuff subtly different actions into one vfunc:

 * Read firmware from the device to update the verification checksums

 * Read a firmware blob from the device for debugging

For the first action we might want to mask out the sections of the flash with
serial numbers (so the verification hashes match the ones published on the LVFS)
and for the second we want just a raw ROM file from the hardware with no
pre-processing that we can compare against an external SPI dumper.

Split out ->dump_firmware to get the raw blob, and allow plugins to also
implement ->read_firmware() if they have to mask out specific offsets or remove
specific images from the FuFirmware container.

In the common case when masking is not required, fall back to using a 'binary'
FuFirmware automatically to make most plugins simpler.
2020-09-24 10:54:27 -05:00
..
contrib Use black to format python source in a consistent manner 2020-04-13 23:06:30 +01:00
fuzzing Fuzz the SREC and IHEX file parsers once more 2019-10-02 16:28:28 +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 Add fu_device_dump_firmware() 2020-09-24 10:54:27 -05: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 Install the installed tests 2020-08-28 10:10:43 -05: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 dfu: Avoid communicating when bitManifestationTolerant is off 2020-05-13 20:30:04 +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: Support polling the status from device in dfuManifest state 2020-09-01 19:43:55 +01:00
dfu-target.h dfu: Remove XTEA support 2019-10-09 20:56:38 +01:00
dfu-tool.c dfu: Specify "RemoveDelay" for Poly USB Cameras in dfu.quirk 2020-09-02 12:01:46 -05:00
dfu-tool.h2m use help2man for dfu-tool too 2018-02-09 17:26:18 +00:00
dfu.quirk dfu: Allow device to attach to normal without a bus reset 2020-09-04 17:52:00 +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 Allow contructing a firmware with multiple images 2020-09-21 18:11:13 +01: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