Commit Graph

4304 Commits

Author SHA1 Message Date
Mario Limonciello
21e7faa78b uefi: Move fwupdate into bindir
Intended to be executed by users for debugging purposes, create a man
page as well.
2020-02-20 09:02:11 -06:00
Mario Limonciello
bf6d455687 Move fwupdtool and fwupdagent into bindir
These are intended to be executed by users (albeit for debugging and
advanced users) and shouldn't be left as an internal implementation
per FHS 3.0.
2020-02-20 09:02:11 -06:00
Richard Hughes
334ba7994c trivial: Add helper fu_plugin_get_config_value_boolean() 2020-02-20 14:55:10 +00:00
Richard Hughes
aac406270c Use the system provided flashrom on Fedora 2020-02-20 12:57:21 +00:00
Richard Hughes
0f66a0236e Add a plugin vfunc to run after subclassed FuDevice creation
Sometimes the plugin will want to influence the subclassed device, for instance
by reading a per-plugin config file. At the moment there's no way to do this,
as even _device_registered() is explicitly designed for devices *not* created
by the plugin itself.

Even if _device_registered() was changed to include the plugin creating the
object it would still happen well after the device has done _probe() and/or
_setup() and would probably be too late to do anything useful.
2020-02-19 19:29:14 +00:00
Tomas Winkler
457a7c37ec ci: use standalone script to generate build dependencies
Sometimes it is desirable to create a build environment
outside of docker.
Move dependencies parser to a standalone python script
and call it from generate_docker.py

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
2020-02-18 17:40:39 -06:00
Mario Limonciello
af774426c7 trivial: add libglib2.0-doc to debian/ubuntu build dependencies 2020-02-18 11:22:58 -06:00
Laurent Bigonville
81e359199b Move the daemons from /usr/lib/fwupd to /usr/libexec/fwupd
This is supported since debian policy version 4.1.5 (FHS 3.0)
2020-02-18 11:22:58 -06:00
Laurent Bigonville
022d4fa708 debian/control.in: Add libglib2.0-doc to Build-Depends-Indep
This allows the links between the documentations files to be properly
generated
2020-02-18 11:22:58 -06:00
Richard Hughes
4226630853 Use the recently released flashrom v1.2 2020-02-17 14:01:58 +00:00
Richard Hughes
6f8a3da8f0 Generate an additional UEFI quirk file using the stable LVFS metadata
The UEFI ESRT table just gives us a table of GUIDs with some basic flags, and
isn't very useful to end users. This is acceptable for Dell as there is only
typically one ESRT entry, which is for the system firmware. On typical Lenovo
hardware there might be half-a-dozen different 'Device' entries which all look
very similar.

As it's not possible to get a channel-of-data from the ODMs to fwupd, use the
existing LVFS metadata to generate some better names for these devices.
Although this looks like a lot of repeated data, libxmlb helpfully dedupes the
strings for us, making the quirk store only slightly larger.

Also, I've deliberately made this a manual step as we're not going to have
internet access on distro builders, and I'd also like the fwupd tarball output
to be deterministic and repeatable.
2020-02-14 17:14:24 +00:00
Mario Limonciello
55f4569120 trivial: circleci: move to golang 1.9
Hopefully fixes CI promotion issues on new releases.
2020-02-14 10:54:13 -06:00
Mario Limonciello
026f0e0d28 trivial: contrib/debian: Add a diff ignore for vscode in debian packages 2020-02-14 10:31:47 -06:00
Mario Limonciello
df6a9464d5 trivial: contrib/debian: refresh standards version 2020-02-14 10:31:45 -06:00
Bhaskar Upadhaya
73461ca1b7 uefi: Apply capsule update even with single valid capsule
Currently if there is an invalid boot entry for firmware update, the fwupd
EFI program will not call UpdateCapsule(), even if there is a valid entry.

For example, if the following entries exist the firmware update will fail:

HD(1,GPT,A672BBCA-325E-4D6F-91E1-DD57FAA85A9C)/\EFI\rhel\fw\fwupdate-6cialq.cap ... /*Valid entry*/
HD(1,GPT,E8176B29-6F73-43F2-AE8E-05E09DE20EE5)/\EFI\fedora\fw\fwupd-6dcbd5ed-e82d-4c44-bda1-7194199ad92a.cap ... /*InValid entry*/

Ensure capsule update is happening even if a valid capsule entry exists.

Signed-off-by: Bhaskar Upadhaya <bupadhaya@marvell.com>
2020-02-14 15:37:08 +00:00
Richard Hughes
293a64dab5 Fix a critical warning when installing some firmware
If the device replugs, then we were doing `g_set_object(&device, device_tmp)`
which worked, but had the unfortunate effect of not unwinding properly as
`device` was a function parameter rather than a local variable.

The observed effect using `watch ((GObject*)$1)->ref_count` was the refcount was
double-decremented and thus we got a critical warning on the final valid unref.
Fix this by copying the function parameter to a local variable which we can
then change if the device replugs.
2020-02-14 13:31:10 +00:00
Richard Hansen
a1edff9ab1 ebitdo: Fix the endpoint address logged in the error message
Addresses #1681.
2020-02-14 06:07:37 +00:00
Mario Limonciello
5c7e17276c fu-util: fix a logic error in report uploading introduced in e076d48afb
Fixes: #1770
2020-02-13 10:47:56 -08:00
Richard Hughes
52cda3db9c uefi: Find the correct lds and crt name when specifying -Defi_ldsdir
This fixes the Flatpak build of fwupd.
2020-02-13 17:56:33 +00:00
Mario Limonciello
7a3985f2de upower: Move battery threshold declaration into a configuration file 2020-02-13 09:52:20 -08:00
Mario Limonciello
e396f62d74 upower: Decrease minimum battery requirement to 10%
Dell's behavioral spec for this aligns the threshold for this at 10%
rather than 30%.
2020-02-13 09:52:20 -08:00
Richard Hughes
ffa9e6ce25 Release fwupd 1.3.8 2020-02-13 14:30:35 +00:00
Richard Hughes
1de7cc920f Do not use fu_common_vercmp() when the device verfmt is PLAIN
This fixes the upgrade from 5101AALB to 51H0AALB, which fwupd was comparing as '5101' > '51'.
2020-02-13 13:33:43 +00:00
Richard Hughes
22edab6da8 altos: Output raw buffer data when using FWUPD_ALTOS_VERBOSE 2020-02-12 17:15:48 +00:00
Richard Hughes
1a76852d74 altos: Prefix an error to provide more context 2020-02-12 17:15:48 +00:00
Richard Hughes
f0eeceb9e9 altos: Add a trivial _to_string() implementation 2020-02-12 17:15:48 +00:00
Richard Hughes
48a9da5091 synaptics-cxaudio: Make the verfmt match that of the existing Windows tools
This is causing too much confusion, and we don't actually need to force to a
dotted decimal for any reason.
2020-02-12 17:15:40 +00:00
Richard Hughes
de5573c68b synaptics-mst: Allow MST to fall back if no PCI device is marked as parent
At the moment not having a udev parent was causing the dock device to not be
detected.
2020-02-12 17:15:28 +00:00
Richard Hughes
234ee64509 Allow specifying a list of subsystems when setting a physical ID
Sometimes we want to fall back to a different subsystem entirely.
2020-02-12 17:15:28 +00:00
Richard Hughes
390fc1ad28 trivial: Get the physical ID for the drm_dp_aux_dev subsystem too 2020-02-12 17:15:28 +00:00
Richard Hughes
bc49d019cd synaptics-mst: Fix trivial thinko caused by the wrong dock connected 2020-02-12 09:48:07 +00:00
Richard Hughes
ea71dc7e73 vli: Invert the logic to reboot the parent FuCliUsbhubDevice, not the child 2020-02-12 08:51:24 +00:00
Richard Hughes
e20d6b3c33 vli: Switch around the hub tier values
I got given the wrong values...
2020-02-12 08:50:48 +00:00
Richard Hughes
d2fe61289b uefi: Fix a build regression with Fedora 30
Fixes https://github.com/fwupd/fwupd/issues/1754
2020-02-11 14:53:01 +00:00
Mario Limonciello
ddfc72db56 logitech_hidpp: Ignore detach failures (Fixes: #1183)
Some logitech devices seem to reboot immediately and the failures then
look like a broken pipe, but are actually the device rebooting.

If the device really did fail to detach after the timeout is done we'll
see a message that the device failed to come back instead.
2020-02-11 14:14:51 +00:00
Mario Limonciello
38d7074215 logitech_hidpp: When detaching to bootloader use non-blocking IO and wait for timeout
Should hopefully resolve issues that take a long time for devices to reboot.
Fixes: #1667
2020-02-11 14:14:51 +00:00
Richard Hughes
2b108e4ab1 vli: Show erase progress when doing a v2 recovery 2020-02-11 13:40:05 +00:00
Richard Hughes
60373e03fd uefi: Do not remove the 'Linux Firmware Updater' boot entry before update
Deleting boot entries from EFI sometimes triggers problems on some firmware.

We don't actually need to do it from the EFI binary, and it's perfectly safe to
leave it in the boot list. It also means when doing multiple updates over
several months we're not creating, deleting, creating, deleting and can just
re-use the same BootXXXX number each time.

It also makes the EFI binary simpler, which is good.
2020-02-11 13:36:08 +00:00
Richard Hughes
507f24a735 uefi: Do not rewrite BootOrder in the EFI helper
At the moment fwupd creates a BootXXXX for fwupd.efi and marks it BootNext.
It *also* adds it to the end of BootOrder to work around various old firmware
bugs like https://github.com/rhboot/fwupdate/issues/55 which we can perhaps
drop sometime thie century.

Remove the rewriting of BootOrder from the EFI binary; we've accidentally not
been doing it for a long time and nothing broke, and I'd like to make the EFI
binary as small and simple as possible. The user can remove the entry from the
BIOS or using efibootmgr if required, but it's harmless to just leave it.
2020-02-11 13:36:08 +00:00
Richard Hughes
7ba76b0b01 trivial: Correctly set up the weak ref when using a GObject 'parent' property
This fixes a critical warning when adding MSP devices.
2020-02-11 12:59:27 +00:00
Richard Hughes
4eb7cec24b trivial: Fix memory leak if fu_device_set_parent() is called multiple times 2020-02-11 12:58:37 +00:00
Richard Hughes
00a0be068a vli: Add support for the PS186 device 2020-02-11 12:08:37 +00:00
Richard Hughes
af3b91d490 Set up more parent devices for various Lenovo USB hubs 2020-02-11 11:22:20 +00:00
Richard Hughes
08fd6e9179 trivial: Include the device subsubsystem in the physical ID error message
We check for this, so it makes sense to show it in the list of possibilities.
2020-02-11 11:19:14 +00:00
Richard Hughes
1bd0617aac cxaudio: Set the update protocol to prevent a daemon warning 2020-02-11 11:18:44 +00:00
Richard Hughes
6c3db94f14 vli: Add support for Lenovo Modularized dock 2020-02-11 11:18:10 +00:00
Richard Hughes
c49a2aea88 trivial: Make the &HUB_ instance 16 bits wide for SuperSpeed devices 2020-02-11 11:17:34 +00:00
Richard Hughes
07a41b992e Add an extra instance ID to disambiguate USB hubs
In some hardware there are two identical USB hubs with different firmware.
One is upstream, and one is downstream, making up to 7 user-available ports.

Use the 'removable' bitfield to target the proper firmware to the correct
device, on the logic that the setting will be different on upstream (removable)
and downstream (non-removable, as on the same PCB) hubs.
2020-02-10 14:58:38 -06:00
Richard Hughes
e7e37ec223 vli: Remove the unused tierX custom flags for each device
We now know what this means on real hardware!
2020-02-10 14:58:38 -06:00
Mario Limonciello
d5bf8e45f2 Revert "Correctly delete UEFI variables"
This reverts commit 44f55e2ee6.

This behavior caused fwupdx64.efi to loop for a very long time until
either aborting, running out of memory or some other problems.
Fixes: #1756
Fixes: #1751
2020-02-10 12:39:26 -06:00