[PATCH 2/4] fwu-mdata: Make FWU_MDATA_GPT_BLK depend on DFU

Tom Rini trini at konsulko.com
Fri Nov 17 16:47:21 CET 2023


On Fri, Nov 17, 2023 at 04:35:22PM +0100, Heinrich Schuchardt wrote:
> On 8/17/23 19:41, Tom Rini wrote:
> > The implementation of this option in lib/fwu_updates/fwu_gpt.c is wholly
> > dependent on DFU, so make that a requirement here.
> > 
> > Signed-off-by: Tom Rini <trini at konsulko.com>
> > ---
> > I'm honestly not sure how to best proceed here as
> > drivers/fwu-mdata/gpt_blk.c doesn't need DFU, but both files are
> > controlled by this single symbol.
> > 
> > Cc: Masami Hiramatsu <masami.hiramatsu at linaro.org>
> > Cc: Jassi Brar <jaswinder.singh at linaro.org>
> > Cc: Sughosh Ganu <sughosh.ganu at linaro.org>
> > Cc: Ilias Apalodimas <ilias.apalodimas at linaro.org>
> > Cc: Heinrich Schuchardt <xypron.glpk at gmx.de>
> > ---
> >   drivers/fwu-mdata/Kconfig | 2 +-
> >   1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/drivers/fwu-mdata/Kconfig b/drivers/fwu-mdata/Kconfig
> > index 42736a5e43b0..0bd5fef4abfa 100644
> > --- a/drivers/fwu-mdata/Kconfig
> > +++ b/drivers/fwu-mdata/Kconfig
> > @@ -15,7 +15,7 @@ config FWU_MDATA_GPT_BLK
> >   	bool "FWU Metadata access for GPT partitioned Block devices"
> >   	select PARTITION_TYPE_GUID
> >   	select PARTITION_UUIDS
> > -	depends on FWU_MDATA && BLK && EFI_PARTITION
> > +	depends on FWU_MDATA && BLK && EFI_PARTITION && DFU
> 
> Hello Tom,
> 
> This looks like the wrong level of configuration to add a DFU dependency.
> 
> EFI_CAPSULE_FIRMWARE_FIT and EFI_CAPSULE_FIRMWARE_RAW select DFU and
> EFI_CAPSULE_FIRMWARE.
> 
> We probably should let CONFIG_FWU_MDATA depend on EFI_CAPSULE_ON_DISK.

OK, but that doesn't address the dependency? The code in
lib/fwu_updates/fwu_gpt.c needs DFU and is under FWU_MDATA_GPT_BLK. It
provides fwu_plat_get_alt_num() which is called by fwu_get_image_index()
and is under FWU_MULTI_BANK_UPDATE and in turn called by
efi_firmware_raw_set_image() which is under EFI_CAPSULE_FIRMWARE_RAW. If
both lib/fwu_updates/fwu_gpt.c and drivers/fwu-mdata/gpt_blk.c should be
under the same symbol then it needs to depend on DFU, since it's a
direct dependency in the code. We could change it up to
EFI_CAPSULE_FIRMWARE_RAW I guess, but I'm not sure that's cleaner.

-- 
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/20231117/701750d8/attachment.sig>


More information about the U-Boot mailing list