[U-Boot] [PATCH 0/2] Deprecate Linux bootargs munging with CONFIG_SILENT_CONSOLE.

Wolfgang Denk
2012-01-10T22:16:02Z

Dear Doug Anderson,

In message <CAD=FV=Wr9JNLOP_0=KUgV-aO1Qf6ZXf4xXOX3azyh3-Ns3v0Ng@mail.gmail.com> you wrote:
>
> > personally i found the current behavior useful, but the code to implement it
> > is crappy. ?oh well.
>
> Agreed. However, in the previous thread Wolfgang was of the view that
> the behavior of silencing linux is best achieved with scripts. I'm OK
> with that approach which is why I've submitted the current patch.
>
> I believe that you can do a script something like this (where
> normal_bootargs is the old bootargs without the console= part,
> console_args is the non-silent console settings, and old_bootcmd is
> the old bootcmd):
>
> setenv generate_bootargs 'if test -n "$silent"; then \
> setenv bootargs $normal_bootargs console=; \
> else \
> setenv bootargs $normal_bootargs $console_args;
> fi'
> setenv bootcmd 'run generate_bootargs; run old_bootcmd'
>
> Hopefully this works for you. I'll add it to the documentation, too.

In which way would this approach avoid the problem (potential overflow
of cmdline max size) that you are trying to fix with your patch?

If the existing code overflows the environment, this macro will doe
the same.

So you actually do not fix any problem, but you remove existing
functionality that has been used in a number of projects, so you
actually break a number of boards.

Hm... why should we apply this patch, then?

Best regards,

Wolfgang Denk

--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
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
What about WRITING it first and rationalizing it afterwords? :-)
- Larry Wall in <8162@jpl-devvax.JPL.NASA.GOV>