On Thu, Mar 12, 2026 at 10:10:06AM +0100, Mattijs Korpershoek wrote: > Hi Tom, > > Thank you for the patch. > > On Tue, Mar 10, 2026 at 10:26, Tom Rini <[email protected]> wrote: > > > The DFU_WRITE_ALT symbol is used both directly and indirectly (via > > UPDATE_COMMON) for EFI capsule updates (FIT or raw), but does not depend > > on DFU itself. Move this symbol outside of "if DFU" to remove a Kconfig > > dependency problem. > > Looking at drivers/dfu/dfu_alt.c both dfu_write_by_name() and > dfu_write_by_alt() seem to rely on functions from drivers/dfu/dfu.c such > as dfu_init_env_entities(), dfu_get_entity() and more. > > Looking at UPDATE_COMMON, I see: > config UPDATE_COMMON > bool > select DFU_WRITE_ALT > imply CMD_TFTPBOOT > > And if we check the code in common/update.c, we can see that > dfu_write_by_name() is called. > > So fit_update() calls > dfu_write_by_name() which calls > dfu_init_env_entities() which might no longer be defined when > applying this patch. > > I'm not sure how is this supposed to work. Do we have to stub > dfu_init_env_entities() ?
So, to me the challenge is that DFU_TFTP, UPDATE_FIT and UPDATE_TFTP all are the three users of UPDATE_COMMON and so DFU_WRITE_ALT. The first two depend on DFU, but the latter does not. And there's nothing in-tree using it, either (but it does compile I believe, or allyesconfig would have failed). -- Tom
signature.asc
Description: PGP signature

