* [PATCH 1/4] xilinx: zynq: Enable mkeficapsule tools compilation
2022-08-09 14:32 [PATCH 0/4] xilinx: Update capsule update support for Zynq and ZynqMP SD Michal Simek
@ 2022-08-09 14:32 ` Michal Simek
2022-08-09 14:32 ` [PATCH 2/4] xilinx: Fix logic when dfu_alt_info is generated Michal Simek
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Michal Simek @ 2022-08-09 14:32 UTC (permalink / raw)
To: u-boot, git
Zynq can use efi capsule infrastructure that's why enable it by default.
For capsule generation for zynq you can use:
pushd spl
../tools/mkeficapsule -g "1ba29a15-9969-40aa-b424-e86121618664" boot.bin \
--index 1 ../capsule1.bin
popd
./tools/mkeficapsule -g "1a5178f0-87d3-4f36-ac63-3b31a23be305" u-boot.img \
--index 2 capsule2.bin
Signed-off-by: Michal Simek <michal.simek@amd.com>
---
configs/xilinx_zynq_virt_defconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/configs/xilinx_zynq_virt_defconfig b/configs/xilinx_zynq_virt_defconfig
index 7beb5915fcec..e6f8e221a5d5 100644
--- a/configs/xilinx_zynq_virt_defconfig
+++ b/configs/xilinx_zynq_virt_defconfig
@@ -149,3 +149,4 @@ CONFIG_DISPLAY=y
CONFIG_SPL_GZIP=y
CONFIG_EFI_RUNTIME_UPDATE_CAPSULE=y
CONFIG_EFI_CAPSULE_FIRMWARE_RAW=y
+CONFIG_TOOLS_MKEFICAPSULE=y
--
2.36.1
^ permalink raw reply related [flat|nested] 6+ messages in thread* [PATCH 2/4] xilinx: Fix logic when dfu_alt_info is generated
2022-08-09 14:32 [PATCH 0/4] xilinx: Update capsule update support for Zynq and ZynqMP SD Michal Simek
2022-08-09 14:32 ` [PATCH 1/4] xilinx: zynq: Enable mkeficapsule tools compilation Michal Simek
@ 2022-08-09 14:32 ` Michal Simek
2022-08-09 14:32 ` [PATCH 3/4] xilinx: zynq: Use CONFIG_SPL_FS_LOAD_PAYLOAD_NAME for dfu_alt_info Michal Simek
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Michal Simek @ 2022-08-09 14:32 UTC (permalink / raw)
To: u-boot, git
Generate dfu_alt_info only when it is not defined.
Signed-off-by: Michal Simek <michal.simek@amd.com>
---
board/xilinx/zynq/board.c | 3 +--
board/xilinx/zynqmp/zynqmp.c | 3 +--
2 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/board/xilinx/zynq/board.c b/board/xilinx/zynq/board.c
index 63aff0474bea..26ef0488358d 100644
--- a/board/xilinx/zynq/board.c
+++ b/board/xilinx/zynq/board.c
@@ -168,8 +168,7 @@ void set_dfu_alt_info(char *interface, char *devstr)
{
ALLOC_CACHE_ALIGN_BUFFER(char, buf, DFU_ALT_BUF_LEN);
- if (!CONFIG_IS_ENABLED(EFI_HAVE_CAPSULE_SUPPORT) &&
- env_get("dfu_alt_info"))
+ if (env_get("dfu_alt_info"))
return;
memset(buf, 0, sizeof(buf));
diff --git a/board/xilinx/zynqmp/zynqmp.c b/board/xilinx/zynqmp/zynqmp.c
index 57259b60a02e..29a6e3675f3c 100644
--- a/board/xilinx/zynqmp/zynqmp.c
+++ b/board/xilinx/zynqmp/zynqmp.c
@@ -641,8 +641,7 @@ void set_dfu_alt_info(char *interface, char *devstr)
ALLOC_CACHE_ALIGN_BUFFER(char, buf, DFU_ALT_BUF_LEN);
- if (!CONFIG_IS_ENABLED(EFI_HAVE_CAPSULE_SUPPORT) &&
- env_get("dfu_alt_info"))
+ if (env_get("dfu_alt_info"))
return;
memset(buf, 0, sizeof(buf));
--
2.36.1
^ permalink raw reply related [flat|nested] 6+ messages in thread* [PATCH 3/4] xilinx: zynq: Use CONFIG_SPL_FS_LOAD_PAYLOAD_NAME for dfu_alt_info
2022-08-09 14:32 [PATCH 0/4] xilinx: Update capsule update support for Zynq and ZynqMP SD Michal Simek
2022-08-09 14:32 ` [PATCH 1/4] xilinx: zynq: Enable mkeficapsule tools compilation Michal Simek
2022-08-09 14:32 ` [PATCH 2/4] xilinx: Fix logic when dfu_alt_info is generated Michal Simek
@ 2022-08-09 14:32 ` Michal Simek
2022-08-09 14:32 ` [PATCH 4/4] xilinx: Define only mmc devnum not partition Michal Simek
2022-08-23 8:12 ` [PATCH 0/4] xilinx: Update capsule update support for Zynq and ZynqMP SD Michal Simek
4 siblings, 0 replies; 6+ messages in thread
From: Michal Simek @ 2022-08-09 14:32 UTC (permalink / raw)
To: u-boot, git
CONFIG_SPL_FS_LOAD_PAYLOAD_NAME stores the name of firmware file to be
loaded by SPL. Name can be selected via Kconfig that's why use the macro.
Signed-off-by: Michal Simek <michal.simek@amd.com>
---
board/xilinx/zynq/board.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/board/xilinx/zynq/board.c b/board/xilinx/zynq/board.c
index 26ef0488358d..3ab63fa76e09 100644
--- a/board/xilinx/zynq/board.c
+++ b/board/xilinx/zynq/board.c
@@ -177,12 +177,13 @@ void set_dfu_alt_info(char *interface, char *devstr)
case ZYNQ_BM_SD:
snprintf(buf, DFU_ALT_BUF_LEN,
"mmc 0:1=boot.bin fat 0 1;"
- "u-boot.img fat 0 1");
+ "%s fat 0 1", CONFIG_SPL_FS_LOAD_PAYLOAD_NAME);
break;
case ZYNQ_BM_QSPI:
snprintf(buf, DFU_ALT_BUF_LEN,
"sf 0:0=boot.bin raw 0 0x1500000;"
- "u-boot.img raw 0x%x 0x500000",
+ "%s raw 0x%x 0x500000",
+ CONFIG_SPL_FS_LOAD_PAYLOAD_NAME,
CONFIG_SYS_SPI_U_BOOT_OFFS);
break;
default:
--
2.36.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 4/4] xilinx: Define only mmc devnum not partition
2022-08-09 14:32 [PATCH 0/4] xilinx: Update capsule update support for Zynq and ZynqMP SD Michal Simek
` (2 preceding siblings ...)
2022-08-09 14:32 ` [PATCH 3/4] xilinx: zynq: Use CONFIG_SPL_FS_LOAD_PAYLOAD_NAME for dfu_alt_info Michal Simek
@ 2022-08-09 14:32 ` Michal Simek
2022-08-23 8:12 ` [PATCH 0/4] xilinx: Update capsule update support for Zynq and ZynqMP SD Michal Simek
4 siblings, 0 replies; 6+ messages in thread
From: Michal Simek @ 2022-08-09 14:32 UTC (permalink / raw)
To: u-boot, git
The commit 53b406369e9d ("DFU: Check the number of arguments and argument
string strictly") added strict control over string that 0:1 partition
definition is not valid anymore that's why use only device number without
partition ID. Device is specified by 2nd parameter and partition by 3rd.
Signed-off-by: Michal Simek <michal.simek@amd.com>
---
board/xilinx/zynq/board.c | 2 +-
board/xilinx/zynqmp/zynqmp.c | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/board/xilinx/zynq/board.c b/board/xilinx/zynq/board.c
index 3ab63fa76e09..c96433be693b 100644
--- a/board/xilinx/zynq/board.c
+++ b/board/xilinx/zynq/board.c
@@ -176,7 +176,7 @@ void set_dfu_alt_info(char *interface, char *devstr)
switch ((zynq_slcr_get_boot_mode()) & ZYNQ_BM_MASK) {
case ZYNQ_BM_SD:
snprintf(buf, DFU_ALT_BUF_LEN,
- "mmc 0:1=boot.bin fat 0 1;"
+ "mmc 0=boot.bin fat 0 1;"
"%s fat 0 1", CONFIG_SPL_FS_LOAD_PAYLOAD_NAME);
break;
case ZYNQ_BM_QSPI:
diff --git a/board/xilinx/zynqmp/zynqmp.c b/board/xilinx/zynqmp/zynqmp.c
index 29a6e3675f3c..21bcc266826a 100644
--- a/board/xilinx/zynqmp/zynqmp.c
+++ b/board/xilinx/zynqmp/zynqmp.c
@@ -661,13 +661,13 @@ void set_dfu_alt_info(char *interface, char *devstr)
bootseq = mmc_get_env_dev();
if (!multiboot)
snprintf(buf, DFU_ALT_BUF_LEN,
- "mmc %d:1=boot.bin fat %d 1;"
+ "mmc %d=boot.bin fat %d 1;"
"%s fat %d 1",
bootseq, bootseq,
CONFIG_SPL_FS_LOAD_PAYLOAD_NAME, bootseq);
else
snprintf(buf, DFU_ALT_BUF_LEN,
- "mmc %d:1=boot%04d.bin fat %d 1;"
+ "mmc %d=boot%04d.bin fat %d 1;"
"%s fat %d 1",
bootseq, multiboot, bootseq,
CONFIG_SPL_FS_LOAD_PAYLOAD_NAME, bootseq);
--
2.36.1
^ permalink raw reply related [flat|nested] 6+ messages in thread* Re: [PATCH 0/4] xilinx: Update capsule update support for Zynq and ZynqMP SD
2022-08-09 14:32 [PATCH 0/4] xilinx: Update capsule update support for Zynq and ZynqMP SD Michal Simek
` (3 preceding siblings ...)
2022-08-09 14:32 ` [PATCH 4/4] xilinx: Define only mmc devnum not partition Michal Simek
@ 2022-08-23 8:12 ` Michal Simek
4 siblings, 0 replies; 6+ messages in thread
From: Michal Simek @ 2022-08-23 8:12 UTC (permalink / raw)
To: u-boot, git
On 8/9/22 16:32, Michal Simek wrote:
> Hi,
>
> I am sending some patches to fix SD capsule support for Zynq and ZynqMP.
> And also improving logic around it.
>
> Thanks,
> Michal
>
>
> Michal Simek (4):
> xilinx: zynq: Enable mkeficapsule tools compilation
> xilinx: Fix logic when dfu_alt_info is generated
> xilinx: zynq: Use CONFIG_SPL_FS_LOAD_PAYLOAD_NAME for dfu_alt_info
> xilinx: Define only mmc devnum not partition
>
> board/xilinx/zynq/board.c | 10 +++++-----
> board/xilinx/zynqmp/zynqmp.c | 7 +++----
> configs/xilinx_zynq_virt_defconfig | 1 +
> 3 files changed, 9 insertions(+), 9 deletions(-)
>
applied.
M
^ permalink raw reply [flat|nested] 6+ messages in thread