Commit Graph

11 Commits

Author SHA1 Message Date
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
408b056984 trivial: Use fu_byte_array_append_bytes() in more places 2021-03-15 09:46:02 +00:00
Richard Hughes
91324a13c0 pixart: Call finalize() on FuFirmware to avoid leaking 2021-03-12 15:51:25 +00:00
Richard Hughes
ee48857806 pixart: Support building firmware with the model_name metadata 2021-03-11 12:04:00 +00:00
JimmyYu
18d79a0625 pixart: Check firmware compatibility with hardware before flashing
Also add low-battery detection to ensure the update is safe to apply.
2021-03-10 16:23:18 +01:00
Richard Hughes
1981c63d58 Remove FuFirmwareImage and just use FuFirmware instead
This allows us to 'nest' firmware formats, and removes a ton of duplication.

The aim here is to deprecate FuFirmwareImage -- it's almost always acting
as a 'child' FuFirmware instance, and even copies most of the vfuncs to allow
custom types. If I'm struggling to work out what should be a FuFirmware and
what should be a FuFirmwareImage then a plugin author has no hope.

For simple payloads we were adding bytes into an image and then the image into
a firmware. This gets really messy when most plugins are treating the FuFirmware
*as* the binary firmware file.

The GBytes saved in the FuFirmware would be considered the payload with the
aim of not using FuFirmwareImage in the single-image case.
2021-03-09 21:14:12 +00:00
Richard Hughes
63a9665107 pixart: Fuzz the firmware parser 2021-02-17 08:48:45 +00:00
Richard Hughes
7fb4397f25 pixart: Set firmware version raw 2021-02-17 08:48:45 +00:00
JimmyYu
b7551c0211 pixart: Add support for more devices 2021-02-17 08:48:45 +00:00
Richard Hughes
5018d14dcd trivial: Remove executable permission on a C source file... 2021-02-16 12:26:28 +00:00
Jimmy Yu
23cd466ef1 Add plugin to update PixArt RF devices
Signed-off-by: Richard Hughes <richard@hughsie.com>
2021-01-04 17:20:13 +00:00