* [PATCH] cli: Reduce size of readline buffers in SPL
@ 2022-08-30 20:40 Sean Anderson
2022-08-31 2:59 ` Simon Glass
2022-09-15 14:03 ` Tom Rini
0 siblings, 2 replies; 3+ messages in thread
From: Sean Anderson @ 2022-08-30 20:40 UTC (permalink / raw)
To: Tom Rini, u-boot; +Cc: Simon Glass, Sean Anderson
Normally, readline is not used int SPL. However, it may be useful to
enable the Freescale DDR interactive mode in SPL, while U-Boot is still
executing from SRAM. The default settings for readline result in a large
buffer being allocated. Reduce the size of the maximum input line, and
the number of lines of scrollback when building for SPL.
Signed-off-by: Sean Anderson <sean.anderson@seco.com>
---
common/cli_readline.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/common/cli_readline.c b/common/cli_readline.c
index c7614a4c90f..2b81763b016 100644
--- a/common/cli_readline.c
+++ b/common/cli_readline.c
@@ -72,8 +72,13 @@ static char *delete_char (char *buffer, char *p, int *colp, int *np, int plen)
#define getcmd_getch() getchar()
#define getcmd_cbeep() getcmd_putch('\a')
+#ifdef CONFIG_SPL_BUILD
+#define HIST_MAX 3
+#define HIST_SIZE 32
+#else
#define HIST_MAX 20
#define HIST_SIZE CONFIG_SYS_CBSIZE
+#endif
static int hist_max;
static int hist_add_idx;
--
2.35.1.1320.gc452695387.dirty
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] cli: Reduce size of readline buffers in SPL
2022-08-30 20:40 [PATCH] cli: Reduce size of readline buffers in SPL Sean Anderson
@ 2022-08-31 2:59 ` Simon Glass
2022-09-15 14:03 ` Tom Rini
1 sibling, 0 replies; 3+ messages in thread
From: Simon Glass @ 2022-08-31 2:59 UTC (permalink / raw)
To: Sean Anderson; +Cc: Tom Rini, U-Boot Mailing List
On Tue, 30 Aug 2022 at 14:40, Sean Anderson <sean.anderson@seco.com> wrote:
>
> Normally, readline is not used int SPL. However, it may be useful to
> enable the Freescale DDR interactive mode in SPL, while U-Boot is still
> executing from SRAM. The default settings for readline result in a large
> buffer being allocated. Reduce the size of the maximum input line, and
> the number of lines of scrollback when building for SPL.
>
> Signed-off-by: Sean Anderson <sean.anderson@seco.com>
> ---
>
> common/cli_readline.c | 5 +++++
> 1 file changed, 5 insertions(+)
Reviewed-by: Simon Glass <sjg@chromium.org>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] cli: Reduce size of readline buffers in SPL
2022-08-30 20:40 [PATCH] cli: Reduce size of readline buffers in SPL Sean Anderson
2022-08-31 2:59 ` Simon Glass
@ 2022-09-15 14:03 ` Tom Rini
1 sibling, 0 replies; 3+ messages in thread
From: Tom Rini @ 2022-09-15 14:03 UTC (permalink / raw)
To: Sean Anderson; +Cc: u-boot, Simon Glass
[-- Attachment #1: Type: text/plain, Size: 578 bytes --]
On Tue, Aug 30, 2022 at 04:40:37PM -0400, Sean Anderson wrote:
> Normally, readline is not used int SPL. However, it may be useful to
> enable the Freescale DDR interactive mode in SPL, while U-Boot is still
> executing from SRAM. The default settings for readline result in a large
> buffer being allocated. Reduce the size of the maximum input line, and
> the number of lines of scrollback when building for SPL.
>
> Signed-off-by: Sean Anderson <sean.anderson@seco.com>
> Reviewed-by: Simon Glass <sjg@chromium.org>
Applied to u-boot/next, thanks!
--
Tom
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-09-15 14:04 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-30 20:40 [PATCH] cli: Reduce size of readline buffers in SPL Sean Anderson
2022-08-31 2:59 ` Simon Glass
2022-09-15 14:03 ` Tom Rini
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.