[U-Boot] [PATCH] powerpc/85xx: corenet_ds: increase console buffer size to 1024

Scott Wood scottwood at freescale.com
Tue Sep 27 20:26:32 CEST 2011


On 09/27/2011 04:45 AM, Wolfgang Denk wrote:
> Dear Scott Wood,
> 
> In message <4E80EA72.3090807 at freescale.com> you wrote:
>>
>>> Do we? We have not had that feature for over a decade and nobody ever
>>> really suffered from it. Now we have "env -f reset" for almost a
>>> year, and guess how many percent of the users even know about this
>>> command? And how many have ever actually used it yet?
>>
>> I think he's saying that one shouldn't be prohibited by length from
>> manually typing "setenv nfsboot ..." to set a value that is no longer
>> than (or even is identical to) the default value.
> 
> It is up to the board maintainer not to set any default values that
> are longer than the buffer size he defines himself in the same config
> file.

And there are two ways of fixing such a situation.

>> What is the resource constraint here that prevents accepting longer
>> console commands?  This is a change to the config for a board that comes
>> with multiple gigabytes of RAM.  This is not code that runs prior to
>> relocation.
> 
> It is simply braindead to define variables which are so long. They
> are unreadable and a PITA to edit.
> 
> You don't write all your C code in a single line per function, or do
> you?

Of course not, but this a rather different environment, that doesn't
support multiline code in the same way.  It's more like macro
substitution, and yes, there are times when I'd have C macros that are
more than 256 characters.

>> Whether the environment scripts could, in time, be structured better is
>> a separate issue from whether there's a good reason to keep this
>> arbitrary limit at its current value that prevents people from manually
>> typing in what is currently being used.
> 
> The question is what the bug is.  My point of view is that the bug is
> with a variable definition that is longer than the limit, so the
> variable should be changed (as the limit is already more than
> reasonably long).

If 256 is "more than reasonably long", are you going to force all the
boards that set it to 512 or 1024 to change?  Or does this just apply to
those boards that were unlucky enough to not have the bigger limit from
day one?

-Scott



More information about the U-Boot mailing list