Commit Graph

3301 Commits

Author SHA1 Message Date
Richard Hughes
2dea742004 Match the MEI UUID in quirk files
This allows us to be more specific when matching devices, and also means we get
more attributes 'for free' from the FuUdevDevice->probe().

This would allow us to have multiple device GTypes handling multiple MEI
interfaces in the same plugin., for instance, PTHI and MKHI.

The slight fly in the ointment is that the kernel does not set the 'dev' for
the mei_me devices, but it's always going to be just /dev/mei0, so hardcode it.
2022-10-12 13:17:42 +01:00
Richard Hughes
366e3a5668 trivial: Define the HECI GUIDs in a central place 2022-10-11 16:17:20 +01:00
Richard Hughes
14e7e1b587 Use EFI-style GUIDs when connecting the MEI interface
This means the GUID matches what the kernel exports in sysfs.
2022-10-11 16:17:20 +01:00
Aaron Skomra
413e33748d wacom_usb: Update quirks with new PID for v2 of 2nd-gen Intuos Pro Small
Wacom has added a new PID for a change in the second gen IPS
2022-10-10 16:56:34 -05:00
Dylan Van Assche
8243034311 plugins: modem-manager: assume firmware is unsigned
fwupd does not know if the firmware is signed or unsigned unless
the Quectel secureboot commands set this flag. Assume that the firmware
is unsigned by default, which is the case for most firmware unless they
have they support the secureboot AT commands. If that's the case, the
right flag will be set anyway.
2022-10-10 12:44:10 +01:00
Richard Hughes
c621c72367 vli: Set auto-parent-children flag for all USB hubs 2022-10-07 16:25:27 -07:00
Richard Hughes
2a2dddfdf0 vli: Remove the incorrect ParentGuid to prevent confusion
The daemon wants to auto-add the parent relationship from the analogix device
to the VLI device automatically, which is arguably more correct anyway.

No behaviour change, but the tree output in fwupdmgr will be reversed now.
2022-10-07 16:25:27 -07:00
Mario Limonciello
15c9cac1b0 add an rpath to things not compiled into a library
A harmless error shows up in debian packages at build time:
```
dpkg-shlibdeps: warning: cannot find library libfwupdplugin.so needed by debian/fwupd/usr/lib/x86_64-linux-gnu/fwupd-1.8.6/libfu_plugin_flashrom.so (ELF format: 'elf64-x86-64' abi: '0201003e00000000'; RPATH: '')
```

This doesn't cause a functional problem because libfwupdplugin has already
been loaded by the daemon by the time these libraries are loaded.

In case the `dpkg-shlibdeps` checker becomes more stringent in the future
fix the warning.
2022-10-07 14:16:37 -05:00
Richard Hughes
b244057d4f parade-lspcon: Add the AuxDeviceName for another ChromeBox 2022-10-07 16:24:55 +01:00
Richard Hughes
4e7f04b830 parade-lspcon: Fix a small memory leak when reloading the device 2022-10-07 16:24:55 +01:00
Richard Hughes
41973568a6 uefi-capsule: Try harder when trying to find the default ESP
Look for a plausible path existing, still continuing to the first entry on
failure as before. This makes it "work" for more people out-of-the-box.
2022-10-07 15:11:38 +01:00
Richard Hughes
617137922d Add some more profiling to debug custom device GType creation
It turns out using tss2_esys is slow (200ms) -- and now we know.
2022-10-07 14:41:48 +01:00
Richard Hughes
c87cbf835a modem-manager: Fix building with -Dgusb=disabled 2022-10-07 08:04:06 -05:00
Richard Hughes
3043c1d68f ccgx: Fix building with -Dgusb=disabled 2022-10-07 08:04:06 -05:00
Haowei Lo
96e832bd02 FPC: Increase max firmware size to 400KB 2022-10-06 13:32:00 +01:00
Kai Michaelis
6054d09f35
redfish: Implement updates for Supermicro machines 2022-10-06 12:49:49 +01:00
Richard Hughes
3f6f35d8c6 trivial: Fix two more plugin names 2022-10-05 12:46:04 +01:00
Richard Hughes
1c3c5d9892 Allow optionally translating request messages
Also add two more request IDs to make these specific enough to be useful.
2022-10-03 20:54:24 +01:00
Richard Hughes
1f8d3b61bb linux-tainted: Fix a daemon warning if the daemon has disabled the plugin 2022-10-03 09:34:20 +01:00
Richard Hughes
1f261ba283 Rename the source file and private data of modular plugins
This would allow us to convert more easily to a built-in plugin in the future
and means we match the source style used in 97% of the other plugins.

No logic changes.
2022-09-30 15:20:23 +01:00
Richard Hughes
fc3cfbad92 Do not check the build hash of modular plugins
We removed the abilty to easily build modular plugins, and so we don't need to
worry so much about random 3rd party modules being loaded.
2022-09-30 14:19:56 +01:00
Richard Hughes
52e9885c87 Use a higher compression preset for the UEFI splash images
This reduces the size of the archive by ~500Kb at the expense of taking a few
seconds more to compress.
2022-09-30 12:48:20 +01:00
Richard Hughes
edcdd44795 trivial: Enable all the builtin plugins
Fixes https://github.com/fwupd/fwupd/pull/4836
2022-09-30 12:30:11 +01:00
Richard Hughes
842f32b209 trivial: Fix a few more plugin names 2022-09-30 12:28:20 +01:00
Richard Hughes
a484eb769f trivial: Remove unused source file 2022-09-30 12:07:41 +01:00
Ivan Mikhanchuk
b170bc348e modem-manager: check driver name instead of bus type
Firmware update mechanism depends on the bus and driver type.
Since USB devices can be sitting on the PCI bus, use driver names
comparison instead of physical ids.
2022-09-30 12:04:40 +01:00
Richard Hughes
e8de491030 trivial: Do not require fu-hash.h for builtin plugins 2022-09-30 10:36:12 +01:00
Mario Limonciello
23747cccbc trivial: fix dfu-tool linking 2022-09-29 11:04:38 -05:00
Richard Hughes
75e3c4e8ac trivial: Use the existing plugin objects in dbxtool 2022-09-29 12:32:53 +01:00
Richard Hughes
9648eac936 trivial: Use the existing plugin objects in fwupdtpmevlog 2022-09-29 12:32:53 +01:00
Richard Hughes
b85f36ceb3 trivial: Use the existing plugin objects in fwupdate 2022-09-29 12:32:53 +01:00
Haowei Lo
653b1b67e5 dfu: Ignore FPC fingerprint readers 2022-09-28 21:46:22 +01:00
Richard Hughes
c8e0f2c475 dfu: Use more standard string parsing for DfuForceVersion 2022-09-28 21:46:22 +01:00
Richard Hughes
09b37cecb0 dfu: Allow disabling a DFU device by setting the version to 0
This would be used where the device matches the `USB\CLASS_FE&SUBCLASS_01`
instance ID, but wants to be handled in another plugin.
2022-09-28 21:46:22 +01:00
Mario Limonciello
d5585728a2 trivial: don't refer to plugindir in the build system anymore 2022-09-28 15:12:10 -05:00
Richard Hughes
99002a7a18 Build many more plugins as builtin
This reduces the plugin directory size by 2.2Mb
2022-09-28 17:01:23 +01:00
Richard Hughes
99e9e5d523 Allow compiling plugin as built-in GObjects
Allow plugins to be built into libfwupdpluginbuiltin.so and created via GType.
2022-09-28 12:52:00 +01:00
Mario Limonciello
ec0496b47a Make libfwupdplugin an internal library instead
This drops the requirement on us being so strict on a particular ABI version,
and also more strongly discourages out of tree plugin development.

We should still strive to keep API stable, and as such keep a symbol map still.

Use rpath instead for the static plugins, and set the plugin install directory
to just fwupd-$ABI$ as we're storing more than just plugins here now.
2022-09-28 10:04:12 +01:00
Haowei Lo
6cd0871fcb Add new plugin to update FPC fingerprint devices 2022-09-27 16:41:16 +01:00
Richard Hughes
c4b7f42e43 Only compress one version of the builtin-quirks
Saving the quirks in the GResource section worked well, but it made the build
system very complicated and also meant the .data section was duplicated in
both `fwupd` and `fwupdtool` -- negating a lot of the hard-fought savings.

Simplify this feature so that we just `cat` all the quirk files together, then
gzip them into a single file. This means that at startup fwupd only needs to
check the mtime of one file, and weirdly it's actually faster to load a smaller
compressed file from disk that it is to load multiple uncompressed files.
2022-09-27 12:44:04 +01:00
Richard Hughes
3195a57485 trivial: Always use g_assert_no_error() first
It's way more helpful to print the GError message than just an boolean failure.
2022-09-27 12:10:07 +01:00
waynehuang2022
22106fea81 focalfp: Add new plugin to update touchpads from focaltech 2022-09-27 09:13:08 +01:00
Dylan Van Assche
4c7906c8fd android-boot: set default version format
In case no version is found, android-boot plugin uses a fall back
version (0.0.0) but no version format is set. Therefore, fwupd uses
format 'plain' as default which is not correct as 0.0.0 is a triplet.
2022-09-25 10:53:14 +01:00
Richard Hughes
0415db6f67 Revert "trivial: Use files() rather than current_source_dir()"
This reverts commit b581fa5670 as it breaks
`ninja dist` with `-Dgresource_quirks=enabled`.
2022-09-25 10:31:14 +01:00
Richard Hughes
b581fa5670 trivial: Use files() rather than current_source_dir() 2022-09-24 09:12:14 -05:00
Richard Hughes
c73a55faa1 Remove a potential foot-gun when saving config values
If a specific plugin calls fu_plugin_set_secure_config_value() and then
fu_plugin_set_config_value() then we'll save the file with the world-readable
permissions.

Set a plugin flag to say that 'this plugin is storing sensitive details' which
allows us to use the same entrypoint and also fix up any files at startup that
do not have the correct permissions.
2022-09-22 14:47:12 +01:00
Richard Hughes
5d38e0aeea Move the getting the ESP to the context
We now have two plugins getting the ESP values, and we only allow hardcoding
the ESP in uefi_capsule.conf.

Make all this a lot simpler by moving the ESP+BDP code to `FuContext`, which
also means we can handle the override (via the config file) in the engine,
and the override (in the command line tools) using the same mechanism.

Also, automate the migration of the `OverrideESPMountPoint` -> `EspLocation`
when loading the engine.

Fixes https://github.com/fwupd/fwupd/issues/5042
2022-09-22 14:31:06 +01:00
Richard Hughes
f60af523e3 trivial: Don't print NULL in GError strings
PVS: Incorrect format: A null pointer is used.
2022-09-22 14:24:50 +01:00
Richard Hughes
d4c589cc04 trivial: Fix -Wunused-variable warning 2022-09-22 14:24:50 +01:00
Richard Hughes
2d2bde2268 trivial: Fix -Wunused-but-set-variable warning 2022-09-22 14:24:50 +01:00