Commit Graph

15 Commits

Author SHA1 Message Date
Mario Limonciello
55de39c077 trivial: reformat the whole tree to match new format 2021-08-24 11:18:40 -05:00
Richard Hughes
3747e245e5 uefi-capsule: Add support for CapsuleOnDisk
Based on a patch by Ilias Apalodimas <ilias.apalodimas@linaro.org>,
many thanks.

Fixes https://github.com/fwupd/fwupd/issues/2900
2021-07-28 17:11:39 +01:00
Richard Hughes
9f808bdbc0 uefi-capsule: Convert two metadata booleans to private flags 2021-07-22 12:47:54 +01:00
Richard Hughes
7b40c111c7 uefi-capsule: Move the results capsule to the FuDevice subclass
This allows us to create subclasses of FuUefiDevice that use different
ways to report update success.
2021-07-22 12:47:54 +01:00
Richard Hughes
d562c007a3 update-capsule: Move FuUefiDevice to a derivable for future use 2021-07-22 12:47:54 +01:00
Richard Hughes
d4bd5cca5a Standardize some of the device summary text
This is supposed to be 'Sentence case' with no trailing fullstop.
2021-07-09 07:07:07 +01:00
Richard Hughes
aaa77c6f51 Allow adding and removing custom flags on devices
The CustomFlags feature is a bit of a hack where we just join the flags
and store in the device metadata section as a string. This makes it
inefficient to check if just one flag exists as we have to split the
string to a temporary array each time.

Rather than adding to the hack by splitting, appending (if not exists)
then joining again, store the flags in the plugin privdata directly.

This allows us to support negating custom properties (e.g. ~hint) and
also allows quirks to append custom values without duplicating them on
each GUID match, e.g.

[USB\VID_17EF&PID_307F]
Plugin = customflag1
[USB\VID_17EF&PID_307F&HUB_0002]
Flags = customflag2

...would result in customflag1,customflag2 which is the same as you'd
get from an enumerated device flag doing the same thing.
2021-06-23 07:59:15 +01:00
Mario Limonciello
73cdf067ed trivial: fixup includes for a variety of plugins 2021-06-14 10:12:45 +01:00
Richard Hughes
6c07675558 uefi-capsule: Split out the Linux specific ESRT enumeration
This allows us to add the same functionality for FreeBSD and Windows.
2021-05-25 17:17:45 +01:00
Richard Hughes
1113a7aa11 trivial: Allow setting FuUefiDevice properties at construction 2021-05-25 17:17:45 +01:00
Richard Hughes
1981c63d58 Remove FuFirmwareImage and just use FuFirmware instead
This allows us to 'nest' firmware formats, and removes a ton of duplication.

The aim here is to deprecate FuFirmwareImage -- it's almost always acting
as a 'child' FuFirmware instance, and even copies most of the vfuncs to allow
custom types. If I'm struggling to work out what should be a FuFirmware and
what should be a FuFirmwareImage then a plugin author has no hope.

For simple payloads we were adding bytes into an image and then the image into
a firmware. This gets really messy when most plugins are treating the FuFirmware
*as* the binary firmware file.

The GBytes saved in the FuFirmware would be considered the payload with the
aim of not using FuFirmwareImage in the single-image case.
2021-03-09 21:14:12 +00:00
Richard Hughes
b3f9841924 Support more than one protocol for a given device
Devices may want to support more than one protocol, and for some devices
(e.g. Unifying peripherals stuck in bootloader mode) you might not even be able
to query for the correct protocol anyway.
2021-03-01 16:14:36 +00:00
Richard Hughes
5c9b1fcc81 Only include the start year in the copyright header
The end year is legally and functionally redundant, and more importantly causes
cherry-pick conflicts when trying to maintain old branches. Use git for history.
2021-01-07 14:48:16 +00:00
Richard Hughes
cf100293b5 Do not export useless device attributes to the client
That giant uint64_t isn't looking so big now, and we'll want to add even more
to it in the future. Split out some private flags that are never useful to the
client, although the #defines will have to remain until we break API again.
2021-01-06 14:36:23 +00:00
Richard Hughes
ee2e2c3674 uefi: Rename to uefi-capsule
Rename the plugin to make it clearer of the scope.

Based on a patch from Mario Limonciello <mario.limonciello@dell.com>
2021-01-05 15:31:22 +00:00