The logic was built on the presumption of Ubuntu core which doesn't
have /etc/os-release. Since other distributions do have /etc/os-release
adjust the logic to instead build the path explicitly.
At the moment a lot of the failures are only visible when running the
daemon in verbose mode, and the inhibit functionalit provides us a way
to unset FWUPD_DEVICE_FLAG_UPDATABLE from multiple places, as well as
setting the update error for the user to see why.
Most vendors do not mirror the firmware update to an external display,
and some don't behave correctly when the lid is shut and the machine is
docked. Add this quirk just for Lenovo for now.
Fixes https://github.com/fwupd/firmware-lenovo/issues/181
We now have 9 different plugins all using this functionality, and we're
about to add one more. Move this into common code so that all the
plugins are using the same endian and bufsz-safe versions.
We were calling g_module_symbol() 2703 times, which is actually more
expensive than you'd think.
It also means the plugins are actually what we tell people they are:
A set of vfuncs that get run. The reality before that they were dlsym'd
functions that get called at pretty random times.
This means that if the user has a single ESRT entry with a GUID of
00000000-0000-0000-0000-000000000000 then none of them work correctly.
Fixes https://github.com/fwupd/fwupd/issues/3950
Use . instead of source as source is a bashism.
Use /bin/sh as the interpretter as there are no strict bashisms in the
hook.
Ideally the shell expansion using `` is changed to $(), but the escaping
behaviour is complex and dash/busybox sh both support ``.
During my fwupd startup fu_plugin_has_custom_flag gets called 21 times
which causes all HWIDs to be enumerated with 346 calls to the quite
expensive fu_context_lookup_quirk_by_id() function.
Move the flag to a private hashset and enumerate the HWIDs only during
startup. There's nothing plugin specific about them anyway...
To use this use `sudo systemctl edit fwupd.service` and set
`Environment="FWUPD_SYSFSFWDIR=/usr/share/installed-tests/fwupd"`
Fixes https://github.com/fwupd/fwupd/issues/3441
The fact that it currently lives in uefi-capsule is a historical
accident, and it doesn't really belong to tpm-eventlog either.
Fixes some of https://github.com/fwupd/fwupd/issues/3901
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.