Commit Graph

5443 Commits

Author SHA1 Message Date
Richard Hughes
91337c2bdf trivial: Fix the device test for the 03x7609 device 2021-02-25 15:47:25 +00:00
Mario Limonciello
ed918a4cec dell-dock: Remove non-passive update flow support
This is effectively a lot of dead code.

* The minimum requirements for this feature are EC 00.00.00.23 and Hub2 1.42.
* "A00" docks shipped with EC 01.00.00.00 and Hub2 1.47
2021-02-25 15:47:25 +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
Emily Miller
9b304fdfbd vli:fw fix to LVFS 2021-02-25 08:30:13 +00:00
Richard Hughes
253e6e4f17 Add a backend ID to the device
This is typically a Linux sysfs path or USB platform ID and is used in a
different way to the physical ID. The physical ID is only set for some devices
after setup() and depends on the subsystem list, and this would not be defined
for devices that do not match a plugin.

This also fixes an regression where the FuDeviceList fails to match the new
FuUdevDevice device in fu_device_list_get_by_guids_removed() and instead
silently gets 'fixed up' only if FWUPD_DEVICE_FLAG_NO_GUID_MATCHING is not set.

This also allows us to move the various backends device caches to FuBackend as
we now have a suitable ID that is for just the backend to use.
2021-02-24 16:49:42 +00:00
Mario Limonciello
41d874ba52 trivial: add linker script for armhf
fixes FTBFS in Debian:
https://buildd.debian.org/status/fetch.php?pkg=fwupd&arch=armhf&ver=1.5.7-1&stamp=1614100547&raw=0
2021-02-24 08:14:17 -06:00
Richard Hughes
8aebd44404 dfu: Modernize the coding style to match the other plugings
Use a Fu prefix for source objects and files and use @self.

No logic changes.
2021-02-24 10:36:45 +00:00
Mario Limonciello
f8387d8bbd trivial: don't re-run create_containers more than once a day 2021-02-23 11:26:14 -06:00
Richard Hughes
cc5cea1be6 trivial: post release version bump 2021-02-23 14:57:22 +00:00
Richard Hughes
674fccdd0d Release fwupd 1.5.7
Signed-off-by: Richard Hughes <richard@hughsie.com>
2021-02-23 14:54:50 +00:00
Richard Hughes
53de7e25a4 trivial: Only allow verify-update for plugins that support _CAN_VERIFY
If the user explicitly specifies the device-id then we do not do the front-end
filtering. If the device detaches without being able to attach then the hardware
could be left in the bootloader state.

See https://github.com/fwupd/fwupd/issues/2926#issuecomment-784234180
2021-02-23 14:48:00 +00:00
Ricardo Cañuelo
01e87896f5 Fix GVariant declarations in fu_bluez_device_write
References to opt_variant and val_variant are sunk in a subsequent
variant creation and consumed by g_dbus_proxy_call_sync. They don't need
to be freed in this context.
2021-02-23 15:35:52 +01:00
Richard Hughes
7b2621c3de trivial: Incorporate by merging the device flags
If any flags are set in the baseclass (e.g. FuDevice) then incorporating with
a FuUdevDevice or FuUefiDevice is not going to merge the flags.
2021-02-23 14:33:30 +00:00
Richard Hughes
ed4ca92eb3 synaptics-rmi: Read the PDT by calling the correct setup function 2021-02-23 12:05:28 +00:00
Richard Hughes
61e4ff7684 trivial: Fix up two gtk-doc typos 2021-02-23 10:21:52 +00:00
Richard Hughes
20d4356d39 trivial: Enable bluez by default for Fedora 2021-02-23 10:21:52 +00:00
Richard Hughes
edac3d7d3f trivial: Fix spelling of BlueZ in various places 2021-02-23 10:21:52 +00:00
Richard Hughes
7dc9592ce0 trivial: Disable bluez by default
We can enable this once we have a real plugin that actually depends on it.
2021-02-23 10:21:52 +00:00
Ricky Wu
44ee5def43
Test rts54hub rtd21xx (#2927)
* rts54hub: Optimized rtd21xx ISP flow
2021-02-23 08:34:09 +00:00
Richard Hughes
f722b30205 libfwupd: Fix adding multiple flags to devices
Ignore the request if _all_ the new flags are already set, not just any of them.
2021-02-22 22:48:56 +00:00
Richard Hughes
ed0af24406 trivial: Use fwupd_device_remove_flag() to remove a single flag 2021-02-22 22:48:56 +00:00
Richard Hughes
3f94eabe69 trivial: Use fwupd_device_add_flags() to set a single flag 2021-02-22 22:48:56 +00:00
Richard Hughes
d0ba469305 Drop unused heap pages after startup has completed
Although glibc calls this when memory gets low automatically, we can invoke it
manually when we've loaded all plugins and coldplugged all devices.

This has no effect when using proper heap benchmarks like massif, but random
Reddit users just looking at the RSS column in an 'easy-to-use memory profiler'
will see a much lower numbers.

Where this feature might actually be useful is after a libxmlb metadata rebuild
where we dirtied a lot of heap just parsing XML.
2021-02-22 21:23:35 +00:00
Richard Hughes
1bf5d32e69 trivial: Use SBAT for aarch64 on Fedora 2021-02-22 16:19:19 +00:00
Chris Coulson
cfd1f2f42a uefi-capsule: Ensure SBAT metadata is added correctly
The current approach of adding SBAT metadata after linking is creating
an image that is badly formed in 2 ways:

 * The SBAT section's file offset and size are not a multiple of the
   file alignment.

 * The SBAT section has a virtual address of zero. EDK2 loads the header
   here, and so it gets rejected.

This changes the approach to match shim, where an object file is
created with a .sbat section and then the linker takes care of placing
the section at a more appropriate virtual address.

See https://github.com/vathpela/gnu-efi/pull/14 for the section addition.
2021-02-22 16:19:19 +00:00
Richard Hughes
a647ae05d1 synaptics-mst: Do not allow updating a device with no customer ID
This is typically when the OEM is using the reference hardware design.

Prevent updates, as there might be a new bug introduced in the reference
firmware that only manifests on one OEM's product. It's up to the OEM to do the
testing and validation.

We need something to tie it back to a physical device model if it's using a
reference firmware and we want to update it.
2021-02-22 15:53:58 +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
Mario Limonciello
2264a2efca trivial: ci: add a workaround for arch container generation issue
This should be dropped at some point hopefully when the new
docker release has landed.
See: https://github.com/actions/virtual-environments/issues/2658
Fixes: #2894
2021-02-22 08:49:00 -06: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
Richard Hughes
ad3cfc0fea Convert MBR types to GPT GUIDs to help find the ESP
Fixes https://github.com/fwupd/fwupd/issues/2916
2021-02-22 13:00:33 +00:00
Chang Po-Hung
86d3c58e3b Add cheetos quirk in pixart-rf 2021-02-20 07:28:51 +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
f3c3adb7f0 trivial: Add some more verbose debugging to help with plugin development 2021-02-19 09:33:07 +00:00
JimmyYu
6934656959 pixart: Fix more supported PID 2021-02-19 09:06:58 +00:00
Mario Limonciello
b4b6f8910d trivial: allow 1_4_X to trigger CI builds from Github workflows 2021-02-18 14:46:15 -06:00
Richard Hughes
9df6764d93 uefi-capsule: Set the component generation to 1
See https://github.com/rhboot/shim/blob/main/SBAT.md
2021-02-18 13:23:18 -06:00
Richard Hughes
ec52942bc5 uefi-capsule: Include all the sections when using objcopy
Fixes the regression introduced in fde4b1676a
2021-02-18 13:23:18 -06:00
Richard Hughes
b4496cae81 tpm-eventlog: Fix a possible crash if not using _new() 2021-02-18 16:56:40 +00:00
Richard Hughes
2e1245728f Call the superclass directly from subclassed devices
This allows a device subclass to call the parent method after doing an initial
action, or even deliberately not call the *generic* parent method at all.

It also simplifies the plugins; you no longer have to remember what the plugin
is deriving from and accidentally clobber the wrong superclass method.
2021-02-18 16:18:34 +00: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
JimmyYu
d6cf611861 pixart: Modify the README content 2021-02-18 09:11:35 +00:00
JimmyYu
8e10abf308 pixart: Add more supported pixart devices 2021-02-18 09:11:35 +00:00
JimmyYu
618fae792f pixart: Re-define var and Guid 2021-02-18 09:11:35 +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
49527b76ca ccgx: Allow turning off the checksum verification 2021-02-17 08:53:37 +00:00