[PATCH 1/2] command: Allocate history buffer using calloc()

Simon Glass sjg at chromium.org
Sun Dec 3 18:44:25 CET 2023


Hi Marek,

On Sat, 2 Dec 2023 at 13:53, Marek Vasut
<marek.vasut+renesas at mailbox.org> wrote:
>
> The history buffer is currently a static array which can be some
> 10-40 kiB depending on configuration, and so adds considerably to
> the U-Boot binary size. Allocate it dynamically instead to reduce
> the U-Boot binary size.
>
> Signed-off-by: Marek Vasut <marek.vasut+renesas at mailbox.org>
> ---
> Cc: Simon Glass <sjg at chromium.org>
> ---
>  common/cli_readline.c | 26 +++++++++++++++++---------
>  1 file changed, 17 insertions(+), 9 deletions(-)

This is very intriguing...

I would expect this to end up in BSS, so not part of the image, but
allocated when U-Boot starts.

What do you mean by U-Boot binary size? Which architecture is this?

Regards,
Simon


More information about the U-Boot mailing list