[PATCH v14 12/15] test: dm: Add test cases for FWU Metadata uclass

Sughosh Ganu sughosh.ganu at linaro.org
Wed Oct 19 06:51:35 CEST 2022


On Tue, 18 Oct 2022 at 22:29, Simon Glass <sjg at chromium.org> wrote:
>
> Hi,
>
> On Tue, 18 Oct 2022 at 05:44, Sughosh Ganu <sughosh.ganu at linaro.org> wrote:
> >
> > Add test cases for accessing the FWU Metadata on the sandbox
> > platform. The sandbox platform also uses the metadata access driver
> > for GPT partitioned block devices.
> >
> > The FWU feature will be tested on the sandbox64 variant with a raw
> > capsule. Remove the FIT capsule testing from sandbox64 defconfig --
> > the FIT capsule test will be run on the sandbox_flattree variant.
> >
> > Signed-off-by: Sughosh Ganu <sughosh.ganu at linaro.org>
> > Suggested-by: Heinrich Schuchardt <xypron.glpk at gmx.de>
> > ---
> > Changes since V13:
> > * Use uclass_first_device_err() to get the FWU metadata device
> > * Call fwu_check_mdata_validity() instead of fwu_mdata_check()
> >
> >  arch/sandbox/Kconfig                          |   6 +
> >  arch/sandbox/dts/test.dts                     |   7 +-
> >  board/sandbox/sandbox.c                       |   8 +
> >  configs/sandbox64_defconfig                   |   5 +-
> >  lib/fwu_updates/fwu.c                         |   6 +
> >  test/dm/Makefile                              |   1 +
> >  test/dm/fwu_mdata.c                           | 147 ++++++++++++++++++
> >  test/dm/fwu_mdata_disk_image.h                | 112 +++++++++++++
> >  .../test_capsule_firmware_fit.py              |   1 -
> >  .../test_capsule_firmware_signed_fit.py       |   1 -
> >  tools/Makefile                                |   4 +-
> >  11 files changed, 293 insertions(+), 5 deletions(-)
> >  create mode 100644 test/dm/fwu_mdata.c
> >  create mode 100644 test/dm/fwu_mdata_disk_image.h
>
> Once this lands I would like to see the disk image moved to test_ut.py
> (as mentioned before).

Yes, I have it on my todo list. I would have taken this up as part of
the current series itself, but the changes that you ask require having
a tool for generating the FWU metadata, and that will be added in the
series for supporting the feature on MTD platforms. Once the relevant
patch hits the mailing list, I will work on this change. Thanks.

-sughosh


More information about the U-Boot mailing list