All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] how to load u-boot environment from nand while spl is loading
@ 2015-11-11 15:29 Francesco Lucconi
  2015-11-11 15:38 ` Marek Vasut
  0 siblings, 1 reply; 3+ messages in thread
From: Francesco Lucconi @ 2015-11-11 15:29 UTC (permalink / raw)
  To: u-boot

I'm working with imx28evk reference board with u-boot 2011.12 and for my 
specific purposes I have to load u-boot nand environment during spl 
binary is loading. I'm working with a static environment but this is not 
so useful because I need to initialize some drivers (such as serial 
console) with the current values stored within nand flash environment 
(such as baudrate variable).
Comparing my u-boot version with more recent ones (u-boot 2015.10) I've 
found out that the enviroment loading has been applied during ram 
bootstrapping...can't we do this operation before u-boot.bin has been 
loaded in ddr memory?
Could you send me any tips to solve this issue?
-- 
Francesco Lucconi
SW Design Dept.


Via 1? Maggio, 26
60131 Ancona - Zona Baraccola (Italy)
T: +39 071 2506590
F: +39 071 2506518
Email: francesco.lucconi at aethra.com <mailto:francesco.lucconi@aethra.com>
Website: www.aethra.com <http://www.aethra.com>
------------------------------------------------------------------------
NOTA BENE: Le informazioni contenute in questo messaggio sono riservate 
e sono destinate esclusivamente alle persone indicate in indirizzo o a 
chi sia stato da quelle autorizzato. La confidenzialit? e la 
riservatezza non vengono in alcun modo meno neanche nel caso in cui il 
messaggio sia stato per errore trasmesso a persona o soggetto diverso 
dal destinatario e, in ogni caso, la circolazione e la riproduzione di 
questo messaggio ? strettamente proibita. Se avete ricevuto questo 
messaggio per errore, vi preghiamo di contattarci immediatamente (Legge 
196/03).
PLEASE NOTE: The information contained in this message is privileged and 
confidential and is intended only for use of the addressee(s) or of 
those responsible to deliver it to the addressee(s). Neither the 
confidentiality nor any privilege attaching to this message is waived, 
lost or destroyed by reason that it has been mistakenly transmitted to a 
person or entity other than the addressee(s). Please note that any 
distribution, dissemination or copying of this message is strictly 
prohibited. In case you have received this message in error, please 
notify us immediately (Law 196/03).
-------------- next part --------------
A non-text attachment was scrubbed...
Name: firma.gif
Type: image/gif
Size: 5428 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20151111/5141cd09/attachment.gif>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [U-Boot] how to load u-boot environment from nand while spl is loading
  2015-11-11 15:29 [U-Boot] how to load u-boot environment from nand while spl is loading Francesco Lucconi
@ 2015-11-11 15:38 ` Marek Vasut
  2015-11-17 18:33   ` Scott Wood
  0 siblings, 1 reply; 3+ messages in thread
From: Marek Vasut @ 2015-11-11 15:38 UTC (permalink / raw)
  To: u-boot

On Wednesday, November 11, 2015 at 04:29:34 PM, Francesco Lucconi wrote:

Hi,

> I'm working with imx28evk reference board with u-boot 2011.12 and for my
> specific purposes I have to load u-boot nand environment during spl
> binary is loading. I'm working with a static environment but this is not
> so useful because I need to initialize some drivers (such as serial
> console) with the current values stored within nand flash environment
> (such as baudrate variable).
> Comparing my u-boot version with more recent ones (u-boot 2015.10) I've
> found out that the enviroment loading has been applied during ram
> bootstrapping...can't we do this operation before u-boot.bin has been
> loaded in ddr memory?
> Could you send me any tips to solve this issue?

I think that the latest mainline already configures the serial console from
the environment or at least it sets up the environment to be complete enough
for getenv() to work. I'd suggest you give that a spin.

I cannot help you with the ancient U-Boot from Freescale and I'd suggest you
to avoid it like plague if at all possible.

Best regards,
Marek Vasut

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [U-Boot] how to load u-boot environment from nand while spl is loading
  2015-11-11 15:38 ` Marek Vasut
@ 2015-11-17 18:33   ` Scott Wood
  0 siblings, 0 replies; 3+ messages in thread
From: Scott Wood @ 2015-11-17 18:33 UTC (permalink / raw)
  To: u-boot

On Wed, 2015-11-11 at 16:38 +0100, Marek Vasut wrote:
> On Wednesday, November 11, 2015 at 04:29:34 PM, Francesco Lucconi wrote:
> 
> Hi,
> 
> > I'm working with imx28evk reference board with u-boot 2011.12 and for my
> > specific purposes I have to load u-boot nand environment during spl
> > binary is loading. I'm working with a static environment but this is not
> > so useful because I need to initialize some drivers (such as serial
> > console) with the current values stored within nand flash environment
> > (such as baudrate variable).
> > Comparing my u-boot version with more recent ones (u-boot 2015.10) I've
> > found out that the enviroment loading has been applied during ram
> > bootstrapping...can't we do this operation before u-boot.bin has been
> > loaded in ddr memory?
> > Could you send me any tips to solve this issue?
> 
> I think that the latest mainline already configures the serial console from
> the environment or at least it sets up the environment to be complete enough
> for getenv() to work. I'd suggest you give that a spin.

getenv() will work but that doesn't answer the question of which environment
it's accessing.  Typically in NAND SPL it will access a hard-coded default
environment, with the on-flash environment only being accessed from the main U
-Boot.

If CONFIG_NAND_ENV_DST is used, the SPL can load the real environment, but
there are no longer any boards that use CONFIG_NAND_ENV_DST (smdk6400 did but
it was removed due to lack of maintenance).

-Scott

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-11-17 18:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-11 15:29 [U-Boot] how to load u-boot environment from nand while spl is loading Francesco Lucconi
2015-11-11 15:38 ` Marek Vasut
2015-11-17 18:33   ` Scott Wood

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.