Commit Graph

5517 Commits

Author SHA1 Message Date
Richard Hughes
42f43fe8a3 trivial: Actually disable plugins with _REQUIRE_HWID 2021-03-02 18:29:27 +00:00
Richard Hughes
d94286b9de Allow enabling plugins only matching a specific HwId
At the moment plugins are doing this a few different ways; either looping
through the HwIds manually (e.g. flashrom) or setting a custom flag that is
checked in fu_plugin_setup (e.g. uefi-recovery).

Define a standard 'Plugin' HwId quirk to simplify plugins.
2021-03-02 18:19:45 +00:00
Richard Hughes
05217338b3 uefi: Do not use fu_plugin_has_custom_flag() in _init()
This means we can defer loading the quirks until all the plugins have loaded.
2021-03-02 06:33:46 +00:00
Richard Hughes
6122034a19 Show a warning when parsing invalid quirk files
I just wasted more than two hours of my life over `DeviceID`.
2021-03-02 06:31:55 +00:00
Richard Hughes
bb87a45af3 logitech_hidpp: Wait a few ms for the hardware to settle after detach
I guess the hidraw stack is a bit faster than it was 5 years ago...
2021-03-01 17:05:01 +00:00
Richard Hughes
f6ee6043c5 dfu: Correctly erase STM32 devices when transfer size is less than sector size 2021-03-01 17:04:34 +00:00
Richard Hughes
f32e4c0666 dfu: Do not use a heuristic to set the device status
This breaks on all STM32 devices and should be unnecessary now.
2021-03-01 17:04:34 +00:00
Richard Hughes
aeba5f7f53 dfu: Fix writing to the GD32VF103 bootloader
Just set the alt_name rather than creating one giant sector and use the GD32
serial number for the sector map fixup.

See c2c8215061
2021-03-01 17:04:34 +00:00
Richard Hughes
b3f9841924 Support more than one protocol for a given device
Devices may want to support more than one protocol, and for some devices
(e.g. Unifying peripherals stuck in bootloader mode) you might not even be able
to query for the correct protocol anyway.
2021-03-01 16:14:36 +00:00
Richard Hughes
0724620f1e Remove the Hughski public key
Hughski Limited is no more, and everything should be using the LVFS cert now.
2021-03-01 08:26:41 +00:00
Piotr Drąg
faace1f6ae Update POTFILES.in 2021-02-27 13:27:39 +00:00
Mario Limonciello
76f0bab630 thunderbolt: correct an assertion if kernel failed FW read
```
18:28:37:0526 FuFirmware           fu_firmware_parse_full: assertion 'fw != NULL' failed
```
2021-02-26 15:11:51 -06:00
Richard Hughes
b13e8dae36 superio: Simplify device setup using the parent_class 2021-02-26 18:46:51 +00:00
Richard Hughes
2a0766b523 dfu: Mark the GD32 sectors as erasable 2021-02-26 18:46:28 +00:00
Richard Hughes
416562f9af dfu: Do not show a critical error when flashing footer-less binary files 2021-02-26 18:46:28 +00:00
Ricardo Cañuelo
3ed91d52a4 Support for GATT characteristic signals/notifications
NOTE that currently this is implemented for GATT characteristics only,
but can be extended to other types of objects.

Listening for property changes in a bluez characteristic requires a
long-lived connection or proxy, so this also refactors bluez device
UUIDs into a simple object that keeps the path, the proxy and the signal
id in case a callback is registered for this UUID.

An additional advantage of this is that fwupd no longer creates a
throwaway proxy object for every read and write UUID operation.
2021-02-26 18:19:06 +01:00
Richard Hughes
d271cebee5 trivial: Fix compile warning with newer libgusb versions 2021-02-26 16:44:31 +00:00
blueue
03ed377dc6
Add a function to access private member variable to let it be modified (#2947)
* Add a function to access private member variable to let it be modified in ps2 flow.
2021-02-26 07:57:08 +00:00
Norbert Kamiński
ea70435d72 contrib/README.md: Update instructions for distribution packages
Signed-off-by: Norbert Kamiński <norbert.kaminski@3mdeb.com>
2021-02-26 06:40:21 +00:00
Norbert Kamiński
60e84c617f contrib/qubes: Add Qubes wrapper source and create packages
This patch is adding the fwupd wrapper for Qubes.
The wrapper provides fwupd functionalities for Qubes R4.1.
It creates three packages (two RPMs and one Debian package):
fwupd-qubes-dom0 (RPM)
fwupd-qubes-vm (RPM)
fwupd-qubes-vm-whonix (deb)
More information about the wrapper could be found in the
contrib/qubes/README.md

Signed-off-by: Norbert Kamiński <norbert.kaminski@3mdeb.com>
2021-02-26 06:40:21 +00:00
Jeremy Soller
9beb12ad97 system76-launch: Prompt for unlock keypress if reset command is blocked 2021-02-25 12:37:24 -06:00
Richard Hughes
0b6c67a3e3 trivial: Set the GError when calling ioctl() on an un-opened device
I've not yet worked out the real bug, but it was unexpected to crash the daemon
when open failed, rather than for a critical misuse of the API.
2021-02-25 16:21:56 +00:00
Richard Hughes
14c0f7c80e trivial: Fix the debug output for FuDevice 2021-02-25 15:47:25 +00:00
Richard Hughes
2c0f115650 vli: Fix the quirk key name for the Lenovo HDMI with power 2021-02-25 15:47:25 +00:00
Richard Hughes
91337c2bdf trivial: Fix the device test for the 03x7609 device 2021-02-25 15:47:25 +00:00
Mario Limonciello
ed918a4cec dell-dock: Remove non-passive update flow support
This is effectively a lot of dead code.

* The minimum requirements for this feature are EC 00.00.00.23 and Hub2 1.42.
* "A00" docks shipped with EC 01.00.00.00 and Hub2 1.47
2021-02-25 15:47:25 +00:00
Richard Hughes
078beafb2d Add a new internal flag to opt-in to GUID matching
It is far too easy to forget to set FWUPD_DEVICE_FLAG_NO_GUID_MATCHING for new
plugins, and without it it all works really well *until* a user has two devices
of the same type installed at the same time and then one 'disappears' for hard
to explain reasons. Typically we only need it for replug anyway!

Explicitly opt-in to this rarely-required behaviour, with the default to just
use the physical and logical IDs. Also document the update behavior for each
plugin to explain why the flag is being used.

This allows you to have two identical Unifying plugged in without one of them
being hidden from the user, at the same time allowing a HIDRAW<->USB transition
when going to and from bootloader and runtime modes.

This removes the workaround added in 99eb3f06b6.

Fixes https://github.com/fwupd/fwupd/issues/2915
2021-02-25 15:47:25 +00:00
Richard Hughes
ae3ad67710 elantp: Add support for writing the firmware image
This allows for fuzzing.
2021-02-25 14:17:37 +00:00
Emily Miller
9b304fdfbd vli:fw fix to LVFS 2021-02-25 08:30:13 +00:00
Richard Hughes
253e6e4f17 Add a backend ID to the device
This is typically a Linux sysfs path or USB platform ID and is used in a
different way to the physical ID. The physical ID is only set for some devices
after setup() and depends on the subsystem list, and this would not be defined
for devices that do not match a plugin.

This also fixes an regression where the FuDeviceList fails to match the new
FuUdevDevice device in fu_device_list_get_by_guids_removed() and instead
silently gets 'fixed up' only if FWUPD_DEVICE_FLAG_NO_GUID_MATCHING is not set.

This also allows us to move the various backends device caches to FuBackend as
we now have a suitable ID that is for just the backend to use.
2021-02-24 16:49:42 +00:00
Mario Limonciello
41d874ba52 trivial: add linker script for armhf
fixes FTBFS in Debian:
https://buildd.debian.org/status/fetch.php?pkg=fwupd&arch=armhf&ver=1.5.7-1&stamp=1614100547&raw=0
2021-02-24 08:14:17 -06:00
Richard Hughes
8aebd44404 dfu: Modernize the coding style to match the other plugings
Use a Fu prefix for source objects and files and use @self.

No logic changes.
2021-02-24 10:36:45 +00:00
Mario Limonciello
f8387d8bbd trivial: don't re-run create_containers more than once a day 2021-02-23 11:26:14 -06:00
Richard Hughes
cc5cea1be6 trivial: post release version bump 2021-02-23 14:57:22 +00:00
Richard Hughes
674fccdd0d Release fwupd 1.5.7
Signed-off-by: Richard Hughes <richard@hughsie.com>
2021-02-23 14:54:50 +00:00
Richard Hughes
53de7e25a4 trivial: Only allow verify-update for plugins that support _CAN_VERIFY
If the user explicitly specifies the device-id then we do not do the front-end
filtering. If the device detaches without being able to attach then the hardware
could be left in the bootloader state.

See https://github.com/fwupd/fwupd/issues/2926#issuecomment-784234180
2021-02-23 14:48:00 +00:00
Ricardo Cañuelo
01e87896f5 Fix GVariant declarations in fu_bluez_device_write
References to opt_variant and val_variant are sunk in a subsequent
variant creation and consumed by g_dbus_proxy_call_sync. They don't need
to be freed in this context.
2021-02-23 15:35:52 +01:00
Richard Hughes
7b2621c3de trivial: Incorporate by merging the device flags
If any flags are set in the baseclass (e.g. FuDevice) then incorporating with
a FuUdevDevice or FuUefiDevice is not going to merge the flags.
2021-02-23 14:33:30 +00:00
Richard Hughes
ed4ca92eb3 synaptics-rmi: Read the PDT by calling the correct setup function 2021-02-23 12:05:28 +00:00
Richard Hughes
61e4ff7684 trivial: Fix up two gtk-doc typos 2021-02-23 10:21:52 +00:00
Richard Hughes
20d4356d39 trivial: Enable bluez by default for Fedora 2021-02-23 10:21:52 +00:00
Richard Hughes
edac3d7d3f trivial: Fix spelling of BlueZ in various places 2021-02-23 10:21:52 +00:00
Richard Hughes
7dc9592ce0 trivial: Disable bluez by default
We can enable this once we have a real plugin that actually depends on it.
2021-02-23 10:21:52 +00:00
Ricky Wu
44ee5def43
Test rts54hub rtd21xx (#2927)
* rts54hub: Optimized rtd21xx ISP flow
2021-02-23 08:34:09 +00:00
Richard Hughes
f722b30205 libfwupd: Fix adding multiple flags to devices
Ignore the request if _all_ the new flags are already set, not just any of them.
2021-02-22 22:48:56 +00:00
Richard Hughes
ed0af24406 trivial: Use fwupd_device_remove_flag() to remove a single flag 2021-02-22 22:48:56 +00:00
Richard Hughes
3f94eabe69 trivial: Use fwupd_device_add_flags() to set a single flag 2021-02-22 22:48:56 +00:00
Richard Hughes
d0ba469305 Drop unused heap pages after startup has completed
Although glibc calls this when memory gets low automatically, we can invoke it
manually when we've loaded all plugins and coldplugged all devices.

This has no effect when using proper heap benchmarks like massif, but random
Reddit users just looking at the RSS column in an 'easy-to-use memory profiler'
will see a much lower numbers.

Where this feature might actually be useful is after a libxmlb metadata rebuild
where we dirtied a lot of heap just parsing XML.
2021-02-22 21:23:35 +00:00
Richard Hughes
1bf5d32e69 trivial: Use SBAT for aarch64 on Fedora 2021-02-22 16:19:19 +00:00
Chris Coulson
cfd1f2f42a uefi-capsule: Ensure SBAT metadata is added correctly
The current approach of adding SBAT metadata after linking is creating
an image that is badly formed in 2 ways:

 * The SBAT section's file offset and size are not a multiple of the
   file alignment.

 * The SBAT section has a virtual address of zero. EDK2 loads the header
   here, and so it gets rejected.

This changes the approach to match shim, where an object file is
created with a .sbat section and then the linker takes care of placing
the section at a more appropriate virtual address.

See https://github.com/vathpela/gnu-efi/pull/14 for the section addition.
2021-02-22 16:19:19 +00:00