All of lore.kernel.org
 help / color / mirror / Atom feed
From: Patrick Delaunay <patrick.delaunay@foss.st.com>
To: <u-boot@lists.denx.de>
Cc: Patrick Delaunay <patrick.delaunay@foss.st.com>,
	Jaehoon Chung <jh80.chung@samsung.com>,
	Patrice Chotard <patrice.chotard@foss.st.com>,
	Simon Glass <sjg@chromium.org>,
	U-Boot STM32 <uboot-stm32@st-md-mailman.stormreply.com>
Subject: [PATCH 8/8] stm32mp: stm32prog: handle flashlayout without STM32 image header
Date: Mon, 28 Mar 2022 19:25:33 +0200	[thread overview]
Message-ID: <20220328192520.8.I8052625ddd2a94516d82b9b7472a34ba52fbc2fa@changeid> (raw)
In-Reply-To: <20220328172534.1196119-1-patrick.delaunay@foss.st.com>

Accept flashlayout without header in alternate 0, to simplify
the support of stm32prog command with dfu-util.

By default the flashlayout file size is the size of the received binary,
provided with the offset in the DFU alternate.

Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
---

 arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.c b/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.c
index 65655e25ca..b7111123ba 100644
--- a/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.c
+++ b/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.c
@@ -1706,7 +1706,8 @@ static void stm32prog_end_phase(struct stm32prog_data *data, u64 offset)
 			return;
 		}
 #endif
-		if (parse_flash_layout(data, STM32_DDR_BASE, 0))
+		log_notice("\nFlashLayout received, size = %lld\n", offset);
+		if (parse_flash_layout(data, STM32_DDR_BASE, offset))
 			stm32prog_err("Layout: invalid FlashLayout");
 		return;
 	}
-- 
2.25.1


  parent reply	other threads:[~2022-03-28 17:27 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-28 17:25 [PATCH 0/8] stm32mp: command stm32prog improvements Patrick Delaunay
2022-03-28 17:25 ` [PATCH 1/8] stm32mp: stm32prog: fix comment Patrick Delaunay
2022-04-22  7:41   ` Patrice CHOTARD
2022-05-10  7:27   ` Patrice CHOTARD
2022-03-28 17:25 ` [PATCH 2/8] stm32mp: stm32prog: add CONFIG_CMD_STM32PROG_OTP Patrick Delaunay
2022-04-22  7:41   ` Patrice CHOTARD
2022-05-10  7:27   ` Patrice CHOTARD
2022-03-28 17:25 ` [PATCH 3/8] stm32mp: stm32prog: add TEE support in stm32prog command Patrick Delaunay
2022-04-22  7:42   ` Patrice CHOTARD
2022-05-10  7:27   ` Patrice CHOTARD
2022-03-28 17:25 ` [PATCH 4/8] stm32mp: stm32prog: add support of STM32IMAGE version 2 Patrick Delaunay
2022-04-22  7:42   ` Patrice CHOTARD
2022-05-10  7:27   ` Patrice CHOTARD
2022-03-28 17:25 ` [PATCH 5/8] stm32mp: stm32prog: add support of UUID for FIP partition Patrick Delaunay
2022-04-22  7:42   ` Patrice CHOTARD
2022-05-10  7:28   ` Patrice CHOTARD
2022-03-28 17:25 ` [PATCH 6/8] stm32mp: stm32prog: handle interruption during the first enumeration Patrick Delaunay
2022-04-22  7:42   ` Patrice CHOTARD
2022-05-10  7:29   ` Patrice CHOTARD
2022-03-28 17:25 ` [PATCH 7/8] stm32mp: stm32prog: handle U-Boot script in flashlayout alternate Patrick Delaunay
2022-04-22  7:43   ` Patrice CHOTARD
2022-05-10  7:30   ` Patrice CHOTARD
2022-03-28 17:25 ` Patrick Delaunay [this message]
2022-04-22  7:43   ` [PATCH 8/8] stm32mp: stm32prog: handle flashlayout without STM32 image header Patrice CHOTARD
2022-05-10  7:30   ` Patrice CHOTARD

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220328192520.8.I8052625ddd2a94516d82b9b7472a34ba52fbc2fa@changeid \
    --to=patrick.delaunay@foss.st.com \
    --cc=jh80.chung@samsung.com \
    --cc=patrice.chotard@foss.st.com \
    --cc=sjg@chromium.org \
    --cc=u-boot@lists.denx.de \
    --cc=uboot-stm32@st-md-mailman.stormreply.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.