Commit Graph

5697 Commits

Author SHA1 Message Date
Richard Hughes
03726227b7 uefi-capsule: Add FreeBSD ESRT support
Based on a patch by Sergii Dmytruk <sergii.dmytruk@3mdeb.com>, many thanks.
2021-05-25 17:17:45 +01:00
Richard Hughes
6c07675558 uefi-capsule: Split out the Linux specific ESRT enumeration
This allows us to add the same functionality for FreeBSD and Windows.
2021-05-25 17:17:45 +01:00
Richard Hughes
1113a7aa11 trivial: Allow setting FuUefiDevice properties at construction 2021-05-25 17:17:45 +01:00
Richard Hughes
1b86f9836b trivial: Automatically call PkBackend::setup() when required
This reduces the amount of boilerplate in the self tests.
2021-05-25 17:17:45 +01:00
Richard Hughes
dfb46d9b56 trivial: Add fu_backend_get_devices() for future use 2021-05-25 17:17:45 +01:00
Richard Hughes
76602389ff Export FuBackend into libfwupdplugin for future use 2021-05-25 17:17:45 +01:00
Richard Hughes
560132b0d0 trivial: Fix typo preventing FreeBSD compile 2021-05-25 12:44:55 +01:00
Richard Hughes
79bbcd792a Store the BSD kernel cmdline string in the failure report
Also split out a kenv helper into common code.
2021-05-25 06:31:46 +01:00
Richard Hughes
61a4185757 Add the KernelName to the report metadata
Now we can flash firmware on FreeBSD this is important to collect.
2021-05-24 13:37:12 +01:00
Richard Hughes
d9f4b89f1b Update the subprojects to the latest released versions
This gets us FreeBSD support for all the deps.
2021-05-24 12:53:39 +01:00
Richard Hughes
69071e14e8 trivial: Use new 8BitDo name 2021-05-24 08:59:54 +01:00
Richard Hughes
d1bf0f439b trivial: Do not show a warning when building the libfwupdplugin introspection
If new enough add Xmlb into the libfwupdplugin GIR includes.
2021-05-22 14:16:42 +01:00
Matthew Eaton
b5a1d65448 Add needs-shutdown flag for Kingston vendor ID, remove wrong Kingston OUI 2021-05-22 07:48:53 +01:00
Richard Hughes
f8c3ebcafc trivial: Fix a compile warning when there is no polkit 2021-05-21 11:33:58 -05:00
Sergii Dmytruk
d01603c2f9 Don't fail if memfd_create() is not available
Signed-off-by: Norbert Kamiński <norbert.kaminski@3mdeb.com>
Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
2021-05-21 17:29:17 +01:00
Richard Hughes
d7ed64b536 trivial: Actually look for GNU tar for --xform support
This fixes the tests on FreeBSD.
2021-05-21 17:23:11 +01:00
Richard Hughes
18333da698 trivial: Add _BSD_VISIBLE to use memmem on FreeBSD 2021-05-21 17:23:11 +01:00
Richard Hughes
3cb08d81c5 trivial: Remove unused variable from self tests 2021-05-21 15:34:21 +01:00
Richard Hughes
aced9399da Also use the FirmwareBaseURI for the detach and update images
If a company has mirrored the entire LVFS repo for privacy reasons
they'll certainly want to download the images from the same place.
2021-05-20 18:51:10 +01:00
Richard Hughes
177bd86353 trivial: Fix build failure of missing fu-hash.h
Fixes https://github.com/fwupd/fwupd/issues/3272
2021-05-20 11:12:20 +01:00
Lars Wendler
2427b87379 analogix plugin requires gusb
Otherwise the following build error happens:

  ../fwupd-1.6.0/plugins/analogix/fu-analogix-device.c:54:10: error: ‘G_USB_DEVICE_DIRECTION_HOST_TO_DEVICE’ undeclared (first use in this function)
     54 |          G_USB_DEVICE_DIRECTION_HOST_TO_DEVICE,
        |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  ../fwupd-1.6.0/plugins/analogix/fu-analogix-device.c:54:10: note: each undeclared identifier is reported only once for each function it appears in
  ../fwupd-1.6.0/plugins/analogix/fu-analogix-device.c:55:10: error: ‘G_USB_DEVICE_REQUEST_TYPE_VENDOR’ undeclared (first use in this function)
     55 |          G_USB_DEVICE_REQUEST_TYPE_VENDOR,
        |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  ../fwupd-1.6.0/plugins/analogix/fu-analogix-device.c:56:10: error: ‘G_USB_DEVICE_RECIPIENT_DEVICE’ undeclared (first use in this function)
     56 |          G_USB_DEVICE_RECIPIENT_DEVICE,
        |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  ../fwupd-1.6.0/plugins/analogix/fu-analogix-device.c: In function ‘fu_analogix_device_receive’:
  ../fwupd-1.6.0/plugins/analogix/fu-analogix-device.c:96:10: error: ‘G_USB_DEVICE_DIRECTION_DEVICE_TO_HOST’ undeclared (first use in this function)
     96 |          G_USB_DEVICE_DIRECTION_DEVICE_TO_HOST,
        |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  ../fwupd-1.6.0/plugins/analogix/fu-analogix-device.c:97:10: error: ‘G_USB_DEVICE_REQUEST_TYPE_VENDOR’ undeclared (first use in this function)
     97 |          G_USB_DEVICE_REQUEST_TYPE_VENDOR,
        |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  ../fwupd-1.6.0/plugins/analogix/fu-analogix-device.c:98:10: error: ‘G_USB_DEVICE_RECIPIENT_DEVICE’ undeclared (first use in this function)
     98 |          G_USB_DEVICE_RECIPIENT_DEVICE,
        |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~

  and more...
2021-05-20 10:18:05 +01:00
Jimmy Yu
3a3a394946 pixart-rf: Fix uuid naming way 2021-05-19 16:26:17 +01:00
Richard Hughes
7f2b2b5ce3 trivial: Don't include a leading black line in firmware_packager XML 2021-05-19 08:48:25 +01:00
Norbert Kamiński
80ba3f07f2 fu-smbios.c: Add kenv support
Signed-off-by: Norbert Kamiński <norbert.kaminski@3mdeb.com>
2021-05-18 14:32:07 +01:00
Richard Hughes
99f40fa7a7 Add a FuI2cDevice to abstract I²C devices 2021-05-18 14:29:28 +01:00
Richard Hughes
2a5122b4a0 trivial: Fix a warning when compiling on Windows
Move the function prototype out of the GUnixInputStream-using ones.
2021-05-18 13:08:04 +01:00
Richard Hughes
b34b88226c modem-manager: Only shutdown the IO channel if it was created 2021-05-18 11:07:02 +01:00
Richard Hughes
35d37f8d2c logitech-hidpp: Only shutdown the IO channel if it was created 2021-05-18 11:07:02 +01:00
Richard Hughes
6174425ee1 altos: Only shutdown the IO channel if it was created 2021-05-18 11:07:02 +01:00
Richard Hughes
3ba0b29ba3 trivial: Fix critical warning when running fwupd as non-root 2021-05-18 11:06:51 +01:00
Sergii Dmytruk
1a328fd3ad Branch explicitly per OS type
Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
2021-05-18 06:49:47 +01:00
Sergii Dmytruk
3d0e624ed3 Include <efivar-dp.h> explicitly
On FreeBSD <efivar.h> doesn't include <efivar-dp.h>.

Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
2021-05-18 06:49:47 +01:00
Sergii Dmytruk
113a91985b Handle missing defaults in fu-uefi-devpath.c
FreeBSD's libefivar native implementation doesn't provide these defines.

Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
2021-05-18 06:49:47 +01:00
Richard Hughes
49d28276b8 Only lock fwupdtool when loading the engine
Some actions like firmware-parse should not need an OFD lock.
2021-05-17 22:05:52 -05:00
Richard Hughes
2dc42e6c97 colorhug: Ignore the failure to get the reply on device reset
Reading the response works on Linux, but fails on FreeBSD.
2021-05-17 16:47:12 +01:00
Richard Hughes
8bdd868c58 Do not build fwupdcethelper if noinline,noclone fails 2021-05-17 16:42:58 +01:00
Richard Hughes
7a8c61a5c3 rts54hub: Allow updating the RTD21xx devices in background mode
Original code by Ricky Wu <ricky_wu@realtek.com>
2021-05-17 16:38:29 +01:00
Richard Hughes
6bc2d155a9 trivial: Remove a build warning by including Json properly 2021-05-17 09:27:54 +01:00
Richard Hughes
b94a7b507b trivial: Do not generate fwupdplugin.vapi
We don't want applications to use libfwupdplugin, and we don't want to
support plugins written in Vala either.
2021-05-17 09:27:54 +01:00
Richard Hughes
8792afa894 trivial: Fixup some documentation to use the correct type 2021-05-17 09:27:54 +01:00
Richard Hughes
0aaf060105 Follow HTTP 3XX redirects when downloading files
This allows us to punt some smaller files onto the CDN.
2021-05-14 18:48:47 +01:00
Richard Hughes
ca2e1cc08c trivial: Add back pesign to the fwupd docker images
This is needed as fwupd-efi uses the fwupd images, and pesign is a
build-time dep of the Fedora package.
2021-05-14 17:10:32 +01:00
Aleksander Morgado
3bcd4cf44a trivial: remove QMI_REQUIRED_VERSION
We use MM_REQUIRED_VERSION to compare the running ModemManager version
with the one we require. But we don't need QMI_REQUIRED_VERSION for
anything, just remove it.

These symbols were similar to GLIB_REQUIRED_VERSION, but neither
ModemManager nor libqmi implement them in the same way as GLib does.
For the purpose of skipping deprecated APIs, ModemManager and libqmi
use the older MM_DISABLE_DEPRECATED and QMI_DISABLE_DEPRECATED macros.
2021-05-14 14:08:44 +02:00
Aleksander Morgado
dcbd979b8f trivial: fix libqmi build dependency
The build dependency of libqmi was attempted to be updated in
commit 6db69de725, but wasn't properly done, as
only the QMI_REQUIRED_VERSION symbol was updated, not the actual
pkgconfig required version.
2021-05-14 14:08:44 +02:00
Richard Hughes
dd415ab396 Add fwupd_remote_setup() to split out the 'parsing' from the 'validation' 2021-05-14 06:02:56 +01:00
Richard Hughes
2e6fee186e trivial: Fix several potential leaks when parsing remotes
This fixes several issues when calling fwupd_remote_load_from_filename()
multiple times on the same FwupdRemote.
2021-05-14 06:02:56 +01:00
Richard Hughes
6c706c74d6 trivial: Export fwupd_remote_set_filename_source() for possible future usage 2021-05-14 06:02:56 +01:00
Richard Hughes
769cbbf8af Add support for the PHAT table
On Alterlake and newer hardware the Platform Health Assessment Record
data can be used by the IHV to debug why a specific capsule update
failed. Any custom firmware loaded by the OEM can be identified and
used to further debug the root cause.
2021-05-12 12:02:33 +01:00
Richard Hughes
54d9de9290 Force the device locker to ->close() an aborted ->open()
Fixes https://github.com/fwupd/fwupd/issues/3187
2021-05-12 10:10:57 +01:00
Richard Hughes
ddc40ab595 fastboot: Add some trivial error prefix for the getvar failure 2021-05-12 10:10:57 +01:00