Commit Graph

2018 Commits

Author SHA1 Message Date
Richard Hughes
44e8f5a906 colorhug: Fix detaching devices since switching to SHA1 device-IDs 2017-11-23 11:02:30 +00:00
Richard Hughes
af652da167 dfu: Ignore an EP STALL when detaching
Some devices just detach without completing the transaction.
2017-11-23 10:46:26 +00:00
Richard Hughes
68327f3abd trivial: Add some missing debug information when detaching 2017-11-23 10:45:54 +00:00
Richard Hughes
175635b916 trivial: Move assigning a GError for future code 2017-11-22 14:26:49 +00:00
Richard Hughes
e89ab5976f Partially revert the FuDevice weak reference detection
This causes problems for future patchsets that re-populate the FuDeviceItem.
2017-11-22 14:26:49 +00:00
Richard Hughes
aa6a56205f dfu: Assume DFU version is 1.1 if unspecified 2017-11-21 15:55:29 +00:00
Mario Limonciello
f3269994a6 thunderbolt: ignore useless thunderbolt device types
Kernel 4.15 adds support for Thunderbolt P2P devices via
CONFIG_THUNDERBOLT_NET.  When turned on and activated fwupd will
show an empty device representing the IP connection between machines.

These device types aren't useful in fwupd and should be filtered.

Suggested-by: Mika Westerberg <mika.westerberg@intel.com>
Signed-off-by: Mario Limonciello <mario.limonciello@dell.com>
2017-11-20 16:41:47 -06:00
Richard Hughes
3bc2f3bbb6 trivial: Parse the IHEX record types 02 and 03
Although we don't quite do the right thing, we only need to typically work out
the start offset of the firmware. This fixes 'dfu-tool dump foo.hex' for files
produced for the ATMEL ATXMEGA architechure.
2017-11-18 11:06:38 +00:00
Mario Limonciello
59cfba617c Test version of gcab to determine which tests to run (Closes: #318)
Adjust the disabling of the s390x CI test to only run when on newer
gcab.
2017-11-17 18:48:40 +00:00
Jan Tojnar
cc9f934787 build: Refactor directory selection
Previously, the various install paths were obtained using get_option
as needed.

This patch unifies the directory selection inside the top-level meson
file as requested in https://github.com/hughsie/colord/pull/62.
2017-11-17 17:11:51 +00:00
Richard Hughes
5b02c70d93 Move the PIC18 firmware to the fwupd-test-firmware project 2017-11-16 17:49:30 +00:00
Richard Hughes
c0d09c2576 Move the AT90USBKEY firmware to the fwupd-test-firmware project 2017-11-16 17:34:33 +00:00
Richard Hughes
352ba1b833 dfu: Add support for the original AVR DFU protocol
This allows us to flash hardware like the Retrode and other devices using chips
like the AT90USB1287.

The test files can be re-generated using the sample code found here:
https://github.com/hughsie/fwupd-test-firmware and are designed
to be used on the AT90USBKEY2 development board.
2017-11-16 15:30:30 +00:00
Richard Hughes
c83ebad885 dfu: Ensure the progress callbacks are connected for all devices
This ensures the device always reports the correct status always (but just once)
to the client.
2017-11-16 15:30:30 +00:00
Richard Hughes
ee46fb6d09 dfu: Allow wildcarded VIDs and PIDs when loading from a .cab file
The logic is that this will have been matched using the GUID before it gets to
the writing stage.
2017-11-16 15:30:30 +00:00
Richard Hughes
fd4697188a dfu: Invalidate the DFU mode, state and status when replugging 2017-11-16 15:30:30 +00:00
Richard Hughes
5826838987 trivial: Fix the comments in the DFU quirk file to be more helpful 2017-11-16 15:30:30 +00:00
Richard Hughes
43f9dd8c40 Sort the output of GetUpgrades correctly
This allows clients to just select the 'first' FwupdRelease for the newest if
there are multiple installable releases.

Fixes https://github.com/hughsie/fwupd/issues/319
2017-11-16 15:24:47 +00:00
Mario Limonciello
370e76d4f4 Skip hwid-requires test on s390x for now.
This makes CI more useful as there is currently a problem with
gcab 0.7 and big endian architectures not yet fixed.

More details available in:
https://github.com/hughsie/fwupd/issues/318
2017-11-16 07:46:42 -06: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
Mario Limonciello
2e52dc2242 dell: disable plugin if libsmbios fails 2017-11-14 13:20:59 -06:00
Mario Limonciello
20e856ccbe dell: activate libsmbios_c debugging output with --plugin-verbose=dell 2017-11-14 12:00:49 -06:00
Richard Hughes
c17f0f368e ebitdo: Fix a possible buffer overflow when debugging 2017-11-14 16:08:14 +00:00
Richard Hughes
bf186f26c2 trivial: Use the runtime GUID for the SFC30 gamepad in the hardware tests
To verify, this matches the <firmware> provide in the upstream metainfo file.
2017-11-14 16:01:12 +00:00
Richard Hughes
49fafec020 Set environment variables to allow easy per-plugin debugging
This allows end-users testing a specific plugin to start fwupd with an extra
command line parameter, e.g. `--plugin-verbose=unifying` to output a lot of
debugging information to the console for that specific plugin.

This replaces a lot of ad-hoc environment variables with different naming
conventions.
2017-11-14 14:22:02 +00:00
Richard Hughes
9c4b531945 trivial: Use fu_plugin_runner_device_generic() for unlock() 2017-11-14 11:34:53 +00:00
Richard Hughes
d3d96ccbb2 trivial: Allow running generic vfuncs in the tests without a GModule
This makes it easier to set up test harness in the daemon self tests.
2017-11-14 11:34:33 +00:00
Richard Hughes
2adee9082b dfu: Use the new update_detach() and update_attach() vfuncs 2017-11-14 10:49:43 +00:00
Richard Hughes
09ff4c905d colorhug: Use the new update_detach() and update_attach() vfuncs 2017-11-14 10:49:43 +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
0d7fdb3110 Split out the update detach and attach phases as explicit optional vfuncs
This allows us to do two things:

* Attach after a failed update, so the user isn't left with 'dead' hardware
* Split the detach and attach actions into different plugins in the future

This also allows us to have a separate vfunc to get the new version number
after flashing the firmware, as this may be handled in a different plugin to
the detach phase.
2017-11-14 10:49:43 +00:00
Richard Hughes
d81249465d trivial: Fix the case of some debugging statements 2017-11-14 10:19:02 +00:00
Richard Hughes
3979ba5039 nitrokey: Fix a buffer overrun spotted by Coverity
This only happens when debugging, so it was not spotted by valgrind.
2017-11-13 21:59:57 +00:00
Richard Hughes
9b0d228ed9 Add a nitrokey plugin
This gets the firmware version from the Nitrokey storage device but does not
enable the firmware upgrade mechanism.
2017-11-13 16:25:46 +00:00
Richard Hughes
31830aaea3 dfu: Ensure the mode is set correctly for fake runtimes 2017-11-13 16:01:57 +00:00
Richard Hughes
959e3d8a76 dfu: Add quirk for AT32UC3B1256 as used in the RubberDucky 2017-11-13 14:25:02 +00:00
Richard Hughes
ff3efe77b4 trivial: Fix the DFU self tests when the ColorHug+ is connected 2017-11-13 14:07:50 +00:00
Richard Hughes
9e59fa4d16 ebitdo: Rename FuDeviceEbitdo to FuEbitdoDevice
This is what most programmers expect and makes it clear what it derives.
2017-11-13 14:03:02 +00:00
Richard Hughes
a142bb15b6 altos: Rename FuDeviceAltos to FuAltosDevice
This is what most programmers expect and makes it clear what it derives.
2017-11-13 13:58:37 +00:00
Richard Hughes
ba6391e98d colorhug: Do not save the firmware blob in the device state
It's only needed for fu_plugin_update() so there's no point at all.
2017-11-11 21:58:17 +00:00
Richard Hughes
28abc4f60d colorhug: Do not use two prefixes for trivial log messages
G_LOG_DOMAIN is set to something ColorHug-specific already.
2017-11-11 21:58:17 +00:00
Richard Hughes
85dbcbf534 dfu: Add trivial helpers to get the current vid/pid/release 2017-11-11 21:06:18 +00:00
Richard Hughes
95ca91a515 trivial: Clarify two gtk-doc comments to explain the flags better 2017-11-11 21:06:14 +00:00
Richard Hughes
f1d6f6cfc3 trivial: Unconstify an allocated variable to avoid a GCC warning 2017-11-10 14:31:22 +00:00
Richard Hughes
97d1cbb304 trivial: Ensure the polkit rules always get installed into datadir 2017-11-10 14:31:22 +00:00
Mario Limonciello
ce051b8da5 debian: only do libsmbios on supported architectures 2017-11-09 18:53:46 -06:00
Mario Limonciello
3744e614a9 debian: debci: remove unnecessary dbus start command
Shouldn't be needed as depending on dbus-x11 depends on dbus
which should get the daemon up and running.
2017-11-09 16:36:28 -06:00
Richard Hughes
7bcba92f75 trivial: post release version bump 2017-11-09 15:23:12 +00:00
Richard Hughes
a72b3581fa Release fwupd 1.0.1 2017-11-09 15:19:58 +00:00
Richard Hughes
37906f6aae trivial: Fix NULL/FALSE confusion in the dfu plugin 2017-11-09 14:32:25 +00:00