Commit Graph

6886 Commits

Author SHA1 Message Date
Ricardo Cañuelo
cdb924ba8d doc: add developers guidelines and howtos 2022-01-06 10:02:18 +01:00
Richard Hughes
133e712fc9 trivial: Do not call setup() vfuncs when we're never calling coldplug
Now all plugins define custom GTypes in the _init() vfunc, and so
there's no need to actually probe devices to just get access to those.

This means you can get results from `fwupdtool get-firmware-types`
about two orders of magnitude quicker.
2022-01-05 13:46:37 +00:00
Richard Hughes
32284e1afa Load the quirks and SMBIOS in the correct order
We need to load the quirks (respecting NO_CACHE), then load the SMBIOS,
and only then match the hwids using the quick database.

This means we don't get a console warning when using fwupdtool commands
as a non-root user.
2022-01-05 13:46:37 +00:00
Richard Hughes
62a6f39364 trivial: Move the root user prompt to the engine start 2022-01-05 13:46:37 +00:00
Richard Hughes
e70f2df7f7 trivial: Fix some recently added gtk-doc markup 2022-01-05 09:51:45 +00:00
Richard Hughes
f885ab6d2a Allow patching firmware files at known offsets
This allows us to replace the 'dfu-tool replace' with a much more
controlled 'fwupdtool firmware-patch' command that patches at a set of
specific offsets.

Drop in the new functionality into the existing firmware ->write()
vfuncs so that the image headers, footers and/or checksums are correct.
2022-01-05 09:51:45 +00:00
Richard Hughes
1c62194dd3 trivial: Fix fu_common_dump_full() header when specifying both flags 2022-01-04 22:06:33 +00:00
Richard Hughes
8df102b7c0 Add fu_usb_device_add_interface() for plugins to use
It's a common action for plugins to call FuUsbDevice->open() then claim
interfaces, and then release them just before FuUsbDevice->close().

It's also something a lot of plugins get wrong, so provide common code
to handle it correctly in one place.
2022-01-04 22:05:37 +00:00
Mario Limonciello
ab7a5fc569 trvial:debian: Add Rules-Requires-Root clause 2022-01-04 14:38:16 -06:00
Mario Limonciello
12fed692e3 trivial: debian: drop unused debian/source/include-binaries 2022-01-04 14:38:16 -06:00
Mario Limonciello
07623cafa3 trivial: debian: use wildcards in lintian override for library-not-linked-against-libc 2022-01-04 14:38:16 -06:00
Mario Limonciello
7c3c796d3a trivial: debian: drop lintian overrides for EFI binary, gone from the split 2022-01-04 14:38:16 -06:00
Mario Limonciello
312ac307cb trivial: debian: Update symbols and shared library name 2022-01-04 14:38:16 -06:00
Mario Limonciello
0f35f44cb2 trivial: debian: ignore subprojects and build directory from upstream builds in same folder 2022-01-04 14:38:16 -06:00
Mario Limonciello
eff0b60b98 trivial: debian: fix my uploader email address 2022-01-04 14:38:16 -06:00
Mario Limonciello
f57a6637c9 trivial: fix man page sections
They're marked in the man page as section 8 but installed into 1.
They should be installed into 1 as they're not admin tools.
2022-01-04 14:17:43 -06:00
Richard Hughes
815a5a8a93 logitech-bulkcontroller: Assign the update interface correctly 2022-01-04 18:13:59 +00:00
Richard Hughes
c725e42e34 trivial: Fix various const issues 2022-01-03 22:46:23 +00:00
Richard Hughes
0816151045 trivial: Make fu_common_version_parse_from_format() NULL-safe 2022-01-03 22:46:23 +00:00
Richard Hughes
e17a107ce1 trivial: Cast the g_signal_connect() object to allow static analysis
This is useful when using https://gitlab.freedesktop.org/tartan/tartan
2022-01-03 22:46:23 +00:00
Richard Hughes
7c4eb1bf92 trivial: Fix an impossible-to-hit scan-build warning 2022-01-03 22:46:23 +00:00
Richard Hughes
c4590f2f25 trivial: Add some missing g_return_val_if_fail() calls 2022-01-03 22:46:23 +00:00
Richard Hughes
2e99055d1e trivial: Add some more annotations for language bindings 2022-01-03 22:46:23 +00:00
Mario Limonciello
8918a4f168 trivial: ci: don't enable debian unstable apt pins 2022-01-02 12:28:54 -06:00
Richard Hughes
736a56ccee Use the UDev devtype for quirk matching 2021-12-30 16:35:04 +00:00
Richard Hughes
0c447b3c47 trivial: Show the quirk load path when debugging 2021-12-30 16:33:25 +00:00
Richard Hughes
5af2677373 thunderbolt: Fix a trivial retimer failure path 2021-12-30 16:32:52 +00:00
Mario Limonciello
bdddb08470 trivial: snap: pull from github instead of gitlab
Github has a read-only mirror of FDO gitlab which is expected to
be more reliable than FDO gitlab.
2021-12-30 10:31:28 -06:00
Richard Hughes
7e640f81e5 trivial: Fix build warnings when compiling on Windows 2021-12-30 15:18:22 +00:00
Richard Hughes
067651c1ef trivial: Remove unused variable 2021-12-30 15:14:26 +00:00
Denis Pynkin
6fdaeb8f99 nordic-hid: add device test
Added the test for nRF52840-DK board with MCUBoot variant.
Images based on MCUBoot may be used for test automation since this
bootloader type does not have version dependencies.

To prepare the board for testing it should be flashed with MCUBoot
image variant with `nrfjprog` initially.
2021-12-30 10:24:22 +00:00
Denis Pynkin
dabc9657bc plugins/nordic-hid: support images for MCUBoot
- added images for MCUBoot bootloader
2021-12-30 10:24:22 +00:00
Denis Pynkin
25025936a2 plugins/nordic-hid: add peers and bootloader type detection
- added support of peer devices connected via dongle
- added bootloader type detection from the new 'bootloader_var' option
- fix annoying retry messages:
  mask replies stating the device is temporary busy.
  Allow to sync more precisely and without annoying messages.
- multiple fixes and enhancements
2021-12-30 10:24:22 +00:00
Richard Hughes
c9a915a579 trivial: Print all the inhibits in the --verbose output 2021-12-29 19:18:26 +00:00
Richard Hughes
f76880182f Do not allow UEFI updates when the lid is closed
Most vendors do not mirror the firmware update to an external display,
and some don't behave correctly when the lid is shut and the machine is
docked. Add this quirk just for Lenovo for now.

Fixes https://github.com/fwupd/firmware-lenovo/issues/181
2021-12-29 19:18:26 +00:00
Enzo Matsumiya
9b386965f2 nvme: ignore non-PCI NVMe devices
Ignore non-PCI NVMe devices (e.g. NVMe-over-Fabrics) when probing.
Otherwise, logs might be flooded with error messages:

03:10:53:0251 FuEngine             failed to add device /sys/devices/virtual/nvme-fabrics/ctl/nvme1: failed to find device with subsystems pci, only got nvme,nvme-fabrics

These devices are not supported as they are not on the PCI subsystem.

Signed-off-by: Enzo Matsumiya <ematsumiya@suse.de>
2021-12-29 11:13:55 -06:00
Dylan Van Assche
9d7e4309a3 modem-manager: add firmware branch AT command for Quectel EG25-G
Alternative firmwares implement AT+GETFWBRANCH to get the current firmware branch
2021-12-29 14:33:02 +00:00
Dylan Van Assche
f0016cf11e modem-manager: add firmware branch support
Some modems such as the Quectel EG25-G have alternative firmwares available.
Read the firmware branch if supported by the firmware and set it,
if not, fall back to the default branch.
2021-12-29 14:33:02 +00:00
Richard Hughes
a6d086e061 trivial: Fix precommit issue with PixArt quirk file 2021-12-29 10:44:45 +00:00
Allen_Chang
c0639e9bd3
pixart-rf: Add support for new devices 2021-12-29 09:50:21 +00:00
jyu99
278ccd1714
pixart_rf: Expand buffer size for new hardware support 2021-12-29 09:47:14 +00:00
Dylan Van Assche
e0f7087bfb modem-manager: log when modem is added
Modem removals are logged, but nothing is logged when a modem is added.
2021-12-26 11:10:13 -06:00
Richard Hughes
8e6a3f6bbb Allow devices to opt-in to metadata-provided vendor strings 2021-12-22 15:34:36 +00:00
Richard Hughes
72af1b42b4 uf2: Fix fuzzer timeout when parsing an invalid UF2 file
Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=42789
2021-12-22 11:46:03 +00:00
Richard Hughes
3fec2d8ffb trivial: Add an HSI resolution hint about kernel params 2021-12-21 10:07:05 +00:00
Richard Hughes
e5198e543d trivial: Make the HSI docs reflect reality
Fixes https://github.com/fwupd/fwupd/issues/4111
2021-12-21 10:07:05 +00:00
Richard Hughes
60d266cbc6 Add support for UF2 devices
A UF2 device exposes a VFAT block device (sometimes called a Mass
Storage Device) which has a virtual file called `INFO_UF2.TXT` where
metadata can be read. It may also have a the current firmware exported
as a file called `CURRENT.UF2` which is in a 512 byte-block UF2 format.

Writing any file to the MSD will cause the firmware to be written.
Sometimes the device will restart and the volume will be unmounted
and then mounted again. In some cases the volume may not “come back”
until the user manually puts the device back in programming mode.

Match the block devices using the VID*PID, UUID or label, and then
create a UF2 device which can be used to flash firmware.

Note: We only read metadata from allow-listed IDs to avoid causing
regressions on non-UF2 volumes. To get the UUID and label you can
use commands like:

    udisksctl info -b /dev/sda1
2021-12-21 10:06:18 +00:00
Richard Hughes
6591871192 trivial: Fix compiling with -Dbuild=library 2021-12-21 10:04:48 +00:00
Richard Hughes
56f6f99633 usi-dock: Add support for various TBT4 docks for Lenovo and HP
With much help from Victor Cheng <victor_cheng@usiglobal.com>
2021-12-21 10:04:12 +00:00
Dylan Van Assche
f6833f96c3 modem-manager: add context for fu_mm_device_udev_new
After upgrading a modem, the FuContext was missing when the modem comes back
2021-12-20 10:02:36 +00:00