Commit Graph

2614 Commits

Author SHA1 Message Date
Richard Hughes
71d93a65fb Make sqlite optional
This isn't required when fwupd is installed on targets like a BMC.
2021-11-23 15:09:05 +00:00
Richard Hughes
e1e212553b elanfp: Add some sanity checks to the firmware parser
Fixes https://oss-fuzz.com/testcase-detail/6107550261575680
2021-11-23 14:56:47 +00:00
Richard Hughes
b2ad10a818 trivial: Work around two false positives when compiling with gcc -Os 2021-11-22 15:19:38 +00:00
Richard Hughes
c92f352393 intel-spi: Use lowercase flag names
This was missed in the addition of 40c7f7ba21
2021-11-19 12:25:06 +00:00
Richard Hughes
3e2e0aa616 trivial: Fix build error with old meson versions
On 0.58.1:

    ERROR: Bad source of type 'SharedModule' in target 'tpm-self-test'.
2021-11-19 06:54:46 +00:00
Gabriel Kerneis
3e8f09a0f7 Add HSI check that PCR registers 0-7 are not empty
Some BIOSes forget add measurements to PCR registers, which results in
all-zero checksums and breaks measured boot guarantees.

Fixes #3901
2021-11-17 16:21:52 +00:00
Richard Hughes
8f0985fb9a dfu: Fix a crash if the attach failed due to hw fault 2021-11-16 17:04:07 +00:00
Richard Hughes
571d22d9b9 dfu: Do not try to handle attach and detach in dump-firmware
This just can't work, as devices typically replug with a different VID and PID.
2021-11-16 17:04:07 +00:00
Richard Hughes
8477d248e6 dfu: Use DfuSe when the target defines an alt name
This fixes dump-firmware on AVR devices that only have one target.
2021-11-16 17:04:07 +00:00
Richard Hughes
51ba3d99bd dfu: Allow the DFU plugin to write Intel HEX firmware
This was being used in the A3BU device test, which broke when we
switched to fu_firmware_new_from_gtypes().
2021-11-16 17:04:07 +00:00
Richard Hughes
f62a2a32d0 dfu: Fix some unconverted FuProgress usage 2021-11-16 17:04:07 +00:00
Richard Hughes
d7bcb2195e ccgx: Fix a critial warning found by the fuzzer
Fixes https://oss-fuzz.com/testcase-detail/5426177995046912
2021-11-15 20:46:26 -06:00
Richard Hughes
0592552b40 elantp: Fix a tiny memory leak when parsing firmware 2021-11-15 20:45:57 -06:00
Richard Hughes
eef106213e dfu: Add some trivial debugging to locate a bug 2021-11-15 16:40:27 +00:00
Richard Hughes
9ef27052d5 altos: Remove support for the ChaosKey
The hardware is discontinued, and no further update from 1.6.7 was ever
supplied.
2021-11-15 15:17:38 +00:00
Richard Hughes
a9e696ab62 solokey: Remove support for the SoloKey device
The vendor does not intend on uploading firmware for this EOL device.
For the Solo V2 the vendor wants to use a different flashing protocol,
so all this is just dead code now.
2021-11-15 15:17:07 +00:00
Richard Hughes
7e386f8791 trivial: Do not install the fwupdtpmevlog debugging cli to save 50Kb 2021-11-15 15:01:22 +00:00
Richard Hughes
49afe450ab Use -Dcompat_cli=false to reduce the install size by over 100Kb
We don't need these binaries for green-field projects.
2021-11-15 15:01:22 +00:00
Richard Hughes
31d692f1a2 dfu: Fix all devices that rely on use-any-interface
This was a regression caused in aaa77c6f51.
2021-11-15 15:00:07 +00:00
Richard Hughes
da4f50ccf0 dfu: Fix replugging when using dfu-tool to flash hardware
All kinds of things break when using more than one GUsbContext at the
same time.
2021-11-12 15:27:01 +00:00
Richard Hughes
f9cba32625 dfu: Fix critical warning when using dfu-tool
Actually connect to the correct object.

Fixes https://github.com/fwupd/fwupd/issues/3975
2021-11-12 15:27:01 +00:00
Richard Hughes
68722ec6e4 redfish: Set SSL_VERIFYHOST=0 to fix OpenBMC auth 2021-11-11 20:47:20 +00:00
Richard Hughes
5a95cf61d8 redfish: Fix crash when specifying a URL without a port 2021-11-11 20:47:20 +00:00
Crag Wang
23e194413a dell-dock: remove require-ac flag as dock supplies the power 2021-11-11 15:55:04 +00:00
Richard Hughes
2c72b24978 thunderbolt: Use fu_device_inhibit() to correctly use UPDATABLE_HIDDEN
By not exposing either UPDATABLE or UPDATABLE_HIDDEN the device is
hidden in gnome-firmware. Do what all the other devices do.
2021-11-10 17:23:25 +00:00
Richard Hughes
c1f7ac47e8 tpm: Actually add the v1.2 device
Also, add end-to-end tests for this so it can never happen again.

Fixes https://github.com/fwupd/fwupd/issues/3972
2021-11-10 14:08:08 +00:00
Richard Hughes
683fae6be3 nvme: Fix the Samsung vendor to avoid showing junk in the UI 2021-11-09 16:09:16 +00:00
Richard Hughes
e87fc05ab9 Speed up the daemon startup by ~2% by doing dlsym much less
We were calling g_module_symbol() 2703 times, which is actually more
expensive than you'd think.

It also means the plugins are actually what we tell people they are:
A set of vfuncs that get run. The reality before that they were dlsym'd
functions that get called at pretty random times.
2021-11-09 12:02:07 +00:00
Richard Hughes
bab0778e78 uefi-capsule: Skip devices that fail coldplug
This means that if the user has a single ESRT entry with a GUID of
00000000-0000-0000-0000-000000000000 then none of them work correctly.

Fixes https://github.com/fwupd/fwupd/issues/3950
2021-11-09 07:42:05 +00:00
Richard Hughes
37a5787229 logitech-hidpp: Set the vendor name in more places 2021-11-08 15:56:17 +00:00
Richard Hughes
764df76d34 Allow overriding the firmware GType from a quirk file
This also allows us to remove quite a lot of boilerplate from plugins.
2021-11-08 15:53:41 +00:00
Richard Hughes
36d7077f65 Add a new plugin to handle MTD devices 2021-11-05 20:01:51 +00:00
Ross Burton
3147fef735 uefi-capsule: use /bin/sh in grub hook
Use . instead of source as source is a bashism.

Use /bin/sh as the interpretter as there are no strict bashisms in the
hook.

Ideally the shell expansion using `` is changed to $(), but the escaping
behaviour is complex and dash/busybox sh both support ``.
2021-11-05 12:16:23 +00:00
Richard Hughes
c33483a279 vli: Fix a tiny memory leak on idle exit 2021-11-05 12:00:42 +00:00
Richard Hughes
ba2d82cb1d uefi-recovery: Set the device context to remove a daemon warning 2021-11-05 12:00:35 +00:00
Alexey Zapparov
f6b6d77eed Build logind plugin for elogind-enabled systems 2021-11-03 10:08:34 -05:00
Richard Hughes
1a077289bc Speed up daemon startup by 15%
During my fwupd startup fu_plugin_has_custom_flag gets called 21 times
which causes all HWIDs to be enumerated with 346 calls to the quite
expensive fu_context_lookup_quirk_by_id() function.

Move the flag to a private hashset and enumerate the HWIDs only during
startup. There's nothing plugin specific about them anyway...
2021-11-03 07:14:37 +00:00
Richard Hughes
8917a11208 logitech-hidpp: Fix a tiny memory leak for an error path 2021-11-02 13:47:56 +00:00
Richard Hughes
fa5994f3aa logitech-hidpp: Fix a tiny memory leak for ID6 devices 2021-11-02 13:47:56 +00:00
Richard Hughes
510a9bfe0c Merge tpm-eventlog into the tpm plugin
This is so much less complicated.
2021-11-02 13:47:25 +00:00
Richard Hughes
b0f80757f5 Add a test UEFI device that can be used to test capsules
To use this use `sudo systemctl edit fwupd.service` and set
`Environment="FWUPD_SYSFSFWDIR=/usr/share/installed-tests/fwupd"`

Fixes https://github.com/fwupd/fwupd/issues/3441
2021-11-02 08:09:25 +00:00
Richard Hughes
e29c74180c Move the TPM handling into the TPM place
The fact that it currently lives in uefi-capsule is a historical
accident, and it doesn't really belong to tpm-eventlog either.

Fixes some of https://github.com/fwupd/fwupd/issues/3901
2021-11-01 14:51:27 +00:00
Richard Hughes
a026a177d9 Fix the CSME CVE detection
14.1.53.1649 appeared which showed that the logic was funcky.
2021-11-01 11:22:08 +00:00
Richard Hughes
a17222f8a0 trivial: Add some more details to the HSI specification 2021-11-01 08:22:29 +00:00
Richard Hughes
ad12a809e3 Add a configure option for fastboot support
Fixes https://github.com/fwupd/fwupd/issues/3920
2021-10-30 08:55:07 -05:00
James Beddek
d7bedc20af synaptics-rmi: fix meson configure when building tests
if synaptics-rmi is disabled and gnutls is not used, the configure fails

move the synaptics-rmi test check behind the "plugin_synaptics_rmi" option
2021-10-30 07:16:57 -05:00
syabbashp
3db727d460 Add support for HP Thunderbolt Dock G4 2021-10-29 18:33:15 +01:00
bennyLucky
b33a162b4c dell-dock:Add atomic support 2021-10-28 19:32:22 +08:00
Richard Hughes
9b0316ce25 linux-swap: Fix a trivial memory leak in the self tests 2021-10-27 19:08:20 +01:00
Richard Hughes
003f27311e synaptics-rmi: Fix building the self tests on s390x 2021-10-27 17:10:37 +01:00