[PATCH v2 0/5] EFI Capsule "dfu_alt_info" fixes for TI Boards

Jon Humphreys j-humphreys at ti.com
Tue Nov 26 02:51:54 CET 2024


Siddharth Vadapalli <s-vadapalli at ti.com> writes:

> Hello,
>
> This series fixes the commits which introduced EFI Capsule support. The
> blamed commits unconditionally updated "dfu_alt_info" with the
> "dfu_string" corresponding to Serial Flash and therefore its associated
> partitions. While this addresses use-cases where the interface is indeed
> Serial Flash ("sf"), it breaks use-cases such as USB DFU Boot where the
> interface is RAM ("ram").
>
> As of commit
> 52c0e5f8a3 Merge branch '2024-11-22-assorted-fixes'
> of the master branch of U-Boot, USB DFU Boot on AM625-SK is
> non-functional. Logs:
> https://gist.github.com/Siddharth-Vadapalli-at-TI/726854b49eb199f4acf79028212fabdc
>
> In order to fix this, update "dfu_alt_info" only if the interface is
> "sf".

Hi Siddharth, this is an issue that I also discovered while working on a
separate issue with Collabora, but haven't posted a patch yet.  The issue
is that when DFU booting, spl_dfu_cmd() will setup it's own value for
dfu_alt_info before calling run_dfu().  In our existing code, however, this
will get overridden by set_dfu_alt_info().  This issue isn't specific to TI
boards.

Can you try this patch to drivers/dfu/dfu.c to see if it solves the
problems you are seeing:

@@ -153,10 +153,11 @@ int dfu_init_env_entities(char *interface, char
*devstr)

  dfu_reinit_needed = false;

+ str_env = env_get("dfu_alt_info");
 #ifdef CONFIG_SET_DFU_ALT_INFO
- set_dfu_alt_info(interface, devstr);
+ if (!str_env) {
+ set_dfu_alt_info(interface, devstr);
+ str_env = env_get("dfu_alt_info");
+ }
#endif
- str_env = env_get("dfu_alt_info");
  if (!str_env) {
  pr_err("\"dfu_alt_info\" env variable not defined!\n");
  return -EINVAL;

thanks
Jon

>
> The patch for AM62x in this series has been tested and it fixes USB DFU
> Boot on AM625-SK. Logs:
> https://gist.github.com/Siddharth-Vadapalli-at-TI/feaed5b0a30aff752306d370531a4e10
>
> Series is based on commit
> 52c0e5f8a3 Merge branch '2024-11-22-assorted-fixes'
> of the master branch of U-Boot.
>
> v1 of this series is at:
> https://patchwork.ozlabs.org/project/uboot/list/?series=433959&state=%2A&archive=both
> Changes since v1:
> - Replaced "SPI Flash" with "Serial Flash" everywhere.
>
> Regards,
> Siddharth.
>
> Siddharth Vadapalli (5):
>   board: ti: am64x: evm: Set "dfu_alt_info" only if interface is Serial
>     Flash
>   board: ti: j721e: evm: Set "dfu_alt_info" only if interface is Serial
>     Flash
>   board: ti: am62x: evm: Set "dfu_alt_info" only if interface is Serial
>     Flash
>   board: ti: am62px: evm: Set "dfu_alt_info" only if interface is Serial
>     Flash
>   board: ti: j784s4: evm: Set "dfu_alt_info" only if interface is Serial
>     Flash
>
>  board/ti/am62px/evm.c | 8 +++++++-
>  board/ti/am62x/evm.c  | 8 +++++++-
>  board/ti/am64x/evm.c  | 8 +++++++-
>  board/ti/j721e/evm.c  | 8 +++++++-
>  board/ti/j784s4/evm.c | 8 +++++++-
>  5 files changed, 35 insertions(+), 5 deletions(-)
>
> -- 
> 2.43.0


More information about the U-Boot mailing list