public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Tom Rini <trini@konsulko.com>
To: u-boot@lists.denx.de
Subject: [PATCH v7 00/17] efi_loader: add capsule update support
Date: Wed, 4 Nov 2020 07:57:53 -0500	[thread overview]
Message-ID: <20201104125753.GS5340@bill-the-cat> (raw)
In-Reply-To: <20201104093624.GA243036@laputa>

On Wed, Nov 04, 2020 at 06:36:24PM +0900, AKASHI Takahiro wrote:
> Hi Tom,
> 
> On Thu, Oct 29, 2020 at 10:43:01AM -0400, Tom Rini wrote:
> > On Thu, Oct 29, 2020 at 01:47:40PM +0900, 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-#4,#12: preparatory patches
> > > Patch#5-#11,#13: main part of implementation
> > > Patch#14-#15: utilities
> > > Patch#16-#17: pytests
> > > 
> > > [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.
> > > 
> > > Please note that the capsule pytest itself won't be run in the CI
> > > partly because some specific configuration for sandbox build is
> > > required and partly because there is a problem with virt-make-fs.
> > > See test_efi_capsule_firmware.py.
> > 
> > Maybe we need to talk about this differently then.  Today, the tests
> > start on CI and then fail to run.  That's a problem that needs to be
> > fixed, they must "skip" properly.  I would really like to see these
> > tests run with every CI loop.  That means doing a "try virt-make-fs, if
> > that fails, try sudo, if that fails, skip".  That also means updating
> > some other tests that have logic for virt-make-fs, but it then causes CI
> > to fail rather than try sudo.
> 
> I think that you still misunderstand the point.
> Whatever you expect by saying "try virt-make-fs, if that fails, try sudo,
> if that fails, skip," Heinrich will *not* accept any test script that
> contains "sudo" command.
> I can do nothing here unless he changes his mind.
> 
> Or do you want to see the solution like "try virt-make-fs, if
> that fails, skip"?

Yes, you need to figure out some way to make the tests pass, without
sudo being present.  You also need to CI not fail if we can't run the
tests.  Further, it would be really nice if we could also run these
tests in CI.  Running the tests in CI may require sudo being used, just
like how that's the only way other tests are run in CI today.  That will
be acceptable.  Right Heinrich?

-- 
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/20201104/ae7e14f7/attachment.sig>

  reply	other threads:[~2020-11-04 12:57 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-29  4:47 [PATCH v7 00/17] efi_loader: add capsule update support AKASHI Takahiro
2020-10-29  4:47 ` [PATCH v7 01/17] dfu: rename dfu_tftp_write() to dfu_write_by_name() AKASHI Takahiro
2020-10-29 14:43   ` Tom Rini
2020-10-30  4:45     ` AKASHI Takahiro
2020-10-30  8:40     ` Lukasz Majewski
2020-10-29  4:47 ` [PATCH v7 02/17] dfu: modify an argument type for an address AKASHI Takahiro
2020-10-29 14:43   ` Tom Rini
2020-10-29  4:47 ` [PATCH v7 03/17] common: update: add a generic interface for FIT image AKASHI Takahiro
2020-10-29 14:43   ` Tom Rini
2020-10-29  4:47 ` [PATCH v7 04/17] dfu: export dfu_list AKASHI Takahiro
2020-10-29 14:43   ` Tom Rini
2020-10-29  4:47 ` [PATCH v7 05/17] efi_loader: add option to initialise EFI subsystem early AKASHI Takahiro
2020-10-29  4:47 ` [PATCH v7 06/17] efi_loader: add efi_create_indexed_name() AKASHI Takahiro
2020-10-29  4:47 ` [PATCH v7 07/17] efi_loader: define UpdateCapsule api AKASHI Takahiro
2020-10-29  4:47 ` [PATCH v7 08/17] efi_loader: capsule: add capsule_on_disk support AKASHI Takahiro
2020-10-29  4:47 ` [PATCH v7 09/17] efi_loader: capsule: add memory range capsule definitions AKASHI Takahiro
2020-10-29  4:47 ` [PATCH v7 10/17] efi_loader: capsule: support firmware update AKASHI Takahiro
2020-10-29  4:47 ` [PATCH v7 11/17] efi_loader: add firmware management protocol for FIT image AKASHI Takahiro
2020-10-29  4:47 ` [PATCH v7 12/17] dfu: add dfu_write_by_alt() AKASHI Takahiro
2020-10-29 14:43   ` Tom Rini
2020-10-29  4:47 ` [PATCH v7 13/17] efi_loader: add firmware management protocol for raw image AKASHI Takahiro
2020-10-29  4:47 ` [PATCH v7 14/17] cmd: add "efidebug capsule" command AKASHI Takahiro
2020-10-29  4:47 ` [PATCH v7 15/17] tools: add mkeficapsule command for UEFI capsule update AKASHI Takahiro
2020-10-29  4:47 ` [PATCH v7 16/17] test/py: efi_capsule: test for FIT image capsule AKASHI Takahiro
2020-10-29  4:47 ` [PATCH v7 17/17] test/py: efi_capsule: test for raw " AKASHI Takahiro
2020-10-29 14:43 ` [PATCH v7 00/17] efi_loader: add capsule update support Tom Rini
2020-11-04  9:36   ` AKASHI Takahiro
2020-11-04 12:57     ` Tom Rini [this message]
2020-10-30  7:54 ` Heinrich Schuchardt
2020-10-30  7:59   ` Heinrich Schuchardt
2020-10-30 17:46 ` [PATCH] test: unit test for efi_create_indexed_name() Heinrich Schuchardt
2020-10-30 17:46   ` Heinrich Schuchardt

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=20201104125753.GS5340@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox