EFI Capsule "dfu_alt_info" fixes for TI Boards
cover EFI Capsule "dfu_alt_info" fixes for TI Boards
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 SPI Flash and therefore its associated partitions. While this addresses use-cases where the interface is indeed SPI Flash ("sf"), it breaks use-cases such as USB DFU Boot where the interface is RAM ("ram").
As of commit52c0e5f8a3 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".
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 commit52c0e5f8a3 Merge branch '2024-11-22-assorted-fixes' of the master branch of U-Boot.
Regards,
Siddharth.
Siddharth Vadapalli (5):
board: ti: am64x: evm: Set "dfu_alt_info" only if interface is SPI
Flash
board: ti: j721e: evm: Set "dfu_alt_info" only if interface is SPI
Flash
board: ti: am62x: evm: Set "dfu_alt_info" only if interface is SPI
Flash
board: ti: am62px: evm: Set "dfu_alt_info" only if interface is SPI
Flash
board: ti: j784s4: evm: Set "dfu_alt_info" only if interface is SPI
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(-)
Signature · 1 line
2.43.0
PATCH 1/5 board: ti: am64x: evm: Set "dfu_alt_info" only if interface is SPI Flash
Commit 5b84d2de5e6c ("board: am64x: Define capsule update firmware info") updated the "dfu_alt_info" variable to support use-cases with SPI Flash. However, this breaks use-cases where the interface is not SPI Flash ("sf"). Fix this by setting "dfu_alt_info" only when the interface is "sf".
--- board/ti/am64x/evm.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
board/ti/am64x/evm.c +7 -1
@@ -56,7 +56,13 @@ struct efi_capsule_update_info update_info = {#if IS_ENABLED (CONFIG_SET_DFU_ALT_INFO )void set_dfu_alt_info (char *interface,char *devstr) { -if (IS_ENABLED (CONFIG_EFI_HAVE_CAPSULE_SUPPORT )) +/* +* Since the EFI Capsule support is enabled only for SPI Flash, +* update the "dfu_alt_info" environment variable only if the +* interface happens to be "sf" (SPI Flash). +*/ +if (IS_ENABLED (CONFIG_EFI_HAVE_CAPSULE_SUPPORT ) && + (strcmp (interface,"sf" ) ==0 ))env_set ("dfu_alt_info" , update_info.dfu_string); }#endif
Signature · 1 line
2.43.0
PATCH 2/5 board: ti: j721e: evm: Set "dfu_alt_info" only if interface is SPI Flash
In reply to Siddharth VadapalliCommit 9bd6cc292fa8 ("board: j721e: Define capsule update firmware info") updated the "dfu_alt_info" variable to support use-cases with SPI Flash. However, this breaks use-cases where the interface is not SPI Flash ("sf"). Fix this by setting "dfu_alt_info" only when the interface is "sf".
--- board/ti/j721e/evm.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
board/ti/j721e/evm.c +7 -1
@@ -67,7 +67,13 @@ struct efi_capsule_update_info update_info = {#if IS_ENABLED (CONFIG_SET_DFU_ALT_INFO )void set_dfu_alt_info (char *interface,char *devstr) { -if (IS_ENABLED (CONFIG_EFI_HAVE_CAPSULE_SUPPORT )) +/* +* Since the EFI Capsule support is enabled only for SPI Flash, +* update the "dfu_alt_info" environment variable only if the +* interface happens to be "sf" (SPI Flash). +*/ +if (IS_ENABLED (CONFIG_EFI_HAVE_CAPSULE_SUPPORT ) && + (strcmp (interface,"sf" ) ==0 ))env_set ("dfu_alt_info" , update_info.dfu_string); }#endif
Signature · 1 line
2.43.0
PATCH 3/5 board: ti: am62x: evm: Set "dfu_alt_info" only if interface is SPI Flash
In reply to Siddharth VadapalliCommit 2af879df86f8 ("board: am62x: Define capsule update firmware info") updated the "dfu_alt_info" variable to support use-cases with SPI Flash. However, this breaks use-cases where the interface is not SPI Flash ("sf"). Fix this by setting "dfu_alt_info" only when the interface is "sf".
--- board/ti/am62x/evm.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
board/ti/am62x/evm.c +7 -1
@@ -76,7 +76,13 @@ struct efi_capsule_update_info update_info = {#if IS_ENABLED (CONFIG_SET_DFU_ALT_INFO )void set_dfu_alt_info (char *interface,char *devstr) { -if (IS_ENABLED (CONFIG_EFI_HAVE_CAPSULE_SUPPORT )) +/* +* Since the EFI Capsule support is enabled only for SPI Flash, +* update the "dfu_alt_info" environment variable only if the +* interface happens to be "sf" (SPI Flash). +*/ +if (IS_ENABLED (CONFIG_EFI_HAVE_CAPSULE_SUPPORT ) && + (strcmp (interface,"sf" ) ==0 ))env_set ("dfu_alt_info" , update_info.dfu_string); }#endif
Signature · 1 line
2.43.0
PATCH 4/5 board: ti: am62px: evm: Set "dfu_alt_info" only if interface is SPI Flash
In reply to Siddharth VadapalliCommit 0af78a1a729d ("board: am62px: Define capsule update firmware info") updated the "dfu_alt_info" variable to support use-cases with SPI Flash. However, this breaks use-cases where the interface is not SPI Flash ("sf"). Fix this by setting "dfu_alt_info" only when the interface is "sf".
--- board/ti/am62px/evm.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
board/ti/am62px/evm.c +7 -1
@@ -43,7 +43,13 @@ struct efi_capsule_update_info update_info = {#if IS_ENABLED (CONFIG_SET_DFU_ALT_INFO )void set_dfu_alt_info (char *interface,char *devstr) { -if (IS_ENABLED (CONFIG_EFI_HAVE_CAPSULE_SUPPORT )) +/* +* Since the EFI Capsule support is enabled only for SPI Flash, +* update the "dfu_alt_info" environment variable only if the +* interface happens to be "sf" (SPI Flash). +*/ +if (IS_ENABLED (CONFIG_EFI_HAVE_CAPSULE_SUPPORT ) && + (strcmp (interface,"sf" ) ==0 ))env_set ("dfu_alt_info" , update_info.dfu_string); }#endif
Signature · 1 line
2.43.0
PATCH 5/5 board: ti: j784s4: evm: Set "dfu_alt_info" only if interface is SPI Flash
In reply to Siddharth VadapalliCommit a4d5e5daa847 ("board: sk-am69: Define capsule update firmware info") updated the "dfu_alt_info" variable to support use-cases with SPI Flash. However, this breaks use-cases where the interface is not SPI Flash ("sf"). Fix this by setting "dfu_alt_info" only when the interface is "sf".
--- board/ti/j784s4/evm.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
board/ti/j784s4/evm.c +7 -1
@@ -42,7 +42,13 @@ struct efi_capsule_update_info update_info = {#if IS_ENABLED (CONFIG_SET_DFU_ALT_INFO )void set_dfu_alt_info (char *interface,char *devstr) { -if (IS_ENABLED (CONFIG_EFI_HAVE_CAPSULE_SUPPORT )) +/* +* Since the EFI Capsule support is enabled only for SPI Flash, +* update the "dfu_alt_info" environment variable only if the +* interface happens to be "sf" (SPI Flash). +*/ +if (IS_ENABLED (CONFIG_EFI_HAVE_CAPSULE_SUPPORT ) && + (strcmp (interface,"sf" ) ==0 ))env_set ("dfu_alt_info" , update_info.dfu_string); }#endif
Signature · 1 line
2.43.0
On Sun, Nov 24, 2024 at 10:45:29AM +0530, Siddharth Vadapalli wrote:
Kindly ignore this series. I had mistakenly assumed that "sf" was an abbreviation for SPI Flash. I found out later that it is an abbreviation for Serial Flash as indicated at:
https://docs.u-boot.org/en/latest/usage/dfu.html#overview
I will change all references of "SPI Flash" to "Serial Flash" and post the v2 series.
Regards,
Siddharth.