]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
stm32mp: stm32prog: handle flashlayout without STM32 image header
authorPatrick Delaunay <patrick.delaunay@foss.st.com>
Mon, 28 Mar 2022 17:25:33 +0000 (19:25 +0200)
committerPatrice Chotard <patrice.chotard@foss.st.com>
Tue, 10 May 2022 08:56:39 +0000 (10:56 +0200)
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>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.c

index 65655e25ca7393b96314784aa9f80d3cac8401ee..b7111123ba9ca75f00c760d9c86ef3155c10f2b9 100644 (file)
@@ -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;
        }