[U-Boot] [PATCH 0/8] Clean up CONFIG_SYS_{CBSIZE, PBSIZE, MAXARGS, BARGSIZE} definitions

Wolfgang Denk
2017-08-24T18:53:35Z

Dear Thomas,

In message <20170824162318.7132066a@windsurf> you wrote:
>
> > Would it not be even easier (and less code) to move these
> > definitions to Kconfig settings?
>
> I believe this patch series is a step in that direction. With this
> patch series applied, we can now clearly identify which boards have
> custom values for CONFIG_SYS_{CBSIZE, PBSIZE, MAXARGS, BARGSIZE}, and
> therefore more easily move these from the .h files to defconfig files.

So you think moving this to Kconfig would be a second step? Ok,
fine with me.

> Unless of course we decide that having such custom values
> in .h/defconfig is useless, and we want to drop them entirely. As I
> said in my cover letter, I really don't see why a board configuration
> file (be it a .h or a defconfig) should specify the maximum number of
> command arguments or the maximum size of the Linux kernel command line.

I can't say how much of this still applies, but in the old days of
U-Boot there were a number of systems with very restricted
resources; to enable console I/O even in early stages (when running
from parallel NOR flash with only very limited (tatic) RAM for I/O
buffer it was sometimes necessary to set console buffer and print
buffer sizes to really low values.

> The choice for such values is totally independent from the HW, but
> rather tied to the specific use of a given board. For the same board,

No, it is not. Buffer sizes eat on RAM, and there are environments
(like today in SPL) where this may be a precious resource.

> most people will find the default value to be OK, some people will need
> a larger number of command arguments or a bigger Linux kernel command
> line.
>
> Let me know what your preference is.

I think it makes a lot of sense to keep such configuration parameters
changable, but we hould not stop half way but rather move this to
Kconfig so it's easy to use a default setting, and only boards with
special needs have to adjust this in their defconfig files.

Best regards,

Wolfgang Denk

--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Conscious is when you are aware of something, and conscience is when
you wish you weren't.