Richard Hughes
71c0641394
trivial: Fix a -Wunused-function warning on Windows
2022-07-10 11:15:16 +01:00
Richard Hughes
a6b96e2330
Use the SHA256 binary hash for the quirk GResource key
...
There's no security issue, but it's one less thing I have to justify
during a security review.
2022-07-09 14:56:28 +01:00
Richard Hughes
15536eb1bc
Do not make failing to parse the i2c bus number fatal
...
This acccidentally become more strict in bb548f15f0
and means there
should be no more false-positive daemon warnings at startup.
Fixes the 2nd half of https://github.com/fwupd/fwupd/discussions/4810
2022-07-08 17:24:26 +01:00
Richard Hughes
6f5ebc5492
Handle ENOTTY with the correct error code for ioctl calls
...
Fixes half of https://github.com/fwupd/fwupd/discussions/4810
2022-07-08 16:25:38 +01:00
Richard Hughes
cb0966858d
Fix fuzzing timeout in the new IFW CPD parsing
...
Limit the number of images to an order of magnitide more than we've ever seen.
Fixes https://oss-fuzz.com/testcase-detail/4842982326534144
2022-07-08 15:17:25 +01:00
Richard Hughes
7a224007f2
Add support for Flat Image Tree aka FIT firmware
2022-07-08 14:05:20 +01:00
Richard Hughes
f3755ef708
Add support for Flattened Devicetree aka FDT firmware
2022-07-08 14:05:20 +01:00
Richard Hughes
57a1270bad
Add fu_firmware_get_parent() for future use
...
Some firmware stacks images hierarchically, and it's useful to be able
to get the parent when unrolling them out into a linear format.
2022-07-05 16:47:18 +01:00
Richard Hughes
e6fee15d3c
Skip uSWID self tests when compiled without cbor support ( #4800 )
...
Fixes https://github.com/fwupd/fwupd/issues/4791
2022-07-05 10:20:46 +00:00
Richard Hughes
165b450e80
trivial: Fix a tiny memory leak caused by VENDOR_FROM_PARENT
2022-07-01 14:57:41 +01:00
Richard Hughes
be6af6d11c
trivial: Fix a tiny memory leak when parsing oprom firmware
2022-07-01 13:57:18 +01:00
Richard Hughes
de31992522
trivial: Fix a tiny memory leak in the self tests
2022-07-01 13:57:18 +01:00
Richard Hughes
91cb4e7274
trivial: Relax some timings a little to fix running valgrind
2022-07-01 13:57:18 +01:00
Richard Hughes
726d20e498
Ensure more firmware formats can round-trip to and from XML
...
This greatly improves the coverage stats too.
2022-07-01 13:57:18 +01:00
Richard Hughes
95f7d23d58
Fix FuCfuOffer XML roundtrip
2022-07-01 13:57:18 +01:00
Richard Hughes
d7479423a0
trivial: Add SUBSYS instance data if *either* of the vendor or model are set
2022-06-30 19:06:38 +01:00
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
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
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
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
0c590a7cfa
trivial: Split out the quirk->XML code for future use
2022-06-27 19:06:24 +01:00
Richard Hughes
5cdb517056
Get the UDev vendor ID from the grandparent when required
2022-06-26 17:27:05 -05:00
Richard Hughes
a70d005ea3
trivial: Use a better error message disambiguate an error message
2022-06-23 21:56:06 +01:00
Gaël PORTAY
c74b4ec438
trivial: Fix typo
2022-06-21 03:27:38 -04:00
Gaël PORTAY
299b42fe96
trivial: Make meson.build indentation consistent
2022-06-21 03:27:38 -04:00
Richard Hughes
5e899535d4
amt: Modernize the plugin and split out common functionality
...
The MEI code is soon going to be used by a new plugin, so split it
out into libfwupdplugin like we did i2c.
2022-06-21 08:10:04 +01:00
Gaël PORTAY
2454753cf7
trivial: progress: Fix documentation
...
This commit cf9ebdb703
.
2022-06-20 12:00:40 -04:00
Daniil Lunev
38fb424246
Fix setting version for udev devices
...
Change-Id: I907bb3958b624ff5f887cbc192f54448354d9d5c
2022-06-17 07:03:58 +01:00
Richard Hughes
87c4163993
trivial: Fix typo when setting the parent status
2022-06-16 19:54:46 +01:00
Richard Hughes
700ea6cf0d
Do not add 'unset' UDev vendor or model information
2022-06-15 13:09:11 +01:00
Richard Hughes
bf256a7ca7
Read the UDev vendor and model as a uint16_t
2022-06-15 13:09:11 +01:00
Richard Hughes
cf9ebdb703
Add startup profiling functionality
...
Using `sudo FWUPD_PROFILE=10 ./src/fwupd --verbose` will print a
dump of startup times onto the console so that we can debug which
plugin is slowing down system startup. For example:
../src/fu-engine.c:5409:plugins-coldplug [108.55ms]:
../plugins/amt/fu-plugin-amt.c:437:amt [27.14ms]:
:create-context [12.66ms]
:get-version [8.44ms]
:add-device [3.95ms]
2022-06-14 22:08:02 +01:00
Richard Hughes
faa7871b08
Remove duplicate ->probe() calls to speed up startup by 150ms
...
Now incorporate is fixed to copy across the properties we need in the
superclass, we don't need to do the subclass ->probe().
Note, we still need to do the subclassed ->probe() when using
FU_UDEV_DEVICE_FLAG_VENDOR_FROM_PARENT or when looking at properties
on the parent device.
This also removes the spurious 'already set GType to FuVliUsbhubDevice,
ignoring FuVliUsbhubDevice' messages when running the daemon.
2022-06-14 21:01:57 +01:00
Richard Hughes
4655e028a6
Copy more properties when doing FuUdevDevice->incorporate
...
We're supposed to be copying any private data derived during ->probe()
so we can create a superclass with the same attributes.
2022-06-14 21:01:57 +01:00
Richard Hughes
db01004cd4
Copy the possible plugins when incorporating
...
I don't think this is required, but seems safer.
2022-06-14 21:01:57 +01:00
Richard Hughes
30aab6f564
Copy the instance ID strings when incorporating
...
Also, add a test.
2022-06-14 21:01:57 +01:00
Richard Hughes
599e67cd2c
trivial: More efficiently incorporate metadata
2022-06-14 21:01:57 +01:00
Richard Hughes
2203b3ce7b
trivial: gi-docgenize some of the function comments
2022-06-14 14:36:52 -05:00