fwupd/libfwupdplugin
Richard Hughes 60d266cbc6 Add support for UF2 devices
A UF2 device exposes a VFAT block device (sometimes called a Mass
Storage Device) which has a virtual file called `INFO_UF2.TXT` where
metadata can be read. It may also have a the current firmware exported
as a file called `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, UUID or label, 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 and label you can
use commands like:

    udisksctl info -b /dev/sda1
2021-12-21 10:06:18 +00:00
..
tests Add block size properties to FuCfiDevice 2021-12-15 17:49:32 +00:00
fu-archive-firmware.c Add FuArchiveFirmware 2021-11-26 13:47:04 +00:00
fu-archive-firmware.h Add FuArchiveFirmware 2021-11-26 13:47:04 +00:00
fu-archive.c trivial: reformat the whole tree to match new format 2021-08-24 11:18:40 -05:00
fu-archive.h trivial: reformat the whole tree to match new format 2021-08-24 11:18:40 -05:00
fu-backend.c trivial: Verify backends never add or remove from a thread 2021-12-06 17:57:23 +00:00
fu-backend.h trivial: reformat the whole tree to match new format 2021-08-24 11:18:40 -05:00
fu-bluez-device.c trivial: reformat the whole tree to match new format 2021-08-24 11:18:40 -05:00
fu-bluez-device.h trivial: reformat the whole tree to match new format 2021-08-24 11:18:40 -05:00
fu-cabinet.c Show an error when loading XML with multiple <component> tags 2021-11-24 15:44:56 +00:00
fu-cabinet.h trivial: reformat the whole tree to match new format 2021-08-24 11:18:40 -05:00
fu-cfi-device.c Add block erase command to FuCfiDevice 2021-12-15 17:49:32 +00:00
fu-cfi-device.h Add block erase command to FuCfiDevice 2021-12-15 17:49:32 +00:00
fu-cfu-common.c trivial: Export the CFU enum conversion functions 2021-09-25 21:16:18 +01:00
fu-cfu-common.h trivial: Export the CFU enum conversion functions 2021-09-25 21:16:18 +01:00
fu-cfu-offer.c Add FuCfuPayload and FuCfuOffer 2021-09-20 14:43:34 +01:00
fu-cfu-offer.h Add FuCfuPayload and FuCfuOffer 2021-09-20 14:43:34 +01:00
fu-cfu-payload.c Add FuCfuPayload and FuCfuOffer 2021-09-20 14:43:34 +01:00
fu-cfu-payload.h Add FuCfuPayload and FuCfuOffer 2021-09-20 14:43:34 +01:00
fu-chunk-private.h trivial: reformat the whole tree to match new format 2021-08-24 11:18:40 -05:00
fu-chunk.c trivial: Prevent critical warning when calling fu_chunk_array_new() on zero-sized data 2021-12-12 11:16:03 +00:00
fu-chunk.h trivial: reformat the whole tree to match new format 2021-08-24 11:18:40 -05:00
fu-common-cab.c trivial: reformat the whole tree to match new format 2021-08-24 11:18:40 -05:00
fu-common-cab.h trivial: reformat the whole tree to match new format 2021-08-24 11:18:40 -05:00
fu-common-freebsd.c trivial: reformat the whole tree to match new format 2021-08-24 11:18:40 -05:00
fu-common-guid.c trivial: reformat the whole tree to match new format 2021-08-24 11:18:40 -05:00
fu-common-guid.h trivial: reformat the whole tree to match new format 2021-08-24 11:18:40 -05:00
fu-common-linux.c trivial: reformat the whole tree to match new format 2021-08-24 11:18:40 -05:00
fu-common-private.h trivial: reformat the whole tree to match new format 2021-08-24 11:18:40 -05:00
fu-common-version.c trivial: reformat the whole tree to match new format 2021-08-24 11:18:40 -05:00
fu-common-version.h trivial: reformat the whole tree to match new format 2021-08-24 11:18:40 -05:00
fu-common-windows.c trivial: reformat the whole tree to match new format 2021-08-24 11:18:40 -05:00
fu-common.c Add support for UF2 devices 2021-12-21 10:06:18 +00:00
fu-common.h Add fu_common_get_contents_stream() for future usage 2021-12-15 14:24:30 +00:00
fu-context-private.h trivial: reformat the whole tree to match new format 2021-08-24 11:18:40 -05:00
fu-context.c Speed up daemon startup by 15% 2021-11-03 07:14:37 +00:00
fu-context.h Speed up daemon startup by 15% 2021-11-03 07:14:37 +00:00
fu-deprecated.h Install development files for libfwupdplugin 2019-11-27 11:32:43 +00:00
fu-device-locker.c trivial: Do not check the device superclass when closing 2021-12-02 16:21:29 +00:00
fu-device-locker.h trivial: reformat the whole tree to match new format 2021-08-24 11:18:40 -05:00
fu-device-metadata.h trivial: reformat the whole tree to match new format 2021-08-24 11:18:40 -05:00
fu-device-private.h trivial: Fix recently introduced gtkdoc warning 2021-10-29 11:38:04 +01:00
fu-device.c Copy private flags from donor devices 2021-12-13 15:21:51 -06:00
fu-device.h trivial: Properly namespace _INTERNAL_FLAG_NO_AUTO_REMOVE 2021-12-10 17:25:54 +00:00
fu-dfu-firmware-private.h trivial: reformat the whole tree to match new format 2021-08-24 11:18:40 -05:00
fu-dfu-firmware.c trivial: reformat the whole tree to match new format 2021-08-24 11:18:40 -05:00
fu-dfu-firmware.h trivial: reformat the whole tree to match new format 2021-08-24 11:18:40 -05:00
fu-dfuse-firmware.c trivial: reformat the whole tree to match new format 2021-08-24 11:18:40 -05:00
fu-dfuse-firmware.h trivial: reformat the whole tree to match new format 2021-08-24 11:18:40 -05:00
fu-efi-common.c trivial: reformat the whole tree to match new format 2021-08-24 11:18:40 -05:00
fu-efi-common.h trivial: reformat the whole tree to match new format 2021-08-24 11:18:40 -05:00
fu-efi-firmware-common.c trivial: reformat the whole tree to match new format 2021-08-24 11:18:40 -05:00
fu-efi-firmware-common.h trivial: reformat the whole tree to match new format 2021-08-24 11:18:40 -05:00
fu-efi-firmware-file.c Add fu_common_sum8() common functionality 2021-11-26 18:33:11 +03:00
fu-efi-firmware-file.h trivial: reformat the whole tree to match new format 2021-08-24 11:18:40 -05:00
fu-efi-firmware-filesystem.c trivial: Fix a fuzzing crash for a corrupt IFD image 2021-10-15 20:05:55 +01:00
fu-efi-firmware-filesystem.h trivial: reformat the whole tree to match new format 2021-08-24 11:18:40 -05:00
fu-efi-firmware-section.c trivial: reformat the whole tree to match new format 2021-08-24 11:18:40 -05:00
fu-efi-firmware-section.h trivial: reformat the whole tree to match new format 2021-08-24 11:18:40 -05:00
fu-efi-firmware-volume.c trivial: Add more fuzzing alignment checks 2021-10-18 20:02:03 +01:00
fu-efi-firmware-volume.h trivial: reformat the whole tree to match new format 2021-08-24 11:18:40 -05:00
fu-efi-signature-list.c trivial: reformat the whole tree to match new format 2021-08-24 11:18:40 -05:00
fu-efi-signature-list.h trivial: reformat the whole tree to match new format 2021-08-24 11:18:40 -05:00
fu-efi-signature-private.h trivial: reformat the whole tree to match new format 2021-08-24 11:18:40 -05:00
fu-efi-signature.c trivial: reformat the whole tree to match new format 2021-08-24 11:18:40 -05:00
fu-efi-signature.h trivial: reformat the whole tree to match new format 2021-08-24 11:18:40 -05:00
fu-efivar-freebsd.c trivial: reformat the whole tree to match new format 2021-08-24 11:18:40 -05:00
fu-efivar-impl.h trivial: reformat the whole tree to match new format 2021-08-24 11:18:40 -05:00
fu-efivar-linux.c trivial: Add a missing error check when creating a stream 2021-12-10 16:00:07 +00:00
fu-efivar-windows.c trivial: reformat the whole tree to match new format 2021-08-24 11:18:40 -05:00
fu-efivar.c trivial: reformat the whole tree to match new format 2021-08-24 11:18:40 -05:00
fu-efivar.h trivial: reformat the whole tree to match new format 2021-08-24 11:18:40 -05:00
fu-firmware-common.c trivial: Codespell fixes 2021-10-14 09:09:54 -05:00
fu-firmware-common.h trivial: reformat the whole tree to match new format 2021-08-24 11:18:40 -05:00
fu-firmware.c trivial: Never print NULL in the FuFirmware flag output 2021-11-26 15:33:32 +00:00
fu-firmware.h Do not leak when calling fu_firmware_parse() multiple times 2021-11-24 15:46:18 +00:00
fu-fmap-firmware.c Add fu_memmem_safe() with fallback code for win32 2021-12-15 12:57:49 +00:00
fu-fmap-firmware.h trivial: reformat the whole tree to match new format 2021-08-24 11:18:40 -05:00
fu-fuzzer-firmware.c.in Do not leak when calling fu_firmware_parse() multiple times 2021-11-24 15:46:18 +00:00
fu-fuzzer-main.c trivial: Do not use g_assert() in self test code 2021-09-24 22:20:21 +01:00
fu-hash.py trivial: update python black style to 21.6b0 2021-06-16 06:41:46 -05:00
fu-hid-device.c Allow using interrupt transfers for HID devices 2021-10-05 15:08:44 +01:00
fu-hid-device.h Allow using interrupt transfers for HID devices 2021-10-05 15:08:44 +01:00
fu-hwids.c Allow overriding HwId data from the config file 2021-11-10 17:59:52 +00:00
fu-hwids.h trivial: reformat the whole tree to match new format 2021-08-24 11:18:40 -05:00
fu-i2c-device.c trivial: reformat the whole tree to match new format 2021-08-24 11:18:40 -05:00
fu-i2c-device.h trivial: reformat the whole tree to match new format 2021-08-24 11:18:40 -05:00
fu-ifd-bios.c trivial: reformat the whole tree to match new format 2021-08-24 11:18:40 -05:00
fu-ifd-bios.h trivial: reformat the whole tree to match new format 2021-08-24 11:18:40 -05:00
fu-ifd-common.c trivial: reformat the whole tree to match new format 2021-08-24 11:18:40 -05:00
fu-ifd-common.h trivial: reformat the whole tree to match new format 2021-08-24 11:18:40 -05:00
fu-ifd-firmware.c trivial: Remove some unused variables 2021-08-28 10:17:56 +01:00
fu-ifd-firmware.h trivial: reformat the whole tree to match new format 2021-08-24 11:18:40 -05:00
fu-ifd-image.c trivial: Add more fuzzing alignment checks 2021-10-18 20:02:03 +01:00
fu-ifd-image.h trivial: reformat the whole tree to match new format 2021-08-24 11:18:40 -05:00
fu-ihex-firmware.c Add new API for splitting an untrusted string 2021-09-17 14:46:45 +01:00
fu-ihex-firmware.h trivial: reformat the whole tree to match new format 2021-08-24 11:18:40 -05:00
fu-io-channel.c trivial: reformat the whole tree to match new format 2021-08-24 11:18:40 -05:00
fu-io-channel.h trivial: reformat the whole tree to match new format 2021-08-24 11:18:40 -05:00
fu-kenv.c trivial: reformat the whole tree to match new format 2021-08-24 11:18:40 -05:00
fu-kenv.h trivial: reformat the whole tree to match new format 2021-08-24 11:18:40 -05:00
fu-mutex.h trivial: reformat the whole tree to match new format 2021-08-24 11:18:40 -05:00
fu-plugin-private.h Speed up the daemon startup by ~2% by doing dlsym much less 2021-11-09 12:02:07 +00:00
fu-plugin-vfuncs.h Speed up the daemon startup by ~2% by doing dlsym much less 2021-11-09 12:02:07 +00:00
fu-plugin.c libfwupdplugin: add a helper to set a config file to secure 2021-12-17 11:05:05 -06:00
fu-plugin.h libfwupdplugin: add a helper to set a config file to secure 2021-12-17 11:05:05 -06:00
fu-progress.c trivial: Don't reset the status when calling fu_progress_finished() 2021-11-27 07:22:50 +00:00
fu-progress.h Allow using a per-device global percentage completion 2021-09-13 14:28:15 +01:00
fu-quirks.c Add page and sector size properties to FuCfiDevice 2021-12-09 13:09:43 +00:00
fu-quirks.h Allow overriding the firmware GType from a quirk file 2021-11-08 15:53:41 +00:00
fu-security-attrs-private.h tpm: Actually add the v1.2 device 2021-11-10 14:08:08 +00:00
fu-security-attrs.c tpm: Actually add the v1.2 device 2021-11-10 14:08:08 +00:00
fu-security-attrs.h trivial: reformat the whole tree to match new format 2021-08-24 11:18:40 -05:00
fu-self-test.c Add block size properties to FuCfiDevice 2021-12-15 17:49:32 +00:00
fu-smbios-private.h trivial: reformat the whole tree to match new format 2021-08-24 11:18:40 -05:00
fu-smbios.c trivial: reformat the whole tree to match new format 2021-08-24 11:18:40 -05:00
fu-smbios.h trivial: reformat the whole tree to match new format 2021-08-24 11:18:40 -05:00
fu-srec-firmware.c trivial: Make the SREC parser more spec compliant 2021-10-22 14:58:24 +01:00
fu-srec-firmware.h trivial: reformat the whole tree to match new format 2021-08-24 11:18:40 -05:00
fu-udev-device-private.h trivial: reformat the whole tree to match new format 2021-08-24 11:18:40 -05:00
fu-udev-device.c Add support for UF2 devices 2021-12-21 10:06:18 +00:00
fu-udev-device.h Allow setting the FuUdevDevice bind-id at runtime 2021-11-05 15:00:10 +00:00
fu-usb-device-private.h trivial: reformat the whole tree to match new format 2021-08-24 11:18:40 -05:00
fu-usb-device.c Add fu_usb_device_new_with_context() helpers 2021-10-15 15:59:34 +01:00
fu-usb-device.h trivial: Fix a warning when compiling without USB support 2021-11-27 20:28:13 +00:00
fu-version.c trivial: Fix a GObjectIntrospection warning by using the correct prefix 2021-08-28 06:50:50 -05:00
fu-version.h.in trivial: Fix a GObjectIntrospection warning by using the correct prefix 2021-08-28 06:50:50 -05:00
fu-volume-private.h trivial: reformat the whole tree to match new format 2021-08-24 11:18:40 -05:00
fu-volume.c trivial: reformat the whole tree to match new format 2021-08-24 11:18:40 -05:00
fu-volume.h trivial: reformat the whole tree to match new format 2021-08-24 11:18:40 -05:00
fwupdplugin.h Add FuArchiveFirmware 2021-11-26 13:47:04 +00:00
fwupdplugin.map libfwupdplugin: add a helper to set a config file to secure 2021-12-17 11:05:05 -06:00
meson.build Add FuArchiveFirmware 2021-11-26 13:47:04 +00:00
README.md Allow using a per-device global percentage completion 2021-09-13 14:28:15 +01:00

libfwupdplugin

This library is only partially API and ABI stable. Keeping unused, unsafe and deprecated functions around forever is a maintenance burden and so symbols are removed when branching for new minor versions.

Remember: Plugins should be upstream!

Migrating from older API

  • Migrate from fu_common_is_cpu_intel() to fu_common_get_cpu_vendor()
  • Migrate from fu_firmware_strparse_uintXX() to fu_firmware_strparse_uintXX_safe()
  • Remove calls to fu_plugin_get_usb_context() and fu_plugin_set_usb_context()
  • Migrate from fu_plugin_runner_usb_device_added(), fu_plugin_runner_udev_device_added() and fu_plugin_runner_udev_device_changed() to fu_plugin_runner_backend_device_added()
  • Migrate from FuHidDevice->open() and FuHidDevice->close() to using the superclass helpers
  • Migrate from FuUsbDevice->probe(), FuUsbDevice->open() and FuUsbDevice->close() to using the superclass helpers
  • Migrate from FuUdevDevice->to_string(), FuUdevDevice->probe(), FuUdevDevice->open() and FuUdevDevice->close() to using the superclass helpers
  • Migrate from fu_device_get_protocol() to fu_device_get_protocols() and fu_device_set_protocol() to fu_device_add_protocol()
  • Migrate from fu_device_has_custom_flag() to fu_device_has_private_flag()
  • Migrate from fu_udev_device_set_readonly() to fu_udev_device_set_flags()
  • Migrate from fu_device_sleep_with_progress() to fu_progress_sleep() -- but be aware the unit of time has changed from seconds to milliseconds
  • Migrate from fu_device_get_status() to fu_progress_get_status()
  • Migrate from fu_device_set_status() to fu_progress_set_status()
  • Migrate from fu_device_get_progress() to fu_progress_get_percentage()
  • Migrate from fu_device_set_progress_full() to fu_progress_set_percentage_full()
  • Migrate from fu_device_set_progress() to fu_progress_set_steps(), fu_progress_add_step() and fu_progress_done -- see the FuProgress docs for more details!

Planned API/ABI changes for next release

  • Nothing yet.