Commit Graph

7459 Commits

Author SHA1 Message Date
Richard Hughes
ced79fce4a Create the better device GType in the backend
It is weird to do this when constructing the object, and it allows us
to match PossiblePlugin quirk matches on potentially better instance
IDs added by the superclass.
2022-06-30 19:06:38 +01:00
Richard Hughes
bb548f15f0 Fix segfault when parsing an invalid i2c device
Confusingly, g_regex_match_full() returns FALSE and doesn't always set
the GError. Just use g_path_get_basename() and g_str_has_prefix().
2022-06-30 19:06:38 +01:00
Richard Hughes
7b96c2e6cd trivial: Implement FuMeiDevice->incorporate() 2022-06-30 19:06:38 +01:00
Richard Hughes
a694a1d915 trivial: Implement FuI2cDevice->incorporate() 2022-06-30 19:06:38 +01:00
Richard Hughes
006c75a82d trivial: Only print the MEI private data if set 2022-06-30 19:06:38 +01:00
Richard Hughes
a61bb37881 Build the quirk files into the daemon as a GResource
Interestingly, this increases the `fwupd` binary size by ~30kb but
reduces the installed size of /usr/share/fwupd/quirks.d by ~330kb.
2022-06-30 18:52:24 +01:00
Richard Hughes
17a10e4645 Fix get-details when the device requirements fail
First, fix a memory leak -- we had already done `_load_release()`
on an allocated release a few lines above and added a veto for the
get-details case. This also fixes the bug as the 2nd load is no longer
fatal as it does not exist.

Also, add some tests to check this for both the device-exists and
device-does-not-exist cases.

Fixes https://github.com/fwupd/fwupd/issues/4783
2022-06-30 18:01:27 +01:00
Richard Hughes
f6aae56f8a trivial: Do not add the requirement veto if the device does not exists 2022-06-30 18:01:27 +01:00
Richard Hughes
dd3c63bc8d trivial: Fix a memory leak when updating the device file 2022-06-30 14:23:45 +01:00
Richard Hughes
6ac6372b2a trivial: Make the FuUdevDevice->to_string() more complete 2022-06-30 14:17:53 +01:00
Richard Hughes
c7b3cd5b8a Fix a hidraw regression
Ensure that udev_parent is actually set before checking it for NULL.
2022-06-30 14:17:53 +01:00
Richard Hughes
5b17189bc1 Fix FuUdevPlugin to use 0x0 for unset
We were using 0x0 and 0xFFFF in different places, and only checking the
former in most cases. Just restrict the range to 0xFFFE and use 0x0 as
*invalid or not set* as before.
2022-06-30 14:17:53 +01:00
Richard Hughes
3d654e9b68 Enforce that the UDEV VEN:DEV is a uint16_t
This was incompletely fixed in bf256a7ca7
and changing the type means that the compiler finds any places where
we compare it with a uint32_t.
2022-06-30 14:17:53 +01:00
Crag Wang
e8fc812c29 dell-dock: update doc to clarify the inhibition of usb4 device 2022-06-30 12:13:19 +08:00
Richard Hughes
4413b7d2e9 facp: Downgrade a warning about missing FACP
This is the same as we did for the IVRS.
2022-06-29 16:44:18 +01:00
Richard Hughes
fefb034d32 trivial: Add deps when building on aarch64 2022-06-29 16:15:41 +01:00
Jerry Zhang
870d149a11 dfu: Add Force-Detach to bypass audio/video streaming check
Some Poly usb devices will STALL the dfu detach request if the
audio/video is streaming. By setting the high byte of wIndex
in detach control request to 1, it could bypass the streaming
status check.
2022-06-29 15:14:03 +01:00
Richard Hughes
7a44ab39dd synaptics-rmi: Fix a progress warning when writing an image with a signature 2022-06-29 10:47:27 +01:00
Richard Hughes
c1fc8a55e0 Always set the progress ID when setting the number of steps
This fixes a potential critical warning (seen in the hailuck plugin,
although others may be affected too) where the parent does not set the
ID before the child sets the number of steps.

It's much more helpful to have the child position for debugging anyway,
so just set it in all cases.
2022-06-29 10:47:27 +01:00
Mario Limonciello
ac55012001 Revert "trivial: move some jobs back to Ubuntu 20.04 to fix CI"
This reverts commit 8035b48158.
2022-06-28 08:29:16 -05:00
Richard Hughes
96b423e04f Add support for IFWI Intel Flash Program Tool (aka FPT) firmware 2022-06-28 10:09:58 +01:00
Richard Hughes
3236682a71 Allow decoding linear firmware with 'fwupdtool firmware-parse'
We cannot enable this for all formats as some firmware images have junk
data or are aligned in a specific way. Only do this when we know it is
safe.
2022-06-28 10:09:58 +01:00
Richard Hughes
0a7eb03704 Add a linear firmware wrapper
This allows us to parse any concatenated firmware format where the
image size is stored in the image.
2022-06-28 10:09:58 +01:00
Richard Hughes
08c7172168 Add support for parsing OptionROM firmware 2022-06-28 10:09:58 +01:00
Richard Hughes
f1542c3f9f Add support for IFWI Intel Code Partition (aka CPD) firmware 2022-06-28 10:09:58 +01:00
Chang Po-Hung
ffac50c55d add new device support pixart-rf 2022-06-27 23:08:42 -05:00
Crag Wang
f68092ea9d dell-dock: cache hub device and add it until ec is added
The usb3 hub 413c:b06f may be added to the plugin ahead of ec device
while dock type is yet known at that time. Cache the hub until ec can
tell the instance id, then add it to the plugin.
2022-06-28 06:49:24 +08:00
Richard Hughes
0491b07a93 Make the FuFirmware->parse() vfunc more helpful
This removes the 100% unused addr_end parameter and explicitly makes
the addr_start into the start offset in more cases.
2022-06-27 15:40:11 -05:00
Richard Hughes
c863c5dd95 trivial: Register the /org/freedesktop/fwupd resources globally
This means we could potentially access daemon resources from
libfwupdplugin if required.
2022-06-27 19:07:33 +01:00
Richard Hughes
0c590a7cfa trivial: Split out the quirk->XML code for future use 2022-06-27 19:06:24 +01:00
Richard Hughes
c4cdda0b87 trivial: Do not load the GResource when not required 2022-06-27 19:06:21 +01:00
Richard Hughes
e6e0de5405 system76-launch: Wait for device to re-enumerate if unlocked and reset
Fixes https://github.com/fwupd/fwupd/issues/4762
2022-06-27 06:49:12 +01:00
Mario Limonciello
39c9d9dd40 trivial: arch: generate locales in the container 2022-06-27 00:26:47 -05:00
Mario Limonciello
f3e520387a Revert "trivial: ci: switch libsystemd dependency to systemd"
This reverts commit f5c7f2b789.
2022-06-27 00:18:33 -05:00
Mario Limonciello
f349ec4273 trivial: setup buildx before logging in 2022-06-26 23:18:29 -05:00
Mario Limonciello
5c6c4f20a8 trivial: revert permissions in create_containers for now 2022-06-26 21:39:58 -05:00
Mario Limonciello
aa97dff184 trivial: allow read/write to packages 2022-06-26 21:36:44 -05:00
Mario Limonciello
95eab5b7de trivial: login to gch registry separately 2022-06-26 20:36:37 -05:00
Richard Hughes
2ca843b75c trivial: Fix self test failure on ppc64be 2022-06-26 17:28:04 -05:00
Richard Hughes
2ff407c156 trivial: Fix a compile warning when compiling without systemd 2022-06-26 17:28:04 -05:00
Richard Hughes
722360d468 synaptics-cape: Fix a big endian compile warning
The cmd_id is 16 bits wide.
2022-06-26 17:28:04 -05:00
Richard Hughes
5cdb517056 Get the UDev vendor ID from the grandparent when required 2022-06-26 17:27:05 -05:00
Mario Limonciello
f0ea7e1717 trivial: upgrade/install pip, meson and markdown if necessary during setup
This is super important because the Ubuntu CI job publishes documentation.
2022-06-26 16:01:10 -05:00
Mario Limonciello
687ee06470 trivial: get test firmware after we install git 2022-06-26 16:01:10 -05:00
Mario Limonciello
b3014c2ebf trivial: drop command to install dependencies in Ubuntu CI
it's handled by ubuntu.sh now
2022-06-26 16:01:10 -05:00
Mario Limonciello
8035b48158 trivial: move some jobs back to Ubuntu 20.04 to fix CI 2022-06-26 16:01:10 -05:00
Mario Limonciello
e828ab4d19 trivial: explicitly install python3-apt for Debian container too 2022-06-26 16:01:10 -05:00
Mario Limonciello
7e007b3bfa trivial: add sudo for debian-i386 CI build 2022-06-26 16:01:10 -05:00
Mario Limonciello
fb701a0426 Fix running fwupdtool security with a plugin allowlist
A number of plugins make assumptions that ->init() was called, but
when an allowlist is used this won't have been called.
2022-06-26 13:57:53 -05:00
Richard Hughes
b8be6daf1f trivial: Use 'priv' for plugin private data to be consistent 2022-06-26 13:57:53 -05:00