Commit Graph

5443 Commits

Author SHA1 Message Date
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
Richard Hughes
5d5648745e ccgx: Fix building firmware after the FuFirmwareImage conversion 2021-03-10 19:18:28 +00:00
Richard Hughes
e9d682ba25 trivial: Use two different FMAP builder.xml files 2021-03-10 19:18:28 +00:00
Richard Hughes
58d52ede18 trivial: Add fu_common_align_up() for future usage 2021-03-10 17:06:57 +00:00
Richard Hughes
55853e3f2d trivial: Add fu_firmware_get_alignment()
I need this from two different FuFirmware superclasses, and I think it makes
sense in the base object.
2021-03-10 16:13:39 +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
Emily Miller
7752ffe344 vli:ODM changed U2 pid, add json test 2021-03-10 14:20:58 +00:00
Richard Hughes
e9664e8448 trivial: Add fu_byte_array_append_bytes() helper 2021-03-10 14:01:11 +00: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
2d84386034 Remove unused, unsafe and deprecated functions from libfwupdplugin
Keeping *internal* API and ABI compatibility makes working with an already
complex codebase more mentally demanding than it needs to be.

Remember: plugins should be in-tree and upstream! If your out of tree plugin
stops working then it should be upstream.

The public-facing libfwupd will remain API and ABI stable for obvious reasons.
2021-03-09 15:47:56 +00:00
Richard Hughes
aaf74006da trivial: Fix up the Since tags for FuIfd
This was not included in the 1_5_X branch.
2021-03-09 15:35:29 +00:00
Richard Hughes
2e629313bf trivial: post branch version bump 2021-03-09 15:35:29 +00:00
Mario Limonciello
dfbb549f1e trivial: dell-dock: Save the base type in private structure
This may be used in the future for other expansion and determination.
2021-03-09 09:09:57 +00:00
Gary Lin
b283395049 uefi-capsule: Specify the section flags for .sbat
When using "objcopy -O binary" to generate AArch64 EFI images, it
silently drops the sections without "alloc" or "load" or the sections
with "unload", and this caused the content of .sbat was skipped in the
final EFI image.

This commit sets the common read-only data section flags to .sbat to
make sure the content will be copied.

Signed-off-by: Gary Lin <glin@suse.com>
2021-03-09 09:09:24 +00:00
Richard Hughes
f2849d24cc Add missing uint64 read and write helpers 2021-03-05 19:34:54 +00:00
Richard Hughes
c8d0afe33d logitech-hidpp: Use fu_device_set_battery_level() 2021-03-05 12:27:10 +00:00
Richard Hughes
a76a0da7aa Add fu_device_set_battery_level()
We want to make it as easy as possible for devices to refuse to update on low
battery, as this will likely be one of the WWCB requirements.

Ideally devices will check the battery level inside the firmware, but by also
providing the battery level to fwupd we can give the user a warning *before*
the update has started and without switching the device into bootloader mode.
2021-03-05 12:27:10 +00:00
Sean-StarLabs
2bd7b62ee9
Correct L3 GUID (#2979) 2021-03-05 11:49:29 +00:00
Richard Hughes
9024112549 ccgx: Allow ignoring CCGX firmware checksum failures
This much improves fuzzing performance.
2021-03-05 11:37:46 +00:00
JimmyYu
6d45136c25 pixart: Filter the wrong report ID 2021-03-05 12:19:33 +01:00
Richard Hughes
e19ebe7177 Add an Intel Flash Descriptor parser 2021-03-05 10:51:34 +00:00
Richard Hughes
56af6f21e9 elantp: Write the firmware in a slightly safer way 2021-03-05 09:47:38 +00:00
Richard Hughes
dd5f6247bc trivial: Remove unused source file 2021-03-05 09:42:27 +00:00
Richard Hughes
32ffdb2677 Add helper API to write in a safer way 2021-03-05 09:34:18 +00:00
Sean Rhodes
247f29ad47 Updated StarLabs guids 2021-03-04 17:56:43 +00:00