efi_loader: Allow capsule update on-disk without checking OsIndications
authorIlias Apalodimas <ilias.apalodimas@linaro.org>
Tue, 29 Jun 2021 04:55:51 +0000 (07:55 +0300)
committerHeinrich Schuchardt <xypron.glpk@gmx.de>
Fri, 2 Jul 2021 16:29:06 +0000 (18:29 +0200)
commit0fa5020c024e49222ca97ead3502b332d35dea76
tree10b8e9309e37a4f9b0fd2dfc2a6c75812e44d7ac
parent149108a3eb594b03561073aa6fd512cacab57c62
efi_loader: Allow capsule update on-disk without checking OsIndications

Although U-Boot supports capsule update on-disk, it's lack of support for
SetVariable at runtime prevents applications like fwupd from using it.

In order to perform the capsule update on-disk the spec says that the OS
must copy the capsule to the \EFI\UpdateCapsule directory and set a bit in
the OsIndications variable.  The firmware then checks for the
EFI_OS_INDICATIONS_FILE_CAPSULE_DELIVERY_SUPPORTED bit in OsIndications
variable, which is set by the submitter to trigger processing of the
capsule on the next reboot.

Let's add a config option which ignores the bit and just relies on the
capsule being present. Since U-Boot deletes the capsule while processing
it, we won't end up applying it multiple times.

Note that this is allowed for all capsules. In the future, once
authenticated capsules are fully supported, we can limit the functionality
to those only.

Signed-off-by: apalos <ilias.apalodimas@linaro.org>
Reword Kconfig description.
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
lib/efi_loader/Kconfig
lib/efi_loader/efi_capsule.c