Commit Graph

30 Commits

Author SHA1 Message Date
Mario Limonciello
51308e648a Adjust all licensing to LGPL 2.1+ (Closes: #526) 2018-05-29 09:03:13 +01:00
Richard Hughes
3e3ac27216 trivial: Add attach() and detach() vfuncs to FuDevice 2018-05-18 10:08:10 +01:00
Richard Hughes
0a0483b2ce trivial: Add a write_firmware() vfunc to FuDevice 2018-05-14 17:07:20 +01:00
Richard Hughes
fe842231d2 unifying: Don't duplicate a device flag from FuDevice 2017-12-14 18:12:13 +00:00
Richard Hughes
d8a175ee90 unifying: Use the daemon replug timeouts 2017-12-14 18:09:04 +00:00
Richard Hughes
168b9faa80 Make LuDevice derive from FuDevice
This removes a lot of duplicated code.
2017-12-08 09:36:57 +00:00
Richard Hughes
4a036018f7 Set the progress and state on the FuDevice, not the FuPlugin
This makes more sense; we're updating the device, not the plugin itself.

This also means we don't need to funnel everything through callbacks like
GFileProgressCallback and we can also update the state without adding an
explicit callback to each derived device type.
2017-11-30 20:51:52 +00:00
Richard Hughes
245543849f unifying: Move the coldplug to the correct startup phase 2017-11-27 18:07:53 +00:00
Richard Hughes
b6f79556f1 Use a SHA1 hash for the internal DeviceID
It's actually less scary to see a SHA1 hash than it is to see a path like
/sys/devices/pci0000:00/0000:00:1d.0/usb1/1-1/1-1.2. It's also way easier to
copy and paste into the various fwupdmgr command that require a device ID and
also means we can match a partial prefix much like git allows.

If we also move to a model where plugins can be changed during different stages
of the update (e.g. during detach) then the device might change connection type
and then the sysfs path not only becomes difficult to paste, but incorrect.

Session software doesn't care about the format of the device ID (it is supposed
to be an implementation detail) and so there's no API or ABI break here. A few
plugins also needed to be ported, but nothing too worrying.
2017-11-16 07:18:36 +00:00
Richard Hughes
37e124f3da unifying: Use the new update_detach() and update_attach() vfuncs 2017-11-14 10:49:43 +00:00
Richard Hughes
1df45c1401 unifying: Use fu_plugin_check_supported()
Some (HIDPPv1?) devices don't like being probed, and in some cases actually
stop working altogether.

Fixes bugs like #127 and #258
2017-09-19 16:11:27 +01:00
Richard Hughes
f966e3f2a4 unifying: Add hardcoded summaries for peripheral kinds 2017-09-12 16:40:40 +01:00
Richard Hughes
c1c2fec6f5 Add optional icons to each device
This allows us to show the devices in a GUI with a nice icon. Some of the icon
mappings are not perfect and I'll be asking the GNOME designers for some
additions to the icon specification.

Custom vendor icons can also be specified, and /usr/share/fwupd/icons would be
a good place to put them. If vendor icons are used they should show a physical
device with the branding, rather than just the vendor logo.
2017-09-11 17:27:35 +01:00
Richard Hughes
9bfcfd88cf Ensure more devices set the device summary
This helps users identify what the device actually does.
2017-09-11 15:10:50 +01:00
Richard Hughes
e4be834ac1 unifying: Disable if the kernel has no CONFIG_HIDRAW support
Fixes: https://github.com/hughsie/fwupd/issues/235
2017-09-08 13:47:52 +01:00
Yehezkel Bernat
e43f7fb655 trivial: cleanup for many compilation warnings from clang
Signed-off-by: Yehezkel Bernat <yehezkel.bernat@intel.com>
2017-08-30 10:43:15 +01:00
Richard Hughes
a785a1c2f6 Remove the confusing ALLOW_OFFLINE and ALLOW_ONLINE flags
Over the months the original meaning of ALLOW_OFFLINE and ALLOW_ONLINE have be
lost, and there is now a confusing mixture of uses in the source tree. With this
commit we make it clear the UPDATABLE flag is used to specify when the device is
updatable (e.g. from the desktop live session, or from the systemd offline
updates mode, or both) and the NEEDS_REBOOT flag lets us know when the update
is actually going to be done.

For instance, a UEFI UpdateCapsule can be *scheduled* from either the desktop
or from the update mode (but the latter would be a bit weird), but does require
a reboot. Some devices might only be updatable outside the live session, for
instance a hard drive update or a GPU update -- there's just too much going on
with a live session and we want to tightly control what's running during the
firmware flash.

This also means we don't have to "retry" the update when scheduling an update
that really can be scheduled whenever, but just requires a reboot to apply.
2017-08-26 18:09:21 +01:00
Richard Hughes
822e134e94 unifying: Split up the HID++2.0 and HID++1.0 functionality 2017-07-04 13:19:09 +01:00
Richard Hughes
695d01ed93 unifying: Keep the devices open, closing in finalize 2017-06-28 12:09:51 +01:00
Richard Hughes
765c679498 unifying: Only detach the device if required 2017-06-24 07:24:15 +01:00
Richard Hughes
a42dae927c unifying: Wait for device to re-appear in runtime after attaching
This ensures we can flash multiple versions of firmware without an artificial
delay. Also raise the timeout to cope with chains of slow hubs.
2017-06-22 09:37:48 +01:00
Richard Hughes
97fd762b47 unifying: Never allow the USB plugin to claim devices 2017-06-22 09:36:32 +01:00
Richard Hughes
fd381cc96e Add the ability to restrict the firmware installation to specific vendor IDs
This allows us to fix https://github.com/hughsie/lvfs-website/issues/4
2017-06-12 20:22:25 +01:00
Richard Hughes
7a7591a99a unifying: Add support for DFU features
This adds support for flashing peripherals with the 0x00d0 DFU feature.
2017-05-02 21:30:50 +01:00
Richard Hughes
ea8ebcfc7b unifying: Refactor the plugin now we have some more information about the hardware
Many thanks to Logitech.
2017-04-12 17:54:50 +01:00
Richard Hughes
0de35b058d unifying: Subclass FuDevice like the altos plugin 2017-01-10 16:09:32 +00:00
Richard Hughes
7ceb318a27 Add fwupd_result_get_device_version_bootloader()
This functionality is required so that AppStream metadata can check the fwupd
version, the firmware version, bootloader version or a combination of all three.
2016-12-23 11:21:22 +00:00
Richard Hughes
561c457149 trivial: Use unique profiling IDs in plugins 2016-12-15 12:55:21 +00:00
Richard Hughes
4232185bec trivial: Remove some false-positive messages when using clang 2016-12-13 16:01:52 +00:00
Richard Hughes
864363e139 Add support for Logitech Unifying devices
If you do not have Unifying hardware you can emulate writing firmware using:

$ fu-unifying-tool write file.hex -v --emulate=bootloader-nordic
2016-12-12 15:36:53 +00:00