fwupd/plugins/uf2
Richard Hughes faa7871b08 Remove duplicate ->probe() calls to speed up startup by 150ms
Now incorporate is fixed to copy across the properties we need in the
superclass, we don't need to do the subclass ->probe().

Note, we still need to do the subclassed ->probe() when using
FU_UDEV_DEVICE_FLAG_VENDOR_FROM_PARENT or when looking at properties
on the parent device.

This also removes the spurious 'already set GType to FuVliUsbhubDevice,
ignoring FuVliUsbhubDevice' messages when running the daemon.
2022-06-14 21:01:57 +01:00
..
tests Add support for UF2 devices 2021-12-21 10:06:18 +00:00
fu-plugin-uf2.c Add support for UF2 devices 2021-12-21 10:06:18 +00:00
fu-self-test.c Add support for UF2 devices 2021-12-21 10:06:18 +00:00
fu-uf2-device.c Remove duplicate ->probe() calls to speed up startup by 150ms 2022-06-14 21:01:57 +01:00
fu-uf2-device.h Add support for UF2 devices 2021-12-21 10:06:18 +00:00
fu-uf2-firmware.c trivial: Remove fu_byte_array_set_size_full() 2022-06-14 14:36:52 -05:00
fu-uf2-firmware.h Add support for UF2 devices 2021-12-21 10:06:18 +00:00
meson.build Convert build system to use meson tristate features 2022-02-28 08:34:48 -06:00
README.md Add support for UF2 devices 2021-12-21 10:06:18 +00:00
uf2.quirk Add support for UF2 devices 2021-12-21 10:06:18 +00:00

UF2 Devices

Introduction

This plugin allows the user to update any supported UF2 Device by writing firmware onto a mass storage device.

A UF2 device exposes a VFAT block device which has a virtual file INFO_UF2.TXT where metadata can be read from. It may also have a the current firmware exported as a file CURRENT.UF2 which is in a 512 byte-block UF2 format.

Writing any file to the MSD will cause the firmware to be written. Sometimes the device will restart and the volume will be unmounted and then mounted again. In some cases the volume may not “come back” until the user manually puts the device back in programming mode.

Match the block devices using the VID, PID and UUID, and then create a UF2 device which can be used to flash firmware.

Note: We only read metadata from allow-listed IDs to avoid causing regressions on non-UF2 volumes. To get the UUID you can use commands like:

udisksctl info -b /dev/sda1

The UF2 format is specified here.

Firmware Format

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

This plugin supports the following protocol ID:

  • com.microsoft.uf2

GUID Generation

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

  • USB\VID_1234&PID_5678
  • USB\VID_1234&PID_5678&UUID_E478-FA50

Additionally, the UF2 Board-ID and Family-ID may be added:

  • UF2\BOARD_{Board-ID}
  • UF2\FAMILY_{Family-ID}

Update Behavior

The firmware is deployed when the device is inserted, and the firmware will typically be written as the file is copied.

Vendor ID Security

The vendor ID is set from the USB vendor.

External Interface Access

This plugin requires permission to mount, write a file and unmount the mass storage device.