Commit Graph

22 Commits

Author SHA1 Message Date
Richard Hughes
4fec0302d2 dfu: Remove private headers that do not need to exist
These are a throwback to when we exported the DFU headers.
2019-10-14 15:24:08 -05:00
Richard Hughes
23c89edeaa dfu: Use the standard FuDevice custom flags functionality 2019-10-10 13:53:27 +01:00
Richard Hughes
5d7f5a2a87 dfu: Add some trivial, but useful, debugging for AVR DFU devices 2019-04-29 08:27:51 -05:00
Richard Hughes
36999464c7 trivial: Move a useful function out of libdfu 2019-03-19 21:17:48 +00:00
Richard Hughes
f22bd6e424 trivial: Move out the byte-array chunking to libfwupdprivate
Five plugins (soon to be 7) are linking to the DFU plugin just for this simple
segment-aware chunking functionality. Move this into common code to make
building simpler.
2018-08-22 15:14:12 +01:00
Richard Hughes
02c90d8a03 Remove the unused Emacs indenting headers from all source files
Fixes https://github.com/hughsie/fwupd/issues/636
2018-08-09 12:48:04 +01:00
Richard Hughes
87fb9ff447 Change the quirk file structure to be more efficient
This pivots the data storage so that the group is used as the preconditon
and the key name is used as the parameter to change. This allows a more natural
data flow, where a new device needs one new group and a few few keys, rather
than multiple groups, each with one key.

This also allows us to remove the key globbing when matching the version format
which is often a source of confusion.

Whilst changing all the quirk files, change the key prefixes to be more familiar
to Windows users (e.g. Hwid -> Smbios, and FuUsbDevice -> DeviceInstanceId)
who have to use the same IDs in Windows Update.

This also allows us to pre-match the desired plugin, rather than calling the
probe() function on each plugin.
2018-06-28 13:32:30 +01:00
Mario Limonciello
51308e648a Adjust all licensing to LGPL 2.1+ (Closes: #526) 2018-05-29 09:03:13 +01:00
Richard Hughes
a29711c4a1 Move the FuQuirks reference down from DfuDevice to FuDevice 2017-12-11 10:47:18 +00:00
Richard Hughes
ae252cd83c trivial: Add some common functionality from reading and writing to a buffer 2017-12-08 20:07:09 +00:00
Richard Hughes
1a16cc5e41 trivial: Remove the use of GCancellable in the dfu plugin
We're not using this, and we can simplify the code considerably now that the
library is not installed for external users.
2017-12-04 17:00:22 +00:00
Philip Withnall
a68a050f39 plugins: Remove various unused variables
Fix some compiler warnings to reduce the build noise.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2017-11-30 13:44:41 +00:00
Richard Hughes
4713f23f7f dfu: Fix attaching AVR32 devices like the XMEGA
Also, add a self test that uses the XMEGA A3BU XPLAINED board, see
https://github.com/hughsie/fwupd-test-firmware/tree/master/AVR/XMEGA-A3BU-XPLAINED-1.23
for more details about how to build the bootloader and firmware.
2017-11-23 18:48:03 +00:00
Richard Hughes
352ba1b833 dfu: Add support for the original AVR DFU protocol
This allows us to flash hardware like the Retrode and other devices using chips
like the AT90USB1287.

The test files can be re-generated using the sample code found here:
https://github.com/hughsie/fwupd-test-firmware and are designed
to be used on the AT90USBKEY2 development board.
2017-11-16 15:30:30 +00:00
Richard Hughes
37906f6aae trivial: Fix NULL/FALSE confusion in the dfu plugin 2017-11-09 14:32:25 +00:00
Richard Hughes
69fcb73a74 dfu: Fix a trivial unused variable spotted by clang 2017-11-09 12:16:12 +00:00
Richard Hughes
8517464eac dfu: Use a 24-byte chip ID for XMEGA parts so we match signature values with dfu-programmer 2017-11-07 12:40:25 +00:00
Richard Hughes
d44a5ee56d dfu: Add support for XMEGA chips
Notably, bootloaders for this class of device export an incorrect DFU interface.

Additionally, allow setting the buffer size for the UPLOAD to a larger size
than the defined device transfer size, which allows us to return the full
packet from the larger XMEGA devices.
2017-11-07 12:40:25 +00:00
Richard Hughes
79d08a327b trivial: Use a #define value for signature reads 2017-11-06 12:56:38 +00:00
Richard Hughes
674ed347d2 dfu: Use FuQuirk to map the chip ID to the AVR32 UM0424 alt-name 2017-11-02 19:08:51 +00:00
Richard Hughes
c4e9b08f41 dfu: Remove the CanDownload and CanUpload attribute when required
When the AVR device is not recognised as a supported part we can't read or
write the firmware from the chip.
2017-10-31 18:30:05 +00:00
Richard Hughes
3e1e8227be dfu: Add support for one type of AVR32 device
Currently the only supported model is the AT32UC3A3256S, more to come...
2017-10-31 18:30:05 +00:00