Commit Graph

29 Commits

Author SHA1 Message Date
Richard Hughes
3ed2ac8315 trivial: Unexport fu_test_get_filename()
We don't actually need either of the things it provides (looking up in source
and built, and converting to an absolute path) so just replace it with
g_build_filename() instead.

This also has the advantage that it does the right thing on Windows.
2019-11-27 12:45:35 +00:00
Richard Hughes
606fa91dae trivial: Unexport fu_test_compare_lines()
It's only used two places in the self tests.
2019-11-27 12:45:35 +00:00
Richard Hughes
8694dee4e7 trivial: Allow compiling without realpath() 2019-11-23 17:07:53 +00:00
Richard Hughes
8cc41cfa6f dfu: Make DfuFirmware derive from FuFirmware 2019-10-14 15:24:08 -05:00
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
13f1c2a4da dfu: Use FwupdInstallFlags rather than a DFU-specific version 2019-10-11 13:19:46 +01:00
Richard Hughes
940df2eade dfu: Remove DfuPatch as no vendor actually uses this
This was a new file format to help out an OEM, but they didn't actually use it.
If we do need it in the future, it would some back as a src/ helper, not in
plugins/dfu.
2019-10-10 16:07:38 +01:00
Richard Hughes
7301d06f23 dfu: Remove support for the Metadata Store Proposal
This was never adopted, and firmware now indicates the license in the metainfo
file rather than the DFU file itself.
2019-10-09 20:56:38 +01:00
Richard Hughes
5d064d92e0 dfu: Remove XTEA support
We don't support any hardware that actually uses this proposed standard, and
nowadays there is much better public-key encryption people can easily use.
2019-10-09 20:56:38 +01:00
Richard Hughes
7afd7cba0d Use FuFirmware as a container for firmware images
In many plugins we've wanted to use ->prepare_firmware() to parse the firmware
ahead of ->detach() and ->write_firmware() but this has the limitation that it
can only return a single blob of data.

For many devices, multiple binary blobs are required from one parsed image,
for instance providing signatures, config and data blobs that have to be pushed
to the device in different way.

This also means we parse the firmware *before* we ask the user to detach.

Break the internal FuDevice API to support these firmware types as they become
more popular.

This also allows us to move the Intel HEX and SREC parsing out of the dfu plugin
as they are used by a few plugins now, and resolving symbols between plugins
isn't exactly awesome.
2019-08-08 13:10:57 +01:00
Richard Hughes
dce91204c9 Fix some typos spotted using codespell 2019-04-08 12:47:53 +01:00
Richard Hughes
2aad104473 trivial: Add fu_common_bytes_compare() 2019-03-21 10:28:20 +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
Mario Limonciello
51308e648a Adjust all licensing to LGPL 2.1+ (Closes: #526) 2018-05-29 09:03:13 +01:00
Richard Hughes
7c6b94118c Add support for parsing Motorola S-record files 2018-05-01 09:16:19 +01:00
Richard Hughes
b73e70b205 trivial: Use the shared fu_test_compare_lines() in the dfu plugin 2018-01-11 09:59:34 +00:00
Richard Hughes
a2fff1f44e dfu: Remove DfuContext
Use the power of FuUsbDevice in DfuDevice to remove a lot of complicated code.
2017-12-04 17:00:22 +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
Richard Hughes
2e9df07dc5 trivial: Remove the DFU-specific hardware tests
We have end-to-end installed tests using the daemon now.
2017-11-29 16:00:25 +00:00
Richard Hughes
ff3efe77b4 trivial: Fix the DFU self tests when the ColorHug+ is connected 2017-11-13 14:07:50 +00:00
Richard Hughes
d25e2d543a trivial: Add some self tests that use the Atmel Xplained boards in DFU mode
This does mean the tests have to be run as root to work, but they are just
skipped if run as a user.
2017-11-07 12:40:25 +00:00
Richard Hughes
24c452297d dfu: Use the FuQuirk infrastructure to move the quirks out of the code
This is slightly more verbose than desired as we also have to include the quirk
information when running the dfu-tool, which does not have an already set-up
FuQuirks object as it has no plugin.
2017-11-02 19:08:51 +00:00
Richard Hughes
78c1e6c009 dfu: Correctly output Intel HEX files with > 16bit offset addresses
Also, fix the checksum to actually produce valid files...
2017-10-31 18:30:05 +00:00
Richard Hughes
c314b89316 dfu: Add DfuChunked
This allows us to segment a buffer taking into account page borders and maximum
transfer sizes.
2017-10-31 18:30:05 +00:00
Richard Hughes
9e79223ecf trivial: C99ify more for-loops 2017-09-28 09:23:52 +01:00
Richard Hughes
b3c13461e9 trivial: Use the error domain from libfwupd
This means we don't need to convert the error code in the dfu plugin.
2017-09-08 13:33:34 +01:00
Richard Hughes
a81ee67356 dfu: Use FuDeviceLocker 2017-09-07 19:00:51 +01:00
Richard Hughes
68480a2069 trivial: Move the libdfu sources to the dfu plugin 2017-09-07 18:39:23 +01:00