This allows us to override the location we load data files from, which
allows us to do more kinds of installed tests in the future.
Also, move the global data/tests content into the place that it is used
as it was getting impossible to manage.
Additionally, if the client does not set the feature flag `fde-warning`,
add an extra paragraph into the update description.
Fixes https://github.com/fwupd/fwupd/issues/3829
It would seem that some EFI BMP loaders are unable to flip the image
and hang when trying to load the UX capsule.
This was a real PITA to debug.
Many thanks to Sean Rhodes <sean@starlabs.systems> for all the help.
It's actually quite hard to build a front-end for fwupd at the moment
as you're never sure when the progress bar is going to zip back to 0%
and start all over again. Some plugins go 0..100% for write, others
go 0..100% for erase, then again for write, then *again* for verify.
By creating a helper object we can easily split up the progress of the
specific task, e.g. write_firmware().
We can encode at the plugin level "the erase takes 50% of the time, the
write takes 40% and the read takes 10%". This means we can have a
progressbar which goes up just once at a consistent speed.
Capsule update on-disk was added a while ago.
Document the config file changes and limitations on firmwares that's
doesn't support RT->SetVariable
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
More than one person has asked about 'why call fu_plugin_update() for a
reinstall or downgrade' and I didn't have a very good answer.
The plugin API is not officially stable, and we should fix things to be
less confusing. Use the same verbs as the FuDevice vfuncs instead.
Applying updates to my new P1G3:
* schedule the update in fwupd
* boot into the BootNext
* apply the capsule with RT->UpdateCapsule
* reboot with RT->ResetSystem
Except the firmware updater EFI binary then wasn't running. The ESRT
last_attempt_status comes back as Success on the reboot.
Disabling the UX capsule made the update apply correctly each and every
time. Until we can work out what models are affected, use a per-vendor
quirk to avoid delaying the release.
Shim has had a hard time with loading updates from arguments in the
most recent release and this isn't the first time that happened.
Give distros and users an escape hatch that will allow using GRUB
instead.
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.
Data is accessed at offset 0x13, so the code must abort if size is
0x13 when you can access only offsets 0x00 through 0x12.
Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
On Alterlake and newer hardware the Platform Health Assessment Record
data can be used by the IHV to debug why a specific capsule update
failed. Any custom firmware loaded by the OEM can be identified and
used to further debug the root cause.