Commit Graph

4304 Commits

Author SHA1 Message Date
Richard Hughes
f591a3594b trivial: Add fu_firmware_parse_file() helper for future use 2019-10-10 16:18:58 +01:00
Richard Hughes
341ab10808 trivial: Remove the fuzzing details for DfuPatch 2019-10-10 16:18:26 +01:00
Richard Hughes
224e991ab8 trivial: Add klass->to_string for superclassed FuFirmwareImage objects
This matches the behaviour of FuFirmware.
2019-10-10 16:16:42 +01:00
Richard Hughes
940df2eade dfu: Remove DfuPatch as no vendor actually uses this
This was a new file format to help out an OEM, but they didn't actually use it.
If we do need it in the future, it would some back as a src/ helper, not in
plugins/dfu.
2019-10-10 16:07:38 +01:00
Richard Hughes
85c34215c7 dfu: Don't wrap provided VID-PID functions 2019-10-10 13:53:27 +01:00
Richard Hughes
23c89edeaa dfu: Use the standard FuDevice custom flags functionality 2019-10-10 13:53:27 +01:00
Richard Hughes
8583184489 dfu: Use klass_device->write_firmware() directly 2019-10-10 13:53:27 +01:00
Richard Hughes
13ffa3e13f dfu: Use the generic fu_plugin_usb_device_added() function 2019-10-10 13:53:27 +01:00
Richard Hughes
b6fbf80f95 dfu: Use daemon flags to ignore devices rather than a special flag 2019-10-10 13:53:27 +01:00
Richard Hughes
79e033907b dfu: Set the device state directly to avoid proxying signals 2019-10-10 13:53:27 +01:00
Richard Hughes
f9fb2a6366 dfu: Use the built-in detach() and attach() vfuncs 2019-10-10 13:53:27 +01:00
Richard Hughes
f0eb091173 Read firmware back from the device as a FuFirmware
Returning a GBytes is not good enough when the device may be returning multiple
partitions which have to be stored as FuFirmwareImage objects.
2019-10-10 11:57:48 +01:00
Richard Hughes
48dbaadd03 dfu: Remove a pointless function 2019-10-09 20:56:38 +01:00
Richard Hughes
7301d06f23 dfu: Remove support for the Metadata Store Proposal
This was never adopted, and firmware now indicates the license in the metainfo
file rather than the DFU file itself.
2019-10-09 20:56:38 +01:00
Richard Hughes
5d064d92e0 dfu: Remove XTEA support
We don't support any hardware that actually uses this proposed standard, and
nowadays there is much better public-key encryption people can easily use.
2019-10-09 20:56:38 +01:00
Richard Hughes
52ccaa305e dfu: Remove the SREC and IHEX parsing out of the DFU plugin
libdfu used to be a grab-bag of useful firmware functions, but now with the
addition of FuFirmware we have proper shared objects for plugins to use.
2019-10-09 20:56:38 +01:00
Richard Hughes
2378ff314f ebitdo: Use klass_device->write_firmware like other plugins 2019-10-09 20:02:16 +01:00
Richard Hughes
8653e70480 trivial: Remove G_BEGIN_DECLS from all private headers 2019-10-09 20:02:16 +01:00
Richard Hughes
731875af86 Remove FU_PLUGIN_RULE_REQUIRES_QUIRK as all the plugins now use it 2019-10-09 20:02:16 +01:00
Richard Hughes
d8a8d5e776 Set all FuUdevDevice plugins to use FU_QUIRKS_PLUGIN
This speeds up startup as we're only calling fu_plugin_udev_device_added() on
plugins that can actually handle the device.
2019-10-09 20:02:16 +01:00
Mario Limonciello
83f8108def thunderbolt: recognize new 'generation' sysfs attribute
Use this attribute to determine whether or not to try to read 'native'
from the Thunderbolt NVM image at probe time.

This attribute is new to kernel 5.5.
2019-10-09 10:25:37 -04:00
Richard Hughes
c15c7835be Rename and modernize the udev plugin
The new plugin is called `optionrom` as this is the only type of image that it
parses for verification only. FuUdevDevice is also the generic parent already.
2019-10-09 14:59:54 +01:00
Richard Hughes
8523ebebf2 synaptics-rmi: Also add the product ID as a GUID without the minor version
Firmware may be suitable for all products that match the 'major ID' and so we
should provide an extra GUID to use in this case.
2019-10-09 14:18:10 +01:00
Richard Hughes
83fe59629d synaptics-rmi: Correctly set the payload length rather than hardcoding it 2019-10-08 12:32:09 +01:00
Richard Hughes
9a5f076b6b synaptics-rmi: Write the core config correctly 2019-10-08 12:32:09 +01:00
Richard Hughes
d0fbc34704 synaptics-rmi: Decode BL7 status failures as actual errors 2019-10-08 12:32:09 +01:00
Richard Hughes
5b03566465 synaptics-rmi: Add some trivial debugging to help debug a write problem 2019-10-08 12:32:09 +01:00
Mario Limonciello
e42b42bf9b trivial: uefi: Make efivarvs errors clearer (Fixes: 1330) 2019-10-07 07:23:54 -05:00
Mario Limonciello
01c2f651da trivial: uefi: don't prefix efivar errors
Although they can be useful for debugging the codepath leading to
a problem, they are also confusing when it comes to the end user
messages:

```
{error #0} linux.c:406 device_get(): readlink of /sys/block/nvme0n1/device/driver failed: No such file or directory
{error #1} linux.c:406 device_get(): readlink of /sys/block/nvme0n1/device/driver failed: No such file or directory
{error #2} linux.c:406 device_get(): readlink of /sys/block/nvme0n1/device/driver failed: No such file or directory
{error #3} linux.c:406 device_get(): readlink of /sys/block/nvme0n1/device/driver failed: No such file or directory:
Error writing to file descriptor: No space left on device
```

Whereas if they weren't shown, that last message would have been plenty.
2019-10-07 07:23:54 -05:00
Richard Hughes
42f33df3dc trivial: Remove some now-unused vfuncs 2019-10-07 12:37:21 +01:00
Richard Hughes
5c68f8c81f altos: Modernize the plugin to simplify it 2019-10-07 12:37:21 +01:00
Richard Hughes
989acf12e7 Create the custom plugin GType in common code
This reduces the amount of boilerplate in plugins.
2019-10-07 12:37:21 +01:00
Richard Hughes
7f67721432 Reduce more boilerplate in plugins 2019-10-07 12:37:21 +01:00
Richard Hughes
d6fc172ec9 synaptics-rmi: Check the correct register when querying bootloader mode 2019-10-07 11:50:49 +01:00
Mario Limonciello
d70260692f trivial: fu-engine: fix never reporting remotes
```
Uploading firmware reports helps hardware vendors to quickly identify failing and successful updates on real devices.
Upload report now? (Requires internet connection):
0.	Do not upload reports at this time, but prompt again for future updates
1.	Do not upload reports, and never ask to upload reports for future updates
2.	Upload reports just this one time, but prompt again for future updates
3.	Upload reports this time and automatically upload reports after completing future updates
1
key ReportUri not supported
```
2019-10-07 05:36:22 -05:00
Mario Limonciello
9213c5c7bf trivial: fu-util: don't show warnings for no reports to upload
```
(fwupdmgr:5605): FuMain-WARNING **: 22:16:06.048: No reports require uploading
```
2019-10-07 05:36:22 -05:00
Mario Limonciello
71d4b08445 trivial: debian: remove more conffiles from transitions (Closes: #932617) 2019-10-06 21:05:02 -05:00
Mario Limonciello
1ff1164630 trivial: debian/control*: Update for fwupdate transition
Per Steve's recommendation:
 1. In fwupd, add Provides/Replaces, plus Conflicts: against the older
    versions of fwupdate-*-signed. That will tell apt to upgrade
    cleanly and thereby switch to fwupd instead. See
    https://www.debian.org/doc/manuals/developers-reference/ch05.html#s5.9.3
2019-10-06 21:00:24 -05:00
Richard Hughes
e4ad9d27fd trivial: Fix a tiny memory leak when starting the daemon 2019-10-05 13:03:19 +01:00
Richard Hughes
9cb3c84712 modem-manager: Fix a tiny memory leak when starting the daemon 2019-10-05 13:03:02 +01:00
Richard Hughes
2524c3fd79 synaptics-rmi: Copy the behavior of rmi4utils for BL7 detach 2019-10-05 09:07:22 +01:00
Richard Hughes
1c53c0eb86 synaptics-rmi: Simplify fu_synaptics_rmi_device_read()
We don't need a double loop here as we only ever require one READ_ADDR request.
2019-10-05 09:07:22 +01:00
Richard Hughes
08ddb2b7c4 synaptics-rmi: Set the version after ->setup has run
The build_id might be overwritten in the BL-specific setup.
2019-10-05 09:07:22 +01:00
Richard Hughes
339f823ee2 synaptics-rmi: Use the correct mask when getting the bootloader mode on BL7 2019-10-05 09:07:22 +01:00
Richard Hughes
3b8a2ea47f syanptics-rmi: The build_id is 3 bytes long, not 2 2019-10-04 17:08:21 +01:00
Richard Hughes
007140bd78 synaptics-rmi: Read the config partition the same as rmi4utils 2019-10-04 15:47:16 +01:00
Richard Hughes
4b30380e78 Provide a default implementation of common FuDevice actions
This reduces the amount of boilerplate in each plugin.

    32 files changed, 156 insertions(+), 584 deletions(-)
2019-10-04 14:57:32 +01:00
Christian Kellner
7e5c7b269a thunderbolt-power: avoid checking for bolt support
Avoid checking if bolt supports force-power in coldplug (early on)
because that will dbus-activate boltd, even on systems where there
is no actual thunderbolt hardware and thus also no force-power
support. Since boltd does use the very same kernel mechanism that
fwupd would use when boltd is not around this can not lead to any
regressions.
2019-10-04 08:16:28 -05:00
Richard Hughes
0e17281997 synaptics-rmi: Add some debugging for BL7 devices 2019-10-04 10:59:08 +01:00
Yehezkel Bernat
bddfde9615 Fix usage of incorrect type for return value
This seems like a bug, as `FALSE` == `0` == `VALIDATION_PASSED`
2019-10-03 10:41:48 -05:00