public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: stefano babic <sbabic@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] mx53loco: Define CONFIG_BOARD_LATE_INIT
Date: Tue, 31 Jul 2012 22:51:12 +0200	[thread overview]
Message-ID: <50184540.9050301@denx.de> (raw)
In-Reply-To: <20120731195646.E93FA203B34@gemini.denx.de>

Am 31/07/2012 21:56, schrieb Wolfgang Denk:
> Dear Fabio Estevam,
> 

Hi Fabio,

> In message <CAOMZO5CBpA4kVC+J6Yp8RwmL-EbLwK1PcYWC_RLX=SwWRnqsyg@mail.gmail.com> you wrote:
> ...
>>
>> -#ifdef CONFIG_BOARD_LATE_INIT
>>  int board_late_init(void)
>>  {
>> -	setenv("stdout", "serial");
>> +	setenv("preboot", "setenv stdout serial\0");
> 
> NAK.  Please never, never ever mandatorily overwrite environment
> variables!  The user who sets it to a different value and cannot find
> out why his settings don;t work and always get overwritten would be
> seriously frustrated.

Maybe a better way is to use CONFIG_PREBOOT as you do, but without
hard-coding the variable. You can add "preboot" to the default
environment (CONFIG_EXTRA_ENV_SETTINGS), and the user can still
overwrite the behavior setting the variable in the u-boot shell.

But I see I did not follow the same approach for the mx51evk (blame on
me !).

Stefano


-- 
=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80  Email: office at denx.de
=====================================================================

  reply	other threads:[~2012-07-31 20:51 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-31 19:21 [U-Boot] [PATCH] mx53loco: Define CONFIG_BOARD_LATE_INIT Fabio Estevam
2012-07-31 19:38 ` Fabio Estevam
2012-07-31 19:56   ` Wolfgang Denk
2012-07-31 20:51     ` stefano babic [this message]
2012-07-31 19:59 ` Wolfgang Denk
2012-07-31 20:40 ` stefano babic
2012-07-31 20:50   ` Wolfgang Denk
2012-07-31 21:20     ` stefano babic
2012-08-05  7:34 ` Stefano Babic
2012-08-05 10:11   ` Stefano Babic

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=50184540.9050301@denx.de \
    --to=sbabic@denx.de \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox