[PATCH 5/6] common: kconfig: raise SYS_CBSIZE default to 1024 for FSL_LSCH2/LSCH3
Vladimir Oltean <[email protected]>
| Newsgroups | org.u-boot-project.lists.u-boot |
|---|---|
| Message-ID | <[email protected]> |
The 512-byte console input buffer limit for Layerscape SoCs originates
from copy-pasted boilerplate in the original LS2085A board support added
in commit f749db3a75ec ("ARMv8/ls2085a_emu: Add LS2085A emulator and
simulator board support"). No rationale was given for the 512-byte
choice; every subsequent FSL_LSCH2 and FSL_LSCH3 common header
(ls1043a, ls1046a, ls1088a, lx2160a, ...) inherited it by convention.
When CONFIG_SYS_CBSIZE was moved to Kconfig in commit d31466b382dd
("Convert CONFIG_SYS_CBSIZE to Kconfig"), the existing 512-byte values
were transcribed mechanically into Kconfig defaults, cementing the
limit without re-examining its validity.
The practical consequence is that environment variables holding
multi-step boot scripts are silently truncated at 510 usable characters
on all Layerscape boards, making it impossible to store commands such
as combined TFTP+flash sequences in a single variable.
The same problem was already identified and fixed for i.MX6 and i.MX7
in commit f7b237b81e5a ("MLK-24380 imx6: Enlarge the console I/O buffer
to 1024"), whose commit message states: "we have some env variables with
long script string and exceed the 512". FSL_LSCH2 and FSL_LSCH3 were
not included in that fix.
Remove FSL_LSCH2 and FSL_LSCH3 from the 512-byte special case, letting
them fall through to the generic default of 1024. This is consistent
with the i.MX6/MX7 precedent and with the majority of other
architectures. Boards that need a larger buffer can still override
CONFIG_SYS_CBSIZE in their defconfig.
The Layerscape defconfigs carrying the now-stale CONFIG_SYS_PBSIZE=532
override were already cleaned up in commit 82d725c31cbd ("configs:
layerscape: drop CONFIG_SYS_PBSIZE=532 override").
Signed-off-by: Vladimir Oltean <[email protected]>
---
common/Kconfig | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/common/Kconfig b/common/Kconfig
index 345be4b8ca14..9409a0f4b540 100644
--- a/common/Kconfig
+++ b/common/Kconfig
@@ -56,8 +56,7 @@ config SYS_CBSIZE
int "Console input buffer size"
default 2048 if ARCH_TEGRA || ARCH_VERSAL || ARCH_ZYNQ || ARCH_ZYNQMP || \
RCAR_GEN3 || ARCH_SOCFPGA_SOC64
- default 512 if ARCH_MX5 || ARCH_MX6 || ARCH_MX7 || FSL_LSCH2 || \
- FSL_LSCH3 || X86
+ default 512 if ARCH_MX5 || ARCH_MX6 || ARCH_MX7 || X86
default 256 if M68K || PPC
default 1024
help
--
2.34.1