Commit Graph

138 Commits

Author SHA1 Message Date
Richard Hughes
54dcd29b3c trivial: Use the new fwup_get_esp_mountpoint() call to log the defined ESP 2018-03-09 13:44:45 +00:00
Richard Hughes
d421da0597 trivial: Set the fwupdate esp mountpoint in setup() 2018-03-09 13:44:45 +00:00
Richard Hughes
afd05b88bd trivial: Load the custom ESP mountpoint from _setup() 2018-03-09 13:44:45 +00:00
Richard Hughes
00a5f2cb30 trivial: Code style fixup 2018-03-02 14:52:42 +00:00
Mario Limonciello
963dc4245c
uefi: Allow overriding ESP mount point via conf file (Fixes: #421) (#422)
* uefi: Allow overriding ESP mount point via conf file (Fixes: #421)
2018-02-27 14:26:58 -06:00
Mario Limonciello
02c469052f uefi: Report if UX capsule was supported in the report metadata 2018-02-19 15:06:29 -06:00
Mario Limonciello
a076c81a07 uefi: Log the efivar library version too into the report 2018-02-13 19:19:11 +00:00
Mario Limonciello
b27639ae9f uefi: Save SecureBoot status into debug log and LVFS report 2018-02-13 09:18:30 -06:00
Mario Limonciello
65a61c7b6f uefi: Record the fwupdate library version in metadata
When creating a regex for https://github.com/hughsie/lvfs-website/issues/43
it would be useful to have this
2018-02-06 19:29:28 +00:00
Mario Limonciello
a50f985edc uefi: Add a device name for locked devices (#364)
These are devices that UEFI capsule support is turned off in BIOS
setup.  Unlocking them can turn UEFI capsule support
2018-01-15 19:32:18 +00:00
Mario Limonciello
a66ad15855 Fix UX capsule reference to the one in efivar
The work for this landed in what will turn into efivar 33.

Later down the road when efivar 33 is in most the major distros
this can be removed and a requirement set for efivar 33.
2018-01-12 09:08:18 +00:00
Richard Hughes
80b79bb9aa trivial: Allow plugins to add metadata to the uploaded reports 2018-01-11 21:28:22 +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
74a80ccc50 dell: Use the new quirk infrastructure for version numbers 2017-11-02 19:08:51 +00:00
Richard Hughes
5cc168fa79 uefi: Do not use system-specific infomation for PCI devices
We should not use system quirks for version formatting or use the SMBIOS name
as a prefix for non-integral devices.
2017-09-26 19:50:37 +01:00
Richard Hughes
2fac59f64a trivial: Refactor the UEFI resource coldplug into a new helper
No functional changes.
2017-09-26 19:50:37 +01:00
Richard Hughes
9b4a66c8f8 uefi: Support uploading the firmware splash image 2017-09-26 19:50:37 +01:00
Richard Hughes
d8790e19a9 trivial: Factor out the call to fwup_set_up_update_with_buf() for future use 2017-09-26 19:50:37 +01:00
Richard Hughes
08a37992f9 Allow plugins to depend on each other
The only things that plugins can declare is that they should be run before,
after or never with regard to another plugin.
2017-09-21 17:09:06 +01:00
Richard Hughes
c8d028207f uefi: Do not set the release version
Instead, put the failing version number in the error message where it belongs.
2017-09-13 14:05:50 +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
7ac92109eb trivial: Remove useless config.h defines
The HAVE_UEFI_UNLOCK and HAVE_UEFI_GUID defines are always present for the
libfwup version we require.
2017-09-06 23:07:50 +01:00
Richard Hughes
54237e276d trivial: Use upstreamed libfwup functions added in 0.5 2017-09-06 23:07:50 +01:00
Richard Hughes
5075fa9c5b trivial: Remove some defines added in 0.3
For reference, we depend on at least 0.5...
2017-09-06 23:07:50 +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
e0f28539ab trivial: Pedantic error literal conversion 2017-08-26 18:09:21 +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
d7704d4cc2 Allow plugins to get DMI data from the hardware in a safe way
The returned strings are converted to ASCII and have leading and trailing
spaces removed.
2017-08-09 10:19:13 +01:00
Mario Limonciello
c29b398ad0 trivial: fix various spelling errors 2017-07-17 13:07:05 -05:00
Mario Limonciello
e68b118044 uefi: test for kernel support during coldplug
The kernel offers two interfaces for manipulation of EFI variables.
Make sure that at least one of these is available.

If another interface is added (and supported by efivar) then this
list will need to be appended as well.

This was raised as a potential problem in #100.
2017-07-10 14:11:22 -05:00
Mario Limonciello
c7e5322454 dell, uefi: Display all errors recorded by efi_error tracing, not just the first one 2017-07-10 14:11:10 -05:00
Mario Limonciello
8cb067d528 trivial: uefi: whitespace 2017-07-06 12:39:33 -05:00
Mario Limonciello
f043f1f94b uefi: record boot variables to system log during updates (#152)
This doesn't strictly resolve the encountered issue, but
it will aide in debugging these types of issues in the future.
2017-07-06 12:37:10 -05:00
Richard Hughes
79acb58c7e uefi: Fix crash when the product name is NULL
...bad things happen when you try to free a const char...
2017-07-06 18:27:01 +01:00
Mario Limonciello
c1a4bd469d uefi,dell: make error messages from installing capsules useful
Before:
$ fwupdmgr install XPS_test.cab
Retrying as an offline update...
Scheduling…            UEFI firmware update failed: -1

After:
$ fwupdmgr install XPS_test.cab
Retrying as an offline update...
Scheduling…            UEFI firmware update failed: libfwup.c:733 get_paths(): could not find shim or fwup on ESP: No such file or directory
2017-07-06 11:38:33 -05:00
Mario Limonciello
be3a994922 Display UEFI firmware type
This will be more important as devices include more than
one entry in the ESRT.
2017-07-05 17:16:18 -05:00
Richard Hughes
ccda0d2be7 uefi: Add a translatable string for future use
This is added now so the translator teams get a chance to translate it before
it is used in anger.
2017-05-22 12:01:26 +01:00
Richard Hughes
cff38bcb3a Convert the providers to plugins to simplify code and for future features
This is a large commit that removes all the providers and turns them into
plugins. I think having both providers _and_ plugins was super confusing.

Plugins are loaded at runtime so you could in theory develop a new plugin
without putting it in the fwupd source tree, although there are no installed
headers or PC files as I'm not sure it's a good idea at this stage.

This commit moves all the per-provider docs, tests, notes, debug dumps and test
data to plugin-specific directories -- these also allows the plugin author to
"own" more of the source tree so we don't enforce fu- prefixes and the style
guide everywhere.

This allows us to run the same action on all the plugins in the future, so we
could have a prepare(FuPlugin, FuDevice) and cleanup(FuPlugin, FuDevice) run
on *all* plugins, so doing an update using one plugin would allow us to work
around hardware quirks in other plugins.

If I've broken your out-of-tree provider it's trivial to port to the new API
with sed and a fixed up build file. If you need help please let me know.
2016-12-12 12:31:23 +00:00