All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] configs: am65x_evm: Define the maximum file size for DFU
@ 2020-11-24 10:29 Aswath Govindraju
  2020-12-23  8:14 ` Lokesh Vutla
  0 siblings, 1 reply; 2+ messages in thread
From: Aswath Govindraju @ 2020-11-24 10:29 UTC (permalink / raw)
  To: u-boot

In include/dfu.h, if CONFIG_SYS_DFU_MAX_FILE_SIZE is not defined then it is
defined as CONFIG_SYS_DFU_DATA_BUF_SIZE. This is 128 KiB for a53 core and
20 KiB for r5 core. If a larger file is transferred using dfu then it
fails.

CONFIG_SYS_DFU_DATA_BUF_SIZE can not be increased as there is not enough
heap memory to be allocated for the buffer in case of R5 spl.

Fix this by defining CONFIG_SYS_DFU_MAX_FILE_SIZE as the default
CONFIG_SYS_DFU_DATA_BUF_SIZE value.

Signed-off-by: Aswath Govindraju <a-govindraju@ti.com>
---
 include/configs/am65x_evm.h | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/include/configs/am65x_evm.h b/include/configs/am65x_evm.h
index 41c62785e438..9d9d0c93a206 100644
--- a/include/configs/am65x_evm.h
+++ b/include/configs/am65x_evm.h
@@ -56,6 +56,12 @@
 #define CONFIG_SKIP_LOWLEVEL_INIT
 #endif
 
+/*
+ * If the maximum size is not declared then it is defined as
+ * CONFIG_SYS_DFU_DATA_BUF_SIZE.
+ */
+#define CONFIG_SYS_DFU_MAX_FILE_SIZE	(1024 * 1024 * 8)   /* 8 MiB */
+
 #define CONFIG_SPL_MAX_SIZE		CONFIG_SYS_K3_MAX_DOWNLODABLE_IMAGE_SIZE
 
 #define CONFIG_SYS_BOOTM_LEN		SZ_64M
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [PATCH] configs: am65x_evm: Define the maximum file size for DFU
  2020-11-24 10:29 [PATCH] configs: am65x_evm: Define the maximum file size for DFU Aswath Govindraju
@ 2020-12-23  8:14 ` Lokesh Vutla
  0 siblings, 0 replies; 2+ messages in thread
From: Lokesh Vutla @ 2020-12-23  8:14 UTC (permalink / raw)
  To: u-boot



On 24/11/20 3:59 pm, Aswath Govindraju wrote:
> In include/dfu.h, if CONFIG_SYS_DFU_MAX_FILE_SIZE is not defined then it is
> defined as CONFIG_SYS_DFU_DATA_BUF_SIZE. This is 128 KiB for a53 core and
> 20 KiB for r5 core. If a larger file is transferred using dfu then it
> fails.
> 
> CONFIG_SYS_DFU_DATA_BUF_SIZE can not be increased as there is not enough
> heap memory to be allocated for the buffer in case of R5 spl.
> 
> Fix this by defining CONFIG_SYS_DFU_MAX_FILE_SIZE as the default
> CONFIG_SYS_DFU_DATA_BUF_SIZE value.
> 
> Signed-off-by: Aswath Govindraju <a-govindraju@ti.com>

Applied to u-boot-ti/for-next

Thanks and regards,
Lokesh

> ---
>  include/configs/am65x_evm.h | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/include/configs/am65x_evm.h b/include/configs/am65x_evm.h
> index 41c62785e438..9d9d0c93a206 100644
> --- a/include/configs/am65x_evm.h
> +++ b/include/configs/am65x_evm.h
> @@ -56,6 +56,12 @@
>  #define CONFIG_SKIP_LOWLEVEL_INIT
>  #endif
>  
> +/*
> + * If the maximum size is not declared then it is defined as
> + * CONFIG_SYS_DFU_DATA_BUF_SIZE.
> + */
> +#define CONFIG_SYS_DFU_MAX_FILE_SIZE	(1024 * 1024 * 8)   /* 8 MiB */
> +
>  #define CONFIG_SPL_MAX_SIZE		CONFIG_SYS_K3_MAX_DOWNLODABLE_IMAGE_SIZE
>  
>  #define CONFIG_SYS_BOOTM_LEN		SZ_64M
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-12-23  8:14 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-24 10:29 [PATCH] configs: am65x_evm: Define the maximum file size for DFU Aswath Govindraju
2020-12-23  8:14 ` Lokesh Vutla

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.