Commit Graph

31 Commits

Author SHA1 Message Date
Richard Hughes
c7ea2a2369 trivial: Fix up two compile warnings 2017-01-07 22:10:14 +00:00
Richard Hughes
190e60cd6f Load the Altos USB descriptor from ELF files 2016-09-03 16:59:02 +01:00
Richard Hughes
c68757ce4d Support writing the IHEX symbol table 2016-09-02 14:16:40 +01:00
Richard Hughes
c951e3a2ff Show the human-readable version in the 'dfu-tool dump' output 2016-09-01 14:49:55 +01:00
Richard Hughes
e5dbd75637 Add dfu_firmware_add_symbol()
This allows supported firmware to use a symbol table.
2016-09-01 10:34:25 +01:00
Richard Hughes
7920826098 trivial: Remove the version from the DFU firmware format enum
This isn't accurate, as it's used for all versions of DFU.
2016-08-26 18:44:00 +01:00
Richard Hughes
b8d2de2110 Normalize the DfuFirmwareFormat enums
Using the DFU-specification value is upsetting various tools that expect the
enum to be in order.
2016-08-26 18:44:00 +01:00
Richard Hughes
8e7f50056f Add dfu_firmware_format_from_string() 2016-08-26 18:44:00 +01:00
Richard Hughes
3667ee7b22 libdfu: Add initial ELF reading and writing support 2016-08-26 18:44:00 +01:00
Richard Hughes
e1e50dc2fd Split out the DFU file formats to separate files 2016-08-17 17:46:15 +01:00
Richard Hughes
33a518a615 Add another compile warning and fix up any build failures 2016-07-27 16:57:36 +01:00
Richard Hughes
ce38d94d5e trivial: Get rid of useless internal-only gtk-doc markup 2016-06-29 11:25:25 +01:00
Richard Hughes
903b029829 Fix big endian issues when reading and writing DFU and DfuSe files
Fixes https://github.com/hughsie/fwupd/issues/43
2016-04-03 10:46:42 +01:00
Richard Hughes
1b853eb971 Fix libdfu CRC check for big endian architectures
dfu_firmware_generate_crc32() generates a uint in the host byte order, the
proper fix is to write the checksum in LE format like the other fields.
2016-04-03 09:41:28 +01:00
Mario Limonciello
54c09e9c43 Fix libdfu CRC check for big endian architectures
This is the first fix needed for #43, there are others yet.
2016-04-02 16:07:02 -05:00
Richard Hughes
bd046c8a19 libdfu: Fix up some NULL/FALSE confusion 2016-03-18 12:33:47 +00:00
Richard Hughes
f4e8fe0763 trivial: Fix several trivial warnings on ARM 2015-12-06 17:51:10 +00:00
Richard Hughes
032596e800 libdfu: Fix several reported crashes in the inhex32 import code
This also adds the ability to write simple Intel HEX files too.
2015-12-06 16:27:16 +00:00
Richard Hughes
7c37e55459 libdfu: Add support for the draft 'DFU Metadata Table Specification' 2015-12-04 16:01:40 +00:00
Richard Hughes
4545dd70af libdfu: Add DfuCipher which is a property on a target and a firmware file
At the moment we're not doing anything smart other than looking at the
firmware filename, but in the future we might do something better.
2015-12-04 12:58:05 +00:00
Richard Hughes
71e55aafeb libdfu: Fix another bug discovered by the fuzzer 2015-12-02 08:29:59 +00:00
Richard Hughes
f7c61fcb18 libdfu: Fix a few crashers found using afl 2015-12-01 15:56:59 +00:00
Richard Hughes
1936e4afb5 libdfu: Display all the files shown with 'dfu-tool dump'
Also, show the file CRC in the debug output.
2015-12-01 14:53:04 +00:00
Richard Hughes
84b8d1f2f1 libdfu: Add dfu_firmware_get_image_by_name() 2015-11-30 09:16:58 +00:00
Richard Hughes
e7aaf39de2 libdfu: Fix multi-interface devices like the Neo Freerunner
The DFU specification specifies that only one of the DFU interfaces has to
export a functional descriptor; I assumed they all had to. Adding support
for this kind of device rapidly turned into a massive restructure and it was
all too complicated anyway.

Reorganise the code so that we can support these kinds of devices and clean up
the API so it's sane and easy to use. This also allows us to generate the
GObject introspection GIR and to also install libdfu as a shared library.

If you've got any comments about the API, please shout now as when 6.0 is
released it will become API and ABI stable.
2015-11-22 21:17:48 +00:00
Richard Hughes
e7ba943cf5 libdfu: Support download and upload to ST DfuSe devices
Also, simplify the general download and upload API now we can deal with
element data in chunks.
2015-11-20 14:14:05 +00:00
Richard Hughes
31aa1dd3df libdfu: Allow setting the alternate settings in DfuSe firmware 2015-11-15 16:52:46 +00:00
Richard Hughes
cfd399498d libdfu: Use a custom error domain 2015-11-14 17:34:08 +00:00
Richard Hughes
6d79834c55 libdfu: Generate gtk-doc documentation 2015-11-14 16:51:53 +00:00
Richard Hughes
62633af0db libdfu: Add support for DfuSe firmware
Also, move some shared stuff down from DfuTarget to DfuDevice.
2015-11-14 16:34:09 +00:00
Richard Hughes
a3acd7f711 Add support for updating USB devices with DFU
This adds a private libdfu library and also a small utility program called
dfu-tool.
2015-11-12 17:32:48 +00:00