From mboxrd@z Thu Jan 1 00:00:00 1970 From: stefano babic Date: Tue, 31 Jul 2012 22:51:12 +0200 Subject: [U-Boot] [PATCH] mx53loco: Define CONFIG_BOARD_LATE_INIT In-Reply-To: <20120731195646.E93FA203B34@gemini.denx.de> References: <1343762513-5574-1-git-send-email-fabio.estevam@freescale.com> <20120731195646.E93FA203B34@gemini.denx.de> Message-ID: <50184540.9050301@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Am 31/07/2012 21:56, schrieb Wolfgang Denk: > Dear Fabio Estevam, > Hi Fabio, > In message 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 =====================================================================