Commit Graph

1294 Commits

Author SHA1 Message Date
Richard Hughes
9e5675e1b4 trivial: Allow compiling without <glib-unix.h> 2019-11-26 17:15:45 +00:00
Richard Hughes
f0f504c740 trivial: Do not use FuProgressbar in dfu-tool
This is a debug-only command line program, and we don't want plugins to have
access to the animated progressbar header in the future.
2019-11-26 17:15:18 +00:00
Richard Hughes
ed3f6cfd4f synaptics-prometheus: Manually set the bootloader mode when attaching
The fingerprint reader device doesn't actually disconnect and reconnect and
so the FuDevice->setup() vfunc never gets called.
2019-11-26 14:15:11 +00:00
Richard Hughes
aba4a5a2bd trivial: Split out a new helper funtion
Other devices need to use this functionality too.
2019-11-26 14:15:11 +00:00
Richard Hughes
11d10a00e7 Always use the more portable 3-arg form for open() 2019-11-26 14:14:37 +00:00
Richard Hughes
5c508de173 trivial: Allow compiling without <fnmatch.h>
This also allows us to add a Win32 implementation if required in the future.
2019-11-26 13:13:31 +00:00
Richard Hughes
28e8b953d0 Revert "synaptics-rmi: Use the build ID as the version number to match the vendor tool"
This reverts commit 28ab968cbf as Synaptics
deviced that vmajor and vminor would actually be useful.
2019-11-26 08:25:45 +00:00
Richard Hughes
cb59a44f28 synaptics-prometheus: Mirror the _IS_BOOTLOADER from device to config 2019-11-25 18:10:38 -06:00
Richard Hughes
741e1e5323 vli_usbhub: Set the composite parent at construction time 2019-11-25 20:01:33 +00:00
Richard Hughes
0df243ad44 synaptics-prometheus: Set the composite parent at construction time 2019-11-25 20:01:33 +00:00
Richard Hughes
52e15b8fb3 vli-usbhub: Whitelist the PD and I²C devices
On advice from VIA.
2019-11-25 12:36:13 -06:00
Richard Hughes
56ac823af9 Set the protocol per-device not per-plugin
Some plugins have devices with more than one protocol. Logically the protocol
belongs to the device, not the plugin, and in the future we could use this to
further check firmware that's about to be deployed.

This is also not exported into libfwupd (yet?) as it's remains a debug-feature
only -- protocols are not actually required for devices to be added.
2019-11-25 18:01:54 +00:00
Richard Hughes
28ab968cbf synaptics-rmi: Use the build ID as the version number to match the vendor tool 2019-11-25 17:44:25 +00:00
Richard Hughes
1665837e78 Make gudev a compile-time option
This should make it nearly possible to build fwupd on FreeBSD.
2019-11-25 09:29:46 +00:00
Richard Hughes
afdba37644 trivial: Set the offline trigger using an environment variable
This allows us to build a object that does not have a custom FU_OFFLINE_DESTDIR.
2019-11-25 09:29:46 +00:00
Mario Limonciello
6abe21efbd trivial: stop including fu-hash.h as part of fu-plugin-vfuncs.h
Explicitly include it in all "in-tree" plugins.

If headers are exported out of tree we will likely explicitly not
export this header.
2019-11-25 09:29:46 +00:00
Leo
6640b571bf Fix shebangs on scripts 2019-11-24 18:51:56 -06:00
Richard Hughes
668ee21567 trivial: Use prefixes for DATADIR in config.h for portability
DATADIR is an enumerated type in MinGW, and the other names are very generic.
2019-11-24 14:17:38 -06:00
Mario Limonciello
89a9e245f9 trivial: optionrom: remove unneeded includes 2019-11-23 14:34:55 -06:00
Richard Hughes
633445dc10 trivial: Allow compiling without <errno.h> 2019-11-23 17:07:53 +00:00
Richard Hughes
8694dee4e7 trivial: Allow compiling without realpath() 2019-11-23 17:07:53 +00:00
Richard Hughes
01c0badd38 trivial: Allow compiling without getuid() 2019-11-23 17:07:53 +00:00
Mario Limonciello
0f54b54250 trivial: plugins: only build coreboot when option set
The option was set but wasn't being used.
2019-11-22 14:50:15 -06:00
Richard Hughes
18b0a739e2 dell: Use the more portable g_usleep() 2019-11-22 14:23:48 +00:00
Richard Hughes
7eeebae1c7 vli-usbhub: Make erasing less verbose and writing more obvious 2019-11-22 14:07:39 +00:00
Richard Hughes
ae21b15ec1 vli-usbhub: Correctly print the 24-bit USB3 offset 2019-11-22 14:07:39 +00:00
Richard Hughes
ad7c7e5fb3 vli-usbhub: Print the PD firmware offset and size for debugging 2019-11-22 14:07:39 +00:00
Richard Hughes
233868124e vli-usbhub: Open the parent device before attempting to read or write from the child 2019-11-22 14:07:39 +00:00
Richard Hughes
6496f12b37 vli-usbhub: Set the install duration for the PD device 2019-11-22 14:07:39 +00:00
Richard Hughes
24ce9837e9 trivial: Fix a failed error prefix string 2019-11-22 14:07:39 +00:00
Mario Limonciello
8bcaad800e trivial: wacom-raw: Remove embedded from device name
This is already implied by the internal flag.
2019-11-21 13:03:12 -06:00
Mario Limonciello
59970600ad wacom-raw: Correct HWID support
This support was using the wrong commands to add a HWID and thus
never actually functioned.  Furthermore it's purpose is to pull
the PID out of the bootloader to be able to properly identify
the device when in bootloader mode (as in recovery mode).

When in this state, generate the correct instance IDs for both
possible Wacom VID.  We can't tell which Wacom VID we are in
bootloader mode.
2019-11-21 13:03:12 -06:00
Richard Hughes
fdb4c4507b uefi: Just use a uint16_t for BootNext processing
This makes everything simpler, at the expense of not being able to create a
`BootFFFF` entry -- but if we get that far something has already gone very
wrong with the firmware...
2019-11-20 16:24:21 +00:00
Richard Hughes
5772e8451c uefi: Use a simpler entries set algorithm
Although slightly wasteful on memory, allocating 64kb is no big deal, and it
means we can simplify creation and reading a lot.
2019-11-20 16:24:21 +00:00
Richard Hughes
55b2df9df6 vli-usbhub: Add support for writing using I2C passthru 2019-11-20 11:07:23 +00:00
Richard Hughes
9f960c154a vli-usbhub: Support updating PD devices that share the hub flash 2019-11-20 11:07:23 +00:00
Richard Hughes
171f18c1c8 vli-usbhub: Support the PD file format 2019-11-20 11:07:23 +00:00
Mario Limonciello
66fcf55f9a trivial: uefi: correct a NULL pointer dereference
This could happen if the machine doesn't have `/etc/os-release`.
2019-11-18 16:22:01 -06:00
Mario Limonciello
e888b58ccd uefi: fall back to ID_LIKE when the path for ID doesn't exist (Fixes:# 1566)
Some derivative distributions re-use bootloader paths from their
upstream.  When this happens the current logic to look for the `ID`
key in `/etc/os-release` doesn't work properly.

Adjust the logic to:
1) Use `ID`
2) Test the path exists.  If so, use it.
3) If it doesn't use `ID_LIKE`.
4) Test if that path exists, if so use it.
5) If that path doesn't exist, return the key from `ID`
6) The plugin will make this path.
2019-11-18 14:55:04 -06:00
Jan Tojnar
34743c5fab uefi: Make generate_binary.sh more robust
command is a shell builtin unlike which, which might not be available.

While at it, let us also make the variables space-safe.
2019-11-18 18:43:40 +00:00
Richard Hughes
22c124dba4 trivial: Detect the USB version automatically
Unfortunately we can't remove the usb2 and usb3 custom flags as we don't yet
depend on a new enough GUsb version.
2019-11-15 18:59:44 +00:00
Mario Limonciello
e2b8a2797e Skip cleanup after device is done updating if will-disappear is set (Fixes: #1529)
This fixes a regression introduced by 2031ce3bf6
that leads to:
```
USB error on device 2dc8:5750 : No such device (it may have been disconnected) [-4]
```
2019-11-14 08:06:17 -06:00
YiFei Zhu
8b044c6cb3 efi: use a wildcard section copy for final EFI generation
The GNU gold linker uses the section name `.rela.dyn` instead of
`.rela` for containing the relocation information. If this section
is not copied the EFI executable can crash.

Fixes #1530
2019-11-14 09:46:50 +00:00
Aleksander Morgado
705f5b64e3 modem-manager: explicitly use plain version format
The devices managed by this plugin expose version strings that are to
be treated as plain ASCII and compared just as plain ASCII.
2019-11-13 17:41:22 +00:00
Aleksander Morgado
e66e0b7114 modem-manager: add quirks for the Foxconn T77W968 modules 2019-11-13 10:54:29 +00:00
Mario Limonciello
e8ec462e07 trivial: thunderbolt: clarify error message
In an error block that checks for `NULL` sysfs, you will always see
`(null)` in the string.

```
FuPluginThunderbolt  Unable to read generation: failed get id generation for (null)
```
2019-11-11 16:16:51 -06:00
Richard Hughes
d630b5ee66 superio: Never read from port offset zero
At this point, PM1 IOBAD0 is unset, and thus zero...
2019-11-08 17:51:43 +00:00
Richard Hughes
025fc77d7a superio: Fix regression when coldplugging superio devices
Fixes https://github.com/fwupd/fwupd/issues/1546
2019-11-08 17:51:43 +00:00
Mario Limonciello
9b944d8999 trivial: synapticmst: allow missing /proc/modules
If a kernel is compiled without loadable module support this shouldn't
stop synapticsmst plugin from loading, just we can't do an extra safety
check.
2019-11-08 09:52:02 -06:00
Mario Limonciello
5151aa5222 synapticsmst: filter invalid chip IDs
This device was showing up from a LG 38UC99-W USB-C monitor
```
VMM0000:
      Device ID:           d762543f8c20f636e6fff031a000078d3e10c600
      Summary:             Multi-Stream Transport Device
      Current version:     0.00.000
      Vendor:              Synaptics
      GUIDs:               42addef4-40f9-5e89-b925-d564e35ed368 ← MST-(null)-vmm0000-0
                           cf8c03c5-18bf-53c4-971f-4a08f88932b5 ← MST-(null)-0
                           e9427b6a-7389-5461-a592-1da5f8ec99fd ← MST-(null)
      Device Flags:        • Updatable
```
2019-11-08 09:45:39 -06:00