Commit Graph

747 Commits

Author SHA1 Message Date
xtcui
0f7f7f2cb5 Add support for some Analogix hardware
With much help from:

 * Ricardo Cañuelo <ricardo.canuelo@collabora.com>
 * Richard Hughes <richard@hughsie.com>
2021-04-12 11:00:54 +01:00
Richard Hughes
848fb2c57f trivial: Add back help2man for arch as it uses the subproject libjcat 2021-04-12 09:55:44 +01:00
Richard Hughes
c4bc709359 Do not use help2man to build manual pages
This prevents problems when cross compiling. Using help2man is now also of
limited use; if we can just tell the user to use --help we do not need to keep
the manual in sync.

It also allows us to drop the several other supporting files that we use when
the help2man output isn't actually that useful.

Fixes https://github.com/fwupd/fwupd/issues/3025
2021-04-11 13:42:04 +01:00
Mario Limonciello
d0c6c4b323 trivial: install shellcheck from dependencies.xml 2021-04-09 11:15:27 -05:00
Mario Limonciello
681be2a0ed trivial: restore python3-pil build dependency for Ubuntu
Commit 13524af202 broke the ABI checker.
This is because it runs on the last released version, which still has
a dependency on python3-pil.

This commit can be dropped after the 1.6.x release.
2021-04-09 11:15:27 -05:00
Mario Limonciello
0b80c872b3 trivial: move all pre-commit checks into dedicated CI job
This one should launch faster than Fedora, and should fail all the jobs
way sooner.
2021-04-09 16:02:20 +01:00
Mario Limonciello
bb9390d45c trivial: Add pre-commit hooks for style 2021-04-09 16:02:20 +01:00
Mario Limonciello
1ed118d22f trivial: fixup black on a few more python files without python extensions 2021-04-09 16:02:20 +01:00
Mario Limonciello
433034d675 trivial: correct example vscode launch json parsing 2021-04-09 16:02:20 +01:00
Mario Limonciello
1f9c035788 trivial: fix some trailing whitespace problems across the project 2021-04-09 16:02:20 +01:00
Richard Hughes
13524af202 Write BMP data directly without using PIL
This allows us to drop a build-time dep.
2021-04-09 15:59:51 +01:00
Mario Limonciello
7064ec0227 trivial: ci: use black to check all python code in CI 2021-04-08 10:43:29 -05:00
Mario Limonciello
6d1afc3e87 trivial: reformat all python code with black 2021-04-08 10:43:29 -05:00
Richard Hughes
b5555003bb Detect files with CRLF line endings
Mixing Unix-style and Windows-style line endings causes some of our tools
heartache. Just standardize on the former.
2021-04-08 15:55:36 +01:00
Mario Limonciello
541a71b140 trivial: ci: disable LTO for clang (fixes: #3089) 2021-03-31 10:28:27 -05:00
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