Commit Graph

732 Commits

Author SHA1 Message Date
Richard Hughes
2002bd5046 trivial: Fix a compile failure with new GLib versions
GLib now 'helpfully' includes type_traits in gmacros.h -- which now explodes
when compiling with a C++ compiler.
2021-03-21 20:18:34 +00:00
Richard Hughes
276baf12f9 trivial: Rename spi to intel-spi as it's all Intel specific
If we need to export the EFI symbols into libfwupdplugin for other plugins we
can do that when we need them.
2021-03-20 12:24:27 +00:00
Richard Hughes
a5966f7085 trivial: Codespell fixes 2021-03-19 16:42:33 +00:00
Richard Hughes
3b5523ebfc trivial: Build the spi plugin in arch CI 2021-03-15 12:07:30 +00:00
Richard Hughes
278c3998a5 Parse the IFD BIOS section into EFI FV and FFS2 sections 2021-03-15 10:46:39 +00:00
Richard Hughes
241f6cf3bb trivial: Make the fuzzer generators a little easier to understand 2021-03-15 09:45:17 +00:00
Richard Hughes
664226a350 spi: Move all the IFD parsing to the new 'spi' plugin
We do not want to export this unfinished API, and it's probably best just to
not compile it by default until it is actually useful.
2021-03-15 09:45:17 +00:00
Richard Hughes
2d84386034 Remove unused, unsafe and deprecated functions from libfwupdplugin
Keeping *internal* API and ABI compatibility makes working with an already
complex codebase more mentally demanding than it needs to be.

Remember: plugins should be in-tree and upstream! If your out of tree plugin
stops working then it should be upstream.

The public-facing libfwupd will remain API and ABI stable for obvious reasons.
2021-03-09 15:47:56 +00:00
Richard Hughes
e19ebe7177 Add an Intel Flash Descriptor parser 2021-03-05 10:51:34 +00:00
Mario Limonciello
5a832194f4 trivial: ci: fix windows build 2021-03-04 10:45:10 -06:00
Norbert Kamiński
ea70435d72 contrib/README.md: Update instructions for distribution packages
Signed-off-by: Norbert Kamiński <norbert.kaminski@3mdeb.com>
2021-02-26 06:40:21 +00:00
Norbert Kamiński
60e84c617f contrib/qubes: Add Qubes wrapper source and create packages
This patch is adding the fwupd wrapper for Qubes.
The wrapper provides fwupd functionalities for Qubes R4.1.
It creates three packages (two RPMs and one Debian package):
fwupd-qubes-dom0 (RPM)
fwupd-qubes-vm (RPM)
fwupd-qubes-vm-whonix (deb)
More information about the wrapper could be found in the
contrib/qubes/README.md

Signed-off-by: Norbert Kamiński <norbert.kaminski@3mdeb.com>
2021-02-26 06:40:21 +00:00
Richard Hughes
078beafb2d Add a new internal flag to opt-in to GUID matching
It is far too easy to forget to set FWUPD_DEVICE_FLAG_NO_GUID_MATCHING for new
plugins, and without it it all works really well *until* a user has two devices
of the same type installed at the same time and then one 'disappears' for hard
to explain reasons. Typically we only need it for replug anyway!

Explicitly opt-in to this rarely-required behaviour, with the default to just
use the physical and logical IDs. Also document the update behavior for each
plugin to explain why the flag is being used.

This allows you to have two identical Unifying plugged in without one of them
being hidden from the user, at the same time allowing a HIDRAW<->USB transition
when going to and from bootloader and runtime modes.

This removes the workaround added in 99eb3f06b6.

Fixes https://github.com/fwupd/fwupd/issues/2915
2021-02-25 15:47:25 +00:00
Richard Hughes
ae3ad67710 elantp: Add support for writing the firmware image
This allows for fuzzing.
2021-02-25 14:17:37 +00:00
Richard Hughes
20d4356d39 trivial: Enable bluez by default for Fedora 2021-02-23 10:21:52 +00:00
Richard Hughes
1bf5d32e69 trivial: Use SBAT for aarch64 on Fedora 2021-02-22 16:19:19 +00:00
Richard Hughes
a76de3279b Add a test BLE plugin for a demo 2021-02-22 16:53:41 +01:00
Ricardo Cañuelo
536fb85e21 Add initial support for Bluez bluetooth devices
Bare skeleton for what will be the Bluez backend and the base bluetooth
device class.
2021-02-22 16:53:41 +01:00
Richard Hughes
5f9e4730f1 synaptics-mst: Read the customer ID (board ID) in a more safe way
Also split out the firmware parsing to an object so we can check the firmware
using firmware-parse and also fuzz it.

See also: https://github.com/fwupd/fwupd/issues/1665
2021-02-22 13:57:34 +00:00
Mario Limonciello
c52079f3eb trivial: don't hardcode expected plugins list for CI
Let these get turned on no matter what we change in daemon.conf
2021-02-19 14:27:28 -06:00
Mario Limonciello
707b0f367f trivial: install any missing dependencies in containers
some of these might not be present if the containers got out of
sync.  it will be a no-op at worst.
2021-02-19 10:24:14 -06:00
Richard Hughes
a22c13c637 Move the plugin build logic to the plugins themselves 2021-02-18 14:46:20 +00:00
Richard Hughes
90254a5152 csr: Rename plugin to dfu-csr as it depends on the prefixed plugin 2021-02-18 14:46:20 +00:00
Mario Limonciello
d2130f73a3 trivial: Rename meson option tpm->plugin_tpm 2021-02-18 14:46:20 +00:00
Richard Hughes
a52dc06841 ccgx: Add FuFirmware->write() for DMC firmware so the parser can be fuzzed
This also fixes all the of the big endian bugs when parsing firmware.
2021-02-17 08:53:37 +00:00
Richard Hughes
63a9665107 pixart: Fuzz the firmware parser 2021-02-17 08:48:45 +00:00
Morten Linderud
8525aaf2d3 contrib/PKGBUILD: Ensure pkgver gets expanded as an bash variable
Signed-off-by: Morten Linderud <morten@linderud.pw>
2021-02-16 10:40:07 -06:00
Mario Limonciello
a862473928 trivial: debian: update signing template to match downstream 2021-02-16 08:05:49 -06:00
Richard Hughes
41ad677d8c trivial: Disable clang scan-build
It is causing CI to fail, and signal-to-noise ratio is now basically zero.
2021-02-16 11:04:47 +00:00
Richard Hughes
6d656a940d Allow building without SBAT metadata
Two reasons:

 * It seems a bit antisocial to hard-require all this data without fair warning
 * The aarch64 pesign crashes when trying to sign the binary with SBAT metadata
2021-02-16 11:04:47 +00:00
Richard Hughes
124f2295ee trivial: Untie efi_os_dir from the SBAT distro ID
We happily fallback with an unset -Defi_os_dir and it gets confusing explaining
why the EFI dir needs to be set on a non-supported system.

In practice they'll probably have the same eventual value on most supported
distributions.

Fixes https://github.com/fwupd/fwupd/issues/2873
2021-02-12 16:01:00 +00:00
Richard Hughes
b242fe4870 ccgx: Implement FuFirmware->build() to add fuzzing support 2021-02-11 14:53:43 +00:00
Richard Hughes
fa840c1c9a trivial: Do not reuse 'build' for the oss-fuzz build
This fixes a compile failure if ldflags are different between runs.
2021-02-11 14:53:43 +00:00
Javier Martinez Canillas
378b00018b uefi-capsule: Add SBAT metadata to the fwupd EFI binary
The Secure Boot Advanced Targeting (SBAT) [0] is a Generation Number Based
Revocation mechanism that is meant to replace the DBX revocation file list.

Binaries must contain a .sbat data section that has a set entries, each of
them consisting of UTF-8 strings as comma separated values. Allow to embed
this information into the fwupd EFI binary at build time.

The SBAT metadata must contain at least two entries. One that defines the
SBAT version used and another one that defines the component generation.

Downstream users can add additional entries if have changes that make them
diverge from the upstream code and potentially add other vulnerabilities.

[0]: https://github.com/rhboot/shim/blob/sbat/SBAT.md
2021-02-10 16:40:59 +00:00
Richard Hughes
9303fedae0 trivial: Use json-glib from master to get a fuzzing crash fix
See 7711cbc7f8
2021-02-09 19:49:43 +00:00
Richard Hughes
2efa948b54 trivial: Add hailuck fuzzer to oss-fuzz 2021-02-09 16:37:25 +00:00
Richard Hughes
a84be50853 trivial: Do not invalidate timestamps for the Fedora package 2021-02-09 13:14:45 +00:00
Richard Hughes
01a30aa6de Add support for oss-fuzz 2021-02-08 09:17:03 +00:00
Mario Limonciello
b71b273c87 trivial: install_dell_bios_exe: fixup uefi-capsule -> uefi_capsule
Fixes: #2840
2021-02-07 23:49:27 -06:00
Mario Limonciello
b5481f24d3 trivial: contrib/install_dell_bios_exe.py: recognize the plugin rename
uefi was renamed to uefi-capsule and now this script forgot the change.
Allow both to work so this script runs on new or older fwupd.

Fixes: #2840
2021-02-04 10:50:19 -06:00
Mario Limonciello
c794b754a6 trivial: Make it easier to know what packages to install to let
helper scripts run.

Fixes: #2836
2021-02-01 16:13:32 -06:00
Richard Hughes
6de10e118c Allow downloading firmware from IPFS
Only a small amount of the firmware on the LVFS will be available. The user
can use --ipfs on the command line for testing, or change the system-wide
default in /etc/fwupd/daemon.conf.

The IPFS daemon and command line client will need to be installed manually.
2021-02-01 19:33:31 +00:00
Richard Hughes
774b37cd65 trivial: Allow overriding symbol versions where required
If C struct turns to a GObject, we don't always want the _get_type() symbol to
be the same version as the _new() symbol.
2021-01-28 17:41:46 +00:00
Mario Limonciello
fcc9dcc0e5 trivial: drop Jared from signing template uploaders 2021-01-25 20:23:47 -06:00
Jeremy Soller
fb3b349f16 system76-launch: Add a plugin for the System76 Launch Configurable Keyboard
This plugin supports reading the keyboard firmware version at runtime and
rebooting the keyboard to USB DFU mode. Tested with firmware uploaded to
embargo-system76.
2021-01-23 20:28:16 +00:00
Mario Limonciello
b543446fda Add a CI test to make sure we can always link to fwupdplugin
Based on a patch from Simon McVittie on
https://salsa.debian.org/efi-team/fwupd/-/merge_requests/4

Suggested-by: Simon McVittie <smcv@debian.org>
2021-01-22 14:01:25 -06:00
Simon McVittie
4289c1665c trivial: debian: Add trivial compile/link/run test for libfwupd-dev
Tests like these are a surprisingly effective way to detect packaging
mistakes.

Reproduces: #980691, #980684
2021-01-21 09:57:25 -06:00
Simon McVittie
fe36968d5e trivial: debian: d/control.in: Add missing -dev dependencies
Each -dev package needs to depend on all dependencies' -dev packages
that are required when linking against the included library with
pkg-config.

Closes: #980691, #980684
2021-01-21 09:57:14 -06:00
Mario Limonciello
5791b3df94 trivial: debian: remove ata.conf on upgrade (Closes: #980570) 2021-01-20 14:16:47 -06:00
Richard Hughes
9c1bdf68be trivial: Split off a subpackage for the UX capsule data
This makes the CoreOS image over 1Mb smaller, which is over 30% of the size of
the base fwupd package.
2021-01-20 11:03:20 +00:00