All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tom Rini <trini@konsulko.com>
To: u-boot@lists.denx.de
Subject: [PATCH v9 00/11] efi_loader: add capsule update support
Date: Tue, 24 Nov 2020 18:32:26 -0500	[thread overview]
Message-ID: <20201124233226.GL32272@bill-the-cat> (raw)
In-Reply-To: <e98cf764-eb14-efac-be67-866e32410d3a@gmx.de>

On Tue, Nov 24, 2020 at 10:37:10PM +0100, Heinrich Schuchardt wrote:
> On 11/17/20 1:27 AM, AKASHI Takahiro wrote:
> > Summary
> > =======
> > 'UpdateCapsule' is one of runtime services defined in UEFI specification
> > and its aim is to allow a caller (OS) to pass information to the firmware,
> > i.e. U-Boot. This is mostly used to update firmware binary on devices by
> > instructions from OS.
> > 
> > While 'UpdateCapsule' is a runtime services function, it is, at least
> > initially, supported only before exiting boot services alike other runtime
> > functions, [Get/]SetVariable. This is because modifying storage which may
> > be shared with OS must be carefully designed and there is no general
> > assumption that we can do it.
> > 
> > Therefore, we practically support only "capsule on disk"; any capsule can
> > be handed over to UEFI subsystem as a file on a specific file system.
> > 
> > In this patch series, all the related definitions and structures are given
> > as UEFI specification describes, and basic framework for capsule support
> > is provided. Currently supported is
> >   * firmware update (Firmware Management Protocol or simply FMP)
> > 
> > Most of functionality of firmware update is provided by FMP driver and
> > it can be, by nature, system/platform-specific. So you can and should
> > implement your own FMP driver(s) based on your system requirements.
> > Under the current implementation, we provide two basic but generic
> > drivers with two formats:
> >    * FIT image format (as used in TFTP update and dfu)
> >    * raw image format
> > 
> > It's totally up to users which one, or both, should be used on users'
> > system depending on user requirements.
> > 
> > Quick usage
> > ===========
> > 1. You can create a capsule file with the following host command:
> > 
> >    $ mkeficapsule [--fit <fit image> | --raw <raw image>] <output file>
> > 
> > 2. Put the file under:
> > 
> >    /EFI/UpdateCapsule of UEFI system partition
> > 
> > 3. Specify firmware storage to be updated in "dfu_alt_info" variable
> >     (Please follow README.dfu for details.)
> > 
> >    ==> env set dfu_alt_info '...'
> > 
> > 4. After setting up UEFI's OsIndications variable, reboot U-Boot:
> > 
> >    OsIndications <= EFI_OS_INDICATIONS_FILE_CAPSULE_DELIVERY_SUPPORTED
> > 
> > Patch structure
> > ===============
> > Patch#1-#6: main part of implementation
> > Patch#7-#8: utilities
> > Patch#9-#10: pytests
> > Patch#11: for sandbox test
> > 
> > [1] https://git.linaro.org/people/takahiro.akashi/u-boot.git efi/capsule
> > 
> > Prerequisite patches
> > ====================
> > None
> > 
> > Test
> > ====
> > * passed all the pytests which are included in this patch series
> >    on sandbox build locally.
> > * In Travis CI, all tests skipped (or 'S', but it's not a failure, 'F')
> >    because "virt-make-fs" cannot be executed.
> > 
> > Issues
> > ======
> > * Timing of executing capsules-on-disk
> >    Currently, processing a capsule is triggered only as part of
> >    UEFI subsystem initialization. This means that, for example,
> >    firmware update, may not take place at system booting time and
> >    will potentially be delayed until a first call of any UEFI functions.
> >      => See patch#5 for my proposal
> > * A bunch of warnings like
> >      WARNING: Use 'if (IS_ENABLED(CONFIG...))' instead of '#if or #ifdef'
> >      where possible
> >    I don't think that fixing those improves anything.
> > * Add a document in uefi.rst
> 
> What is your status for the test running on Gitlab CI?
> 
> I still see
> test/py/tests/test_efi_capsule/test_capsule_firmware.py sss [  0%]
> in
> https://gitlab.denx.de/u-boot/custodians/u-boot-efi/-/jobs/182120

That means that Azure, Travis and GitLab are just not going to run any
of the capsule tests.  If they can be run manually, that's apparently as
good as we're going to get to start with.

That's not the ideal situation, certainly.  But you haven't answered his
question about if you agree with, or not, what I say about some
try/catch method of using sudo or make-virt-fs, whatever the running
instance supports.  That's likely the blocker to further progress on CI
and these tests running.  Thanks.

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20201124/5a84b073/attachment.sig>

  reply	other threads:[~2020-11-24 23:32 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-17  0:27 [PATCH v9 00/11] efi_loader: add capsule update support AKASHI Takahiro
2020-11-17  0:27 ` [PATCH v9 01/11] efi_loader: define UpdateCapsule api AKASHI Takahiro
2020-11-17  0:27 ` [PATCH v9 02/11] efi_loader: capsule: add capsule_on_disk support AKASHI Takahiro
2020-11-17  0:27 ` [PATCH v9 03/11] efi_loader: capsule: add memory range capsule definitions AKASHI Takahiro
2020-11-17  0:27 ` [PATCH v9 04/11] efi_loader: capsule: support firmware update AKASHI Takahiro
2020-11-21 18:02   ` Sughosh Ganu
2020-11-24  5:51     ` AKASHI Takahiro
2020-11-24  7:37       ` Sughosh Ganu
2020-11-24  8:31         ` AKASHI Takahiro
2020-11-25  1:00   ` Heinrich Schuchardt
2020-11-25  2:12     ` AKASHI Takahiro
2020-11-17  0:27 ` [PATCH v9 05/11] efi_loader: add firmware management protocol for FIT image AKASHI Takahiro
2020-11-17  0:28 ` [PATCH v9 06/11] efi_loader: add firmware management protocol for raw image AKASHI Takahiro
2020-11-17  0:28 ` [PATCH v9 07/11] cmd: add "efidebug capsule" command AKASHI Takahiro
2020-11-17  0:28 ` [PATCH v9 08/11] tools: add mkeficapsule command for UEFI capsule update AKASHI Takahiro
2020-11-24 20:23   ` Heinrich Schuchardt
2020-11-25  1:05     ` AKASHI Takahiro
2020-11-25  1:36       ` AKASHI Takahiro
2020-11-25  6:42       ` Heinrich Schuchardt
2020-11-25  7:32         ` AKASHI Takahiro
2020-11-27 14:22           ` Heinrich Schuchardt
2020-11-29  4:59             ` Heinrich Schuchardt
2020-11-29 23:45               ` AKASHI Takahiro
2020-11-25  5:17     ` AKASHI Takahiro
2020-11-25  6:31       ` Sughosh Ganu
2020-11-25  7:28         ` AKASHI Takahiro
2020-11-17  0:28 ` [PATCH v9 09/11] test/py: efi_capsule: test for FIT image capsule AKASHI Takahiro
2020-11-17  0:28 ` [PATCH v9 10/11] test/py: efi_capsule: test for raw " AKASHI Takahiro
2020-11-17  0:28 ` [PATCH v9 11/11] sandbox: enable capsule update for testing AKASHI Takahiro
2020-11-24 19:05   ` Heinrich Schuchardt
2020-11-25  0:46     ` AKASHI Takahiro
2020-11-24 21:37 ` [PATCH v9 00/11] efi_loader: add capsule update support Heinrich Schuchardt
2020-11-24 23:32   ` Tom Rini [this message]
2020-11-25  2:07     ` Heinrich Schuchardt
2020-11-25  2:23       ` Tom Rini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201124233226.GL32272@bill-the-cat \
    --to=trini@konsulko.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.