Commit Graph

13 Commits

Author SHA1 Message Date
Mario Limonciello
661990ed98 Convert build system to use meson tristate features
tristate features will automatically disable if dependencies marked
as required are missing.

Packagers can manually override using `auto_features`.

Link: https://mesonbuild.com/Build-options.html#features
2022-02-28 08:34:48 -06:00
Richard Hughes
28678235cd Move the fuzzing files into the plugin directories
We only had to pile everything into the src/fuzzing/firmware directory
because honggfuzz could not cope with more than one input path.

This way each plugin is self contained and easy to copy.
Also, install the fuzzing builder objects as this fixes the installed
tests when srcdir does not exist.

Based on a patch by Jan Tojnar <jtojnar@gmail.com>, many thanks.
2021-10-22 15:24:05 +01:00
Richard Hughes
52441f28a4 Allow objects to deserialize to XML
This makes a lot more sense; we can parse a firmware and export the same XML
we would use in a .builder.xml file. This allows us to two two things:

 * Check we can round trip from XML -> binary -> XML

 * Using a .builder.xml file we can check ->write() is endian safe
2021-03-15 12:07:30 +00:00
Richard Hughes
a22c13c637 Move the plugin build logic to the plugins themselves 2021-02-18 14:46:20 +00:00
Richard Hughes
a52dc06841 ccgx: Add FuFirmware->write() for DMC firmware so the parser can be fuzzed
This also fixes all the of the big endian bugs when parsing firmware.
2021-02-17 08:53:37 +00:00
Richard Hughes
b242fe4870 ccgx: Implement FuFirmware->build() to add fuzzing support 2021-02-11 14:53:43 +00:00
Ryan Lee
0942dcc413 ccgx: Add support for HP DMC dock devices 2020-06-05 13:35:54 +01:00
Richard Hughes
920713245d ccgx: Show a better error message on failure 2020-04-07 12:50:28 -05:00
Richard Hughes
81da69e73d ccgx: Implement writing firmware to flash
Correctly attach into the alternate mode after the update has completed.

The vendor was appending two files to make LVFS distribution 'easier' but I'd
much rather use the same deliverables as Windows. This also allows us to
simplify the firmware loading.
2020-03-27 13:25:40 +00:00
Richard Hughes
c6a671be7e ccgx: Get the silicon ID to map the flash parameters 2020-03-24 21:16:08 +00:00
Richard Hughes
11fa0a1e90 ccgx: Read the HPI device mode at startup 2020-03-24 21:16:08 +00:00
Richard Hughes
62aa46cb83 ccgx: Create devices when in HID and I2C modes 2020-03-23 20:02:17 +00:00
Richard Hughes
b258e514c5 ccgx: Add a firmare parser for cyacd files
These are visually similar to Intel hex files, but different enough to demand
their own parser. Multiple images can be stored in one firmware file, with the
`addr` set to the SiliconID and the `idx` set to the position in the file.
2020-03-18 18:57:06 +00:00