Commit Graph

6025 Commits

Author SHA1 Message Date
Richard Hughes
a65f5759ef trivial: Fix a typo of fwupd itself 2021-07-15 09:33:25 +01:00
Richard Hughes
19abf996c7 Allow the daemon to request interactive action from the end user
The "return error and hope the client resubmits the firmware again"
pattern is clunky. There are two plugins doing this now, and about to
be one more.

This adds FwupdRequest which provides a structured way of asking the
user to perform an action, e.g. to replug the device or to press a
special key or button.

This replaces much of the UpdateMessage and UpdateImage API although
it is still used internally. Clients capable of processing the new
DeviceRequest signal should add REQUESTS to their feature flags.

Also, this allows us go back to the old meaning of _NEEDS_BOOTLOADER,
which was "needs rebooting into a bootloader mode" rather than the
slightly weird "user needs to do something and resubmit request".
2021-07-14 17:03:50 +01:00
Richard Hughes
a71f100e5a redfish: Use the HotPluggable attribute if provided
Although, this only seems provided for PSU devices...
2021-07-14 15:21:04 +01:00
Richard Hughes
a564e458d2 trivial: Fix Python linting issue spotted by Codacy 2021-07-14 15:20:57 +01:00
Richard Hughes
095354e1d8 ebitdo: Add the alternate vendor name into the allowlist 2021-07-14 08:34:30 +01:00
Daniil Lunev
0af67e3e50 emmc: Filter out rpmb and boot block devices
The move to query sysattr for the name inadvertly changed the extent of
devices accepted by emmc probe. udev rules setup ID_NAME only for main
block device, but not for rpmb or boot, while 'name' sysattr is present
for all of them for they point to the same parent. The original check
for name was brittle either way and relied on a side effect of udev
subsystem. This CL introdues a proper filtering check that picks up only
the main devices. That is important because an attempt to perfrom an
update not on the main device returns a cryptic timeout error.

Change-Id: I3c2f5597c3e3ca2124c87cade3f345dece94027e
2021-07-14 07:38:45 +01:00
Peter Marheine
000ee9696c flashrom: remove PS175 support
This is now implemented by the parade_lspcon plugin.
2021-07-14 06:40:38 +01:00
Peter Marheine
a12d715038 New plugin: parade-lspcon 2021-07-14 06:40:38 +01:00
Ivan Mikhanchuk
db8a9927f4 modem-manager: add firehose update method
Adds firehose update protocol, qcdm port handling, program file copy to the cache directory
2021-07-13 21:57:08 +01:00
Ivan Mikhanchuk
5e04fae8f2 Add functions to read from and write to FU_PATH_KIND_FIRMWARE_SEARCH 2021-07-13 21:57:08 +01:00
Mario Limonciello
da895169a7 Add a new path for configuring runtime firmware load path
The kernel allows configuring this, and certain plugins will use this
path to be able to load firmware in the kernel driver through runtime,
but to flash to the device.
2021-07-13 21:57:08 +01:00
Richard Hughes
f7a23d7c88 Allow the client to watch for more property changes 2021-07-13 14:56:01 +01:00
Richard Hughes
a7409d3117 Fix the progressbar spinner to actually work
We need to use the private GMainContext we created.
2021-07-13 14:55:49 +01:00
Richard Hughes
9a4997e42b trivial: Always clear timeout when replacing in the devicelist 2021-07-13 09:31:53 +01:00
Richard Hughes
6578fb13e7 trivial: Add some sanity checks to the device list 2021-07-12 23:17:03 -05:00
Daniil Lunev
1ca9c92919 emmc: add check "name" sysattr is not NULL
At this point it has to be present, but better have the check for
correctness sake.
Follow up of
64fa633e30

Change-Id: I51b5995e25dc4dc4ec63b90af271cd90650d184d
2021-07-12 23:16:51 -05:00
Daniil Lunev
64fa633e30 emmc: use sysattr insted of udev attr lookup for device name
/run/udev/data/b* location of eMMC devices appears to be inaccessible
early on in the boot process which makes fwupd to skip eMMC devices if
the daemon started too early. ID_NAME udev attribute is effectively
copied from the sysfs attribute [1], thus making use of it is more
reliable.

[1] 1ed38f4174/etc/udev/rules.d/60-persistent-storage.rules (42)

Change-Id: I66b92dfeb13ec61b4d8166dd32a2460b6fbf92c2
2021-07-12 20:16:01 -05:00
Richard Hughes
73b9f8bd53 Allow multiple devices to set WAIT_FOR_REPLUG
This also means we no longer pass in just one device to the
fu_device_list_wait_for_replug() function, but we rather wait for *all*
of the active devices.

This also cleans up the confusion on whether the engine should wait for
the 'root' device or the child device as either (or both) can be set as
required.

This makes the replug far more predictable for devices that have
children even in bootloader mode.
2021-07-12 19:02:19 +01:00
Richard Hughes
89064bf410 trivial: Downgrade a warning to avoid a lot of extra code 2021-07-12 19:01:55 +01:00
Richard Hughes
8eecefeb3b trivial: Allow the cache to build in arch CI 2021-07-12 19:01:55 +01:00
Richard Hughes
b2ee236060 trivial: Show a critical warning if a device has no context 2021-07-12 19:01:55 +01:00
Richard Hughes
d938ab62e6 trivial: Add fu_device_add_guid_full() to control behaviour 2021-07-12 19:01:55 +01:00
Richard Hughes
53538685fc trivial: Add FU_DEVICE_INSTANCE_FLAG_NO_QUIRKS to avoid quirk matches 2021-07-12 19:01:55 +01:00
Richard Hughes
9c31d1fadd trivial: Set the FuContext on more devices 2021-07-12 19:01:55 +01:00
Richard Hughes
4934690a30 trivial: Add some useful debugging when auto-removing devices 2021-07-12 19:01:55 +01:00
Crag Wang
e35678e07b trivial: override support for fwupd build by runtime environment variable 2021-07-12 12:57:37 +01:00
Richard Hughes
e4aeb99296 trivial: Fix oss-fuzz by installing missing deps 2021-07-12 10:33:38 +01:00
Richard Hughes
488f2e1f37 Export the EFI and IFD parsers
We'll need to use this from another plugin soon.
2021-07-12 10:33:38 +01:00
Richard Hughes
0cc06f032c Add a flag to open and close with the parent device
This is a common pattern that is used in lots of plugins, so move the
logic into common code.
2021-07-11 16:37:47 +01:00
Richard Hughes
df297d3ee2 superio: Always ensure the version string is NUL terminated
Spotted by Coverity
2021-07-10 13:51:28 +01:00
Richard Hughes
f1dbd42934 superio: Fix a buffer overread when using --verbose
Spotted by Coverity
2021-07-10 13:51:28 +01:00
Richard Hughes
772f116104 superio: Hide more debugging output by default 2021-07-10 13:51:28 +01:00
Richard Hughes
ef807240f7 realtek-mst: Show the write failure when using --verbose
Spotted by Coverity.
2021-07-10 13:51:28 +01:00
Richard Hughes
f01eb3808c pixart-rf: Read the payload status after getting the command response
Spotted by Coverity
2021-07-10 13:51:28 +01:00
Richard Hughes
a19e94eb5a pixart-rf: Hide more debug output behind --verbose 2021-07-10 13:51:28 +01:00
Richard Hughes
a84b76573a trivial: Set the remove delay on the child automatically 2021-07-10 07:37:59 +01:00
Richard Hughes
3b84bb2135 trivial: Set the backend ID on children if unset
This allows children of devices that derive from FuUdevDevice to be
removed correctly.
2021-07-10 07:37:59 +01:00
Richard Hughes
f89cb3850b Add a device flag to control child removal
At the moment the device list auto-removes children when the parent is
removed. This was originally working around the bug that the child
devices had no backend ID, and thus were not matched like the parent
in fu_engine_backend_device_removed_cb() and removed automatically.

Using the workaround means that the children are potentially removed
before the parent depending on the order of the device list -- which
might be modified by replug events.

I think the old cleanup is probably an anti-pattern, and going forward
composite devices should probably define _NO_AUTO_REMOVE_CHILDREN but
we don't want to change this behaviour for plugins already expecting
the old flow, or for devices with no parent backend IDs.
2021-07-09 19:46:41 +01:00
Richard Hughes
30ce27440e trivial: Fix s390x rpmbuild 2021-07-09 17:02:52 +01:00
Richard Hughes
a117b7da12 trivial: Correctly show negative device order numbers 2021-07-09 17:01:45 +01:00
Richard Hughes
65b3115b48 trivial: Move the builder docs to docdir
Fixes https://github.com/fwupd/fwupd/issues/3464
2021-07-09 16:40:36 +01:00
Richard Hughes
10cd248948 redfish: Restore compatibility with old libcurl versions
Making the redfish plugin disabled on RHEL 8 was... unpopular.
2021-07-09 16:30:30 +01:00
Richard Hughes
48c98a5564 trivial: Don't fail tests on old GLib versions
We were silently depending on 2.61.0 by accident.
2021-07-09 16:18:25 +01:00
Richard Hughes
f34c5d4eb6 trivial: Print the GUIDs in the order they were added
This fixes the self tests on old GLib versions as the order of the
GHashTableIter is not guaranteed to be stable.
2021-07-09 15:43:45 +01:00
Richard Hughes
5eabab90f4 trivial: Don't set a device ID if setting a physical ID
This isn't actually doing anything as setting a physical ID invalides
the manually-set ID.
2021-07-09 14:08:12 +01:00
Richard Hughes
d4bd5cca5a Standardize some of the device summary text
This is supposed to be 'Sentence case' with no trailing fullstop.
2021-07-09 07:07:07 +01:00
Richard Hughes
5343a4a083 Export the build timestamp from plugins 2021-07-08 16:31:07 +01:00
Richard Hughes
7e77eb3e41 trivial: Add the missing quirk key
This fixes a nag warning every time we rebuild the silo.
2021-07-08 16:31:07 +01:00
Richard Hughes
a923ae2804 redfish: Refactor plugin and add some unit tests 2021-07-08 15:35:02 +01:00
Richard Hughes
5458480356 Add a flag which inhibits children automatically
Fixes https://github.com/fwupd/fwupd/issues/3454
2021-07-07 12:50:27 +01:00