From: Wolfgang Denk Date: Mon, 10 Nov 2014 16:47:44 +0100 Subject: [U-Boot] porting u-boot, few final questions In-Reply-To: References: <1415205392077-194761.post@n7.nabble.com> <545A5726.70800@denx.de> <1415207802518-194767.post@n7.nabble.com> <545A90D3.7030607@denx.de> <1415304221761-194989.post@n7.nabble.com> <1415632455656-195399.post@n7.nabble.com> Message-ID: <20141110154744.0F12438230A@gemini.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 Dear Fabio Estevam, In message you wrote: > > > 1. How come setenv is not working in the board file? I tried setenv in > > different locations of board_early_init_f(), board_init(), board_late_init() > > and checkboard(), but it's not working. Did something change? > > Haven't tried it, but if this does not work, then it is a bug that > needs to be fixed. Do you have access to a mx53 qsb board? Does it > work there? Suffix _f trditionally means "running from flash", i. e. this is before relocation to RAM. Here we have usually only a read-ony data segment, no BSS at all, and only limted stack. All complicated stuff like setenv is only supposed to be available after relocation. > On mx6 we have several boards calling setenv from the board files. Actual behaviour is hardware-dependent, but it's better not to make any such guesses. Actually it is usually a very bad idea to mandatorily modify the envrionment in code. This is almost always a design error. 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 Living on Earth may be expensive, but it includes an annual free trip around the Sun.