Commit Graph

4304 Commits

Author SHA1 Message Date
Richard Hughes
ac48c7f45a trivial: Add a GObject property for FuVliDevice::kind 2020-03-19 06:43:42 +00:00
Richard Hughes
86febb681b trivial: Fix a typo when calling fu_firmware_image_add_string() 2020-03-18 18:57:06 +00:00
Richard Hughes
48d9fb8f74 ccgx: Parse the metadata block in the firmware image 2020-03-18 18:57:06 +00:00
Richard Hughes
b258e514c5 ccgx: Add a firmare parser for cyacd files
These are visually similar to Intel hex files, but different enough to demand
their own parser. Multiple images can be stored in one firmware file, with the
`addr` set to the SiliconID and the `idx` set to the position in the file.
2020-03-18 18:57:06 +00:00
Mario Limonciello
c0f1f1c7e3 trivial: logitech-hidpp: decrease the verbosity of some debugging 2020-03-17 18:43:08 -05:00
Mario Limonciello
15cb61b34e trivial: logical-hidpp: fix some debugging messages not working 2020-03-17 18:43:08 -05:00
Mario Limonciello
c6ae0d998b logitech: Correctly set the protocol
Fixes updates on signed receivers.
2020-03-17 18:43:08 -05:00
exploide
b3c8bc4010 trivial: update command consumes device ids in fish shell completion 2020-03-17 19:12:00 +00:00
Richard Hughes
09a4f7559c Add the optional device-id to the update --help output
Fixes https://github.com/fwupd/fwupd/issues/1870
2020-03-17 13:03:16 +00:00
Richard Hughes
2c9445281a Fix a difficult-to-trigger daemon hang when replugging devices
Use only one GMainLoop in FuDeviceList; we can only iterate one loop at a time
anyway, and having the mainloops per-item complicates the lifecycle of the
fu_device_list_wait_for_replug() functionality considerably.
2020-03-17 13:02:54 +00:00
Richard Hughes
252b0c704e vli: Remove a dock device from the whitelist that is never going to be updated
This is an old EOL dock that does not respond well to probing -- leading to an
occasional multi-second startup deadlock on startup.
2020-03-16 11:56:35 +00:00
Richard Hughes
3dadb99c6c vli: Add some trivial debugging to help track down a bug 2020-03-16 11:56:35 +00:00
Richard Hughes
bd5e6f00d2 vli: Never add USB hub devices that are not upgradable
There's almost no point; you can't interact with them in any meaningful way.
2020-03-16 11:56:35 +00:00
Mario Limonciello
7b866e5f92 uefi: Don't use shim for non-secure boot configurations
Since the entry is dynamically created this removes one area that
can potentially cause failures.
Helps: #1794
2020-03-16 06:55:05 -05:00
Elvis Stansvik
efc2e47e48 Start fwupd-activate.service after snapd.service
Instead of using RequiresMountsFor=/snap/fwupd/current, which will not
work since /snap/fwupd/current is a symlink [1].

This will work since the mount units generated by snapd all have
Before=snapd.service, so will be stopped after snapd.service during
shutdown.

With After=snapd.service, fwupd-activate.service will then stop before
snapd.service, at a point when all snap mount units are still running.

Fixes the issue where fwupd-activate.service hangs when stopped, causing
a stop job timeout during shutdown.

[1] See https://github.com/systemd/systemd/issues/8907

Closes #1654
2020-03-15 09:06:21 -05:00
Richard Hughes
7825ae8dd1 dfu: Actually reload the DFU device after upgrade has completed
The m-stack DFU quirk also requires that we get the runtime status so that the
USB_DFU_SUCCESS_FUNC callback gets called. We were doing this by accident
before, and since switching to the FuDevice subclass this was dropped.

The dfu_device_refresh_and_clear() function is safe to call on a device which
does not have a working runtime interface.
2020-03-12 15:41:14 +00:00
Richard Hughes
0e39ff0ef8 trivial: Add a section on using a compat layers in fwupd 2020-03-12 11:44:51 +00:00
Richard Hughes
fa41739ab0 dfu: Add one more m-stack device requiring a quirk 2020-03-11 16:10:10 +00:00
Mario Limonciello
92ff9c7b93 Apply version format to releases and devices at same time 2020-03-10 14:31:16 -05:00
Richard Hughes
4f0e344a0a Ensure that the DeviceID is set for child devices
If we do not ->open() the device (e.g. because it uses a parent device to proxy
writes) then the child never gets a DeviceID which causes all kinds of issues.
2020-03-10 17:09:13 +00:00
Richard Hughes
1e571730d0 Fix a daemon crash when removing children
If the device has a child with a longer remove_delay we actually crash because
the FuDeviceList tries to remove the child device twice. Just remove all the
children when the parent remove delay elapsed rather than set up each device
with a unique timeout.
2020-03-10 17:09:13 +00:00
Richard Hughes
c3afed36d5 Allow waiting for the parent device when replugging
If a child device resets a parent device then we want to wait for the root
device, not the child.
2020-03-10 17:09:13 +00:00
Richard Hughes
51b4a1666e Add fu_device_get_root() shared API
This gets the 'topmost parent' for a composite device, as devices such as hubs
may have more logical layers than just one.
2020-03-10 17:09:13 +00:00
Richard Hughes
4fb8693598 vli: Fix an error when detaching MSP430
The parent has to be opened and we need a longer delay before reading.
2020-03-10 15:12:09 +00:00
Richard Hughes
ff93d91f5a vli: Fix a critical warning when getting the USB speed 2020-03-10 15:09:43 +00:00
Richard Hughes
393b0a1677 vli: Fix the error enum values for the MSP430 2020-03-10 15:09:15 +00:00
Richard Hughes
03d4675511 Do not add blank lines when tokenizing Intel hex files 2020-03-10 15:07:58 +00:00
Richard Hughes
c6c3d6c4c8 vli: Fix the version calculation for MSP430
Nobody from USI reviewed this, so it was wrong.
2020-03-10 15:07:17 +00:00
Richard Hughes
75b7d79424 vli: Fix compile warning introduced in 75cc9161c5 2020-03-10 12:16:09 +00:00
Richard Hughes
f4f4ebe0a2 vli: Ignore one more error when attaching 2020-03-10 12:11:19 +00:00
Richard Hughes
75cc9161c5 vli: Always expect the VL103 header at 0x1003 or 0x4000
I misunderstood the original specification, and it seems even USB-hub-less
devices have the same header location as their "write-through" counterparts.
2020-03-10 12:09:27 +00:00
Richard Hughes
640dbbb0f0 vli: Do not fall back to the recovery write for usbhubs
The checksum check was only being calculated on the size of the pointer, rather
than the size of the struct.
2020-03-10 12:07:28 +00:00
Richard Hughes
09e8e5e7ef vli: Only show the 2nd header if the device ID is valid
Otherwise we get a scary warning about the CRC not being valid, when the block
is just empty.
2020-03-10 12:06:12 +00:00
Richard Hughes
aebd90baad vli: Fix VL103 reboot from ROM mode to FW mode
The logic was wrong; we should have been using command 0xB0 for attach back to
FW mode for both VL10x and VL103. Using a generic reset on VL103 always reset
the device back into bootloader mode as the ROM signatures were being written
by command 0xC0.

As now attach and detach have different code paths, there's no point having a
`FuVliDevice->reset()` vfunc, and so we can make everything a little simpler at
the same time.
2020-03-10 10:46:01 +00:00
Richard Hughes
df2ae010d5 vli: Add some better comments for writing GPIOs 2020-03-10 10:42:52 +00:00
Richard Hughes
7fe2e48d7b trivial: Remove now-unused functionality in dfu-tool 2020-03-09 21:12:01 +00:00
Richard Hughes
b992a2a8f9 Add a helper script to add a DFU header
This is so simple we can do it in 10 lines of Python. It matches the format of
the `add_capsule_header.py` utility.
2020-03-09 21:12:01 +00:00
Richard Hughes
bca63edccf Add 'firmware-convert' subcommand to fwupdtool
This is a useful function that allows us to use all the fwupdplugin loaders.
2020-03-09 21:12:01 +00:00
Mario Limonciello
537da0e98b fu-engine: Make two passes of requirements checking
Resolves installation for local CAB files that have `VersionFormat`
    set but not yet also set from metadata.

    In the first pass ignore the version format. This will rule out all
    other checks such as GUID and protocol.

    Then apply version format to the device if specified in the CAB.
    Lastly do a second pass with all requirements set.
2020-03-09 15:54:30 -05:00
Mario Limonciello
f430da01e5 fu-engine: Copy the VersionFormat from the CAB if specified in get-details 2020-03-09 15:54:30 -05:00
Mario Limonciello
4779237412 trivial: add 1.3.x to security.md 2020-03-09 14:35:29 -05:00
Mario Limonciello
37f140c4fd trivial: some fixups after seeing how it deployed
Rename templates so the order looks correct
2020-03-09 14:34:22 -05:00
Mario Limonciello
9087a559d0 trivial: Update issue templates 2020-03-09 15:32:39 -05:00
Mario Limonciello
5972a49495 Add a new plugin for CPU microcode 2020-03-09 09:04:38 +00:00
Mario Limonciello
243785c8c9 trivial: improve error message on version format guessing 2020-03-06 13:00:59 -06:00
Mario Limonciello
49519a4b03 trivial: improve version format guessing for hex 2020-03-06 13:00:59 -06:00
Mario Limonciello
789d308f79 trivial: only install bash-completion for fwupdmgr if compiled with agent
`fwupdmgr`'s bash completion now uses `fwupdagent` for at least one command.
2020-03-06 18:42:00 +00:00
Lars Wendler
bacd3a44fe Don't build/install fwupdagent man page if agent build is not requested
Otherwise build fails with:

  src/meson.build:196:2: ERROR: Unknown variable "fwupdagent".

Gentoo-bug: https://bugs.gentoo.org/711682
Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>
2020-03-06 15:15:00 +00:00
Mario Limonciello
c8bae2a68c Introduce a new VersionFormat for hex
When CPU microcode is distributed it typically is versioned in
hexadecimal in all tools.  Converting it to any of the existing version
formats provides an unexpected result that requires converting back to
hexadecimal.
2020-03-06 08:12:58 -06:00
Mario Limonciello
6a0f25f649 trivial: uefi: restore uefi.quirk
It was a casualty in 6f8a3da8f0
2020-03-06 12:10:15 +00:00