Commit Graph

5517 Commits

Author SHA1 Message Date
Richard Hughes
be83a8eeea spi: Fix a oss-fuzz detected critical warning
Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=32249
2021-03-19 18:00:59 +00:00
Norbert Kamiński
76e19930a8 fwupd port for BSD distros
Signed-off-by: Norbert Kamiński <norbert.kaminski@3mdeb.com>
2021-03-19 17:05:09 +00:00
Richard Hughes
a5966f7085 trivial: Codespell fixes 2021-03-19 16:42:33 +00:00
Benson Leung
aad1b98e2c cros-ec: Add D501 Baklava device support
Baklava is based on Quiche and will work with cros-ec plugin.

fixes #3044
2021-03-18 14:29:42 -07:00
Richard Hughes
119d260bd2 trivial: Limit alignment to 2GB to fix a fuzzing crash
This meant defining alignment values in FuFirmware.

Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=32131
2021-03-17 11:14:46 +00:00
Richard Hughes
f0e77fb2ab trivial: Use fu_byte_array_append_bytes() in a few more places 2021-03-17 11:14:46 +00:00
Richard Hughes
220aa3ac42 spi: Only show the flash_master output when debugging 2021-03-17 11:12:52 +00:00
Richard Hughes
c9088e77bc trivial: Use g_memdup2() for newer GLib versions 2021-03-15 19:49:44 +00:00
Sean Rhodes
e5c67b0cde Removed PciBcr Quirk 2021-03-15 18:56:54 +00:00
Richard Hughes
aa95f30390 Allow reading the PciBcrAddr quirk from flashrom devices 2021-03-15 18:30:05 +00:00
JimmyYu
bc39faf4cf pixart: Add check result in fw upgrade response
Signed-off-by: Richard Hughes <richard@hughsie.com>
2021-03-15 13:07:13 +00:00
Richard Hughes
3b5523ebfc trivial: Build the spi plugin in arch CI 2021-03-15 12:07:30 +00:00
Richard Hughes
f4d3a365f1 fmap: Use standard FuFirmware properties 2021-03-15 12:07:30 +00: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
278c3998a5 Parse the IFD BIOS section into EFI FV and FFS2 sections 2021-03-15 10:46:39 +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
1ad1458caf dfu: Allow setting the DFU version
The 'version' shadows the variable of the same name in the FuFirmware subclass.
2021-03-15 09:46:02 +00:00
Richard Hughes
241f6cf3bb trivial: Make the fuzzer generators a little easier to understand 2021-03-15 09:45:17 +00:00
Richard Hughes
664226a350 spi: Move all the IFD parsing to the new 'spi' plugin
We do not want to export this unfinished API, and it's probably best just to
not compile it by default until it is actually useful.
2021-03-15 09:45:17 +00:00
Richard Hughes
4c0224bba1 Generate the fuzzing targets using a script
We cannot yet build them as part of the build process, as we need an installed
tree so that the FuFirmware GTypes are registered. This halfway house at least
verifies we can generate all the binary files we include in the git repo.
2021-03-15 09:44:11 +00:00
Richard Hughes
1c0ed3ab1d srec: Detect overflow to avoid adding ~4GB of 0xFF padding
Fixes https://oss-fuzz.com/testcase-detail/5468114109202432
2021-03-14 09:50:39 +00:00
Richard Hughes
752c8de149 trivial: Fix up gtk-doc comment for fu_firmware_set_size() 2021-03-13 16:23:26 +00:00
Richard Hughes
be527a8a60 trivial: Fix up the self test report for the bcm57xx binary 2021-03-13 16:16:27 +00:00
Richard Hughes
d2cdfcdb95 trivial: Fix up gtk-doc for fu_firmware_parse() 2021-03-13 16:09:35 +00:00
Benson Leung
f7832847f5 cros-ec: Allow a failure to write a section, do another write
The RO partition's USB endpoint has been observed to occasionally hiccup
(usb disconnect and reenumeration) upon reboot and initial attach, causing a
failure to update a section. Rather that making this fatal, let's set
ANOTHER_WRITE_REQUIRED and allow us to handle the new USB device after
this event.

fixes #3012
2021-03-13 07:58:05 -08:00
Richard Hughes
70904ba820 trivial: Actually print the po/test-deps failure on the console 2021-03-12 18:21:04 +00:00
Richard Hughes
91324a13c0 pixart: Call finalize() on FuFirmware to avoid leaking 2021-03-12 15:51:25 +00:00
Richard Hughes
3891171641 trivial: Fix compile if no backends are enabled
Fixes https://github.com/fwupd/fwupd/issues/3023
2021-03-12 14:19:57 +00:00
Richard Hughes
81d0502f1a cros-ec: Fix up some uses of GError 2021-03-11 13:05:43 -08:00
Richard Hughes
d27bfc08fd srec: Fix a fuzzing failure when trying to build zero sized firmware 2021-03-11 15:48:02 +00:00
Richard Hughes
42dcff32ca wacom-usb: Add support for writing firmware 2021-03-11 15:48:02 +00:00
Richard Hughes
e574a942c8 wacom-usb: Fix firmware parse regression from FuFirmwareImage removal 2021-03-11 15:48:02 +00:00
Richard Hughes
88969d10c4 srec: Actually include the address in the written data 2021-03-11 15:48:02 +00:00
Richard Hughes
74db340d93 trivial: Add fu_byte_array_align_up() for future usage 2021-03-11 15:47:13 +00:00
Ricardo Cañuelo
2619442293 pixart: Detect multiple devices of the same type
Set the logical_id to the HID_UNIQ string instead of using the vendor,
device and model info.
2021-03-11 14:38:55 +01:00
Richard Hughes
ee48857806 pixart: Support building firmware with the model_name metadata 2021-03-11 12:04:00 +00:00
Richard Hughes
8f63180ed0 trivial: Add fu_firmware_get_size()
The idea here is to return the size of the firmware, including the header,
footer or other encapsulation. It would be expected that this value would
include the alignment if provided.
2021-03-11 10:23:26 +00:00
Richard Hughes
a910070570 bcm57xx: Allow the STAGE1_VERADDR to be unset 2021-03-11 10:14:29 +00:00
Richard Hughes
5f43586877 bcm57xx: Actually write the stage1 version into the file 2021-03-11 10:14:29 +00:00
Richard Hughes
50d05164d3 solokey: Add support for writing firmware 2021-03-11 10:13:46 +00:00
Richard Hughes
7c0560c37f srec: Add support for writing firmware 2021-03-10 21:39:01 -06:00
Richard Hughes
fecd3ae4ad ebitdo: Add support for writing firmware 2021-03-10 21:33:28 -06:00
Mario Limonciello
82c3674f32 trivial: fix github workflows for master 2021-03-10 21:28:18 -06:00
Mario Limonciello
c4f4320acc fu-tool: fix a regression where activate stopped working in c7d870aa9
Activate was no longer calling coldplug meaning even if devices were
in the pending database they wouldn't activate.
2021-03-10 16:35:54 -06:00
Richard Hughes
35a5962991 synaptics-mst: Add support for writing firmware 2021-03-10 16:35:43 -06:00
Richard Hughes
e1b4b143d5 trivial: Remove two unused DFU files
We removed support for the metadata store in 7301d06f23.
2021-03-10 21:11:06 +00:00
Richard Hughes
2667e4bdc1 synaptics-rmi: Never create a zero-sized v10 container 2021-03-10 21:00:18 +00:00
Richard Hughes
db38dca4c8 trivial: Only print the FuFirmware version once... 2021-03-10 19:21:39 +00:00
Richard Hughes
b5bf812952 trivial: Fix the synaprom fuzzzing generation after the FuFirmwareImage conversion 2021-03-10 19:18:28 +00:00
Richard Hughes
b86eac9034 synaptics-rmi: Write files with valid checksum data 2021-03-10 19:18:28 +00:00