Commit Graph

22 Commits

Author SHA1 Message Date
Mario Limonciello
94874cd067 thunderbolt: Add a new subclassed thunderbolt firmware update type
Thunderbolt images brought in from the SPI don't have a FARB header.
Thunderbolt update images do.

So these two types of images need to be handled separately from the
firmware parser.
2020-05-06 11:13:51 -05:00
Mario Limonciello
ec44dd3353 Modernize the thunderbolt plugin.
Remove it's references to it's own GUdevclient and instead use
FuUdevDevice.

Some intentional casualties of the move:
* Plugin metadata around native and safe mode dropped.
  - These haven't been useful in debugging anything and aren't relevant
    on new hardware
* Extra GUID for 2 host controllers in same system dropped
  - Although this was normally static information BIOS operations like
    turning off PCI-E SD card reader or LAN controller changed things.
* The NVM version is parsed directly instead of through gudev to prevent
  cached data breaking change events.

Remaining TODO:
* Force power w/ thunderbolt-power doesn't work
2020-04-29 13:15:45 -05:00
Richard Hughes
3ed2ac8315 trivial: Unexport fu_test_get_filename()
We don't actually need either of the things it provides (looking up in source
and built, and converting to an absolute path) so just replace it with
g_build_filename() instead.

This also has the advantage that it does the right thing on Windows.
2019-11-27 12:45:35 +00:00
Mario Limonciello
6b0e66354b Convert libfwupdprivate to a shared library libfwupdplugin 2019-11-27 11:32:43 +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
6865dd3bac thunderbolt: Add support for kernel safety checks (Fixes: #1312)
There are commits to the Thunderbolt kernel driver that make sure
that the upgrade process goes smoothly.  If these commits aren't
present then it will look like a fwupd problem, when it's actually
a kernel problem.

When this issue was reported it appeared that commit
e4be8c9b6a
was missing from the locally tested kernel, but it's impossible
to determine that from userspace.

Prevent running the thunderbolt plugin on older kernels than that
set in `$sysconfdir/fwupd/thunderbolt.conf`.

By default that is set to 4.13.0, but if a distribution vendor has
backported all the necessary support it can be decreased to a lower
version for distro packages.
2019-08-28 11:06:18 -05:00
Richard Hughes
96e6783982 trivial: Fix potential compile failures for high -j values 2019-02-01 16:52:16 +00:00
Richard Hughes
f425d29a28 Show a console warning if loading an out-of-tree plugin
Fixes https://github.com/hughsie/fwupd/issues/950
2019-01-19 07:26:20 +00:00
Richard Hughes
0e17e6d030 Fix building with -Wl,-z,defs
This allows us to find undefined references at compile time, not runtime.
2018-12-25 16:10:54 -06:00
Mario Limonciello
b900fe6b4e trivial: move all Dell dock related quirks into dell.quirk
These quirks aren't really needed if compiled without the Dell plugin
since they just set the parentage.
2018-09-05 08:10:52 -05:00
Mario Limonciello
926da40a88 thunderbolt: Move setting parentage of TB16 into quirks 2018-08-28 18:30:00 +01:00
Richard Hughes
95227a919d trivial: Move gudev to the core plugin deps 2018-08-26 19:38:58 +01:00
Richard Hughes
a4c1530a69 thunderbolt: Fix the self tests when using -Db_sanitize=address 2018-06-28 20:55:37 +01:00
Richard Hughes
d0cff7caec Remove autoconf-isms from the meson configure options
See https://wiki.gnome.org/Initiatives/GnomeGoals/MesonPorting
2017-11-27 18:07:53 +00:00
Yehezkel Bernat
e6c00362ad thunderbolt: image validation implemented
Fixes: https://github.com/hughsie/fwupd/issues/189

Signed-off-by: Yehezkel Bernat <yehezkel.bernat@intel.com>
2017-08-30 12:37:34 +01:00
Christian Kellner
1283003f2f thunderbolt: only build tests if glib >= 2.52
This change should restore building fwupd with the new thunderbolt
plugin on older systems.
2017-08-25 16:12:55 +02:00
Richard Hughes
6cbc7a6623 thunderbolt: Increase the runtime timeout for the self tests 2017-08-23 18:34:01 +01:00
Philip Withnall
efcc7a0545 thunderbolt: Drop unnecessary fwup dependency
Signed-off-by: Philip Withnall <withnall@endlessm.com>
2017-08-22 10:15:02 +01:00
Christian Kellner
73ba7ee82c thunderbolt: plugin for new tbt kernel interface
Thunderbolt has a new kernel interface starting from version 4.13,
which simplifies updating the host controller and devices: the
kernel now exposes a sysfs interface for the non-volatile memory
as a device node. This can be used to write the new firmware blob.
Updates are then triggered also via a simple write to a sysfs
file (nvm_authenticate), which in turn is also used for error
reporting.
The plugin should be functionally, but a few items are missing:
 - image verification
 - safe mode handling
2017-08-21 17:05:44 +01:00
Richard Hughes
260e970297 Rename the thunderbolt plugin to tbtfwu 2017-07-30 17:39:25 +01:00
Richard Hughes
463f80566c trivial: Fix linking in the thunderbolt plugin 2017-04-12 17:54:46 +01:00
Richard Hughes
57746cb839 Add the Meson build system as an alternate to autotools
Automake and autoconf are impossible to fully understand and Meson now provides
everything we need for a much smaller, faster, and more understandable build.

See http://mesonbuild.com/ for more information.
2017-04-12 16:35:18 +01:00