public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] howto get the nand flash enviroment variables in env_init ?
@ 2009-06-18  8:34 Manuel Sahm
  2009-06-18  9:39 ` Guennadi Liakhovetski
  0 siblings, 1 reply; 6+ messages in thread
From: Manuel Sahm @ 2009-06-18  8:34 UTC (permalink / raw)
  To: u-boot

Hello,

I want to use the "silent" paramter of ubbot in a dynamically way.
The problem is that I use a Nand Flash to store my uboot paramters.

When the function env_init is called only the default enviroment is
linked as the actual enviroment.
After env_init the serial console is initialized and the banner is
printed.

I want to read out my actual uboot paramters from NAND to check the
silent paramter before any character is sent through the
Serial-Console.
I placed the functions nand_init(); and env_relocate(); into the
function env_init, buth that desn?t work.
(I think there is always a reset ?!)



Could anybody help me please ?

Thanks
Manuel

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

* [U-Boot] howto get the nand flash enviroment variables in env_init ?
  2009-06-18  8:34 [U-Boot] howto get the nand flash enviroment variables in env_init ? Manuel Sahm
@ 2009-06-18  9:39 ` Guennadi Liakhovetski
  2009-06-18  9:58   ` [U-Boot] howto get the nand flash enviroment variables inenv_init ? Manuel Sahm
  0 siblings, 1 reply; 6+ messages in thread
From: Guennadi Liakhovetski @ 2009-06-18  9:39 UTC (permalink / raw)
  To: u-boot

On Thu, 18 Jun 2009, Manuel Sahm wrote:

> Hello,
> 
> I want to use the "silent" paramter of ubbot in a dynamically way.
> The problem is that I use a Nand Flash to store my uboot paramters.
> 
> When the function env_init is called only the default enviroment is
> linked as the actual enviroment.
> After env_init the serial console is initialized and the banner is
> printed.
> 
> I want to read out my actual uboot paramters from NAND to check the
> silent paramter before any character is sent through the
> Serial-Console.
> I placed the functions nand_init(); and env_relocate(); into the
> function env_init, buth that desn?t work.
> (I think there is always a reset ?!)

Doesn't this patch help:

http://lists.denx.de/pipermail/u-boot/2009-May/052901.html

Thanks
Guennadi
---
Guennadi Liakhovetski, Ph.D.

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

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

* [U-Boot] howto get the nand flash enviroment variables  inenv_init ?
  2009-06-18  9:39 ` Guennadi Liakhovetski
@ 2009-06-18  9:58   ` Manuel Sahm
  2009-06-18 11:23     ` Guennadi Liakhovetski
  0 siblings, 1 reply; 6+ messages in thread
From: Manuel Sahm @ 2009-06-18  9:58 UTC (permalink / raw)
  To: u-boot

Hello,

thanks for reply,

this patch is very good in general, but the problem is that the
function nand_boot() is never called in my architecture.
I use a AT91SAM9G20 from Atmel [ARM9].

Do oyu have another idea ?

Thanks a lot
Manuel

>>> Guennadi Liakhovetski <lg@denx.de> 18.06.2009 11:39 >>>
On Thu, 18 Jun 2009, Manuel Sahm wrote:

> Hello,
> 
> I want to use the "silent" paramter of ubbot in a dynamically way.
> The problem is that I use a Nand Flash to store my uboot paramters.
> 
> When the function env_init is called only the default enviroment is
> linked as the actual enviroment.
> After env_init the serial console is initialized and the banner is
> printed.
> 
> I want to read out my actual uboot paramters from NAND to check the
> silent paramter before any character is sent through the
> Serial-Console.
> I placed the functions nand_init(); and env_relocate(); into the
> function env_init, buth that desn?t work.
> (I think there is always a reset ?!)

Doesn't this patch help:

http://lists.denx.de/pipermail/u-boot/2009-May/052901.html 

Thanks
Guennadi
---
Guennadi Liakhovetski, Ph.D.

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 
_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de 
http://lists.denx.de/mailman/listinfo/u-boot

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

* [U-Boot] howto get the nand flash enviroment variables inenv_init ?
  2009-06-18  9:58   ` [U-Boot] howto get the nand flash enviroment variables inenv_init ? Manuel Sahm
@ 2009-06-18 11:23     ` Guennadi Liakhovetski
  2009-06-18 11:42       ` Manuel Sahm
  0 siblings, 1 reply; 6+ messages in thread
From: Guennadi Liakhovetski @ 2009-06-18 11:23 UTC (permalink / raw)
  To: u-boot

On Thu, 18 Jun 2009, Manuel Sahm wrote:

> Hello,

Please, do not top-post.

> thanks for reply,
> 
> this patch is very good in general, but the problem is that the
> function nand_boot() is never called in my architecture.
> I use a AT91SAM9G20 from Atmel [ARM9].
> 
> Do oyu have another idea ?

You mean you boot from another memory (NOR) and have your environment in 
NAND? I think, this is one of configurations, that we said noone would 
ever come up with... Maybe I'm wrong though, see if others correct me.

Thanks
Guennadi
---
Guennadi Liakhovetski, Ph.D.

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

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

* [U-Boot] howto get the nand flash enviroment  variables inenv_init ?
  2009-06-18 11:23     ` Guennadi Liakhovetski
@ 2009-06-18 11:42       ` Manuel Sahm
  2009-06-18 21:45         ` Scott Wood
  0 siblings, 1 reply; 6+ messages in thread
From: Manuel Sahm @ 2009-06-18 11:42 UTC (permalink / raw)
  To: u-boot

>>> Guennadi Liakhovetski <lg@denx.de> 18.06.2009 13:23 >>>
On Thu, 18 Jun 2009, Manuel Sahm wrote:

> Hello,

Please, do not top-post.

> thanks for reply,
> 
> this patch is very good in general, but the problem is that the
> function nand_boot() is never called in my architecture.
> I use a AT91SAM9G20 from Atmel [ARM9].
> 
> Do oyu have another idea ?

You mean you boot from another memory (NOR) and have your environment in 
NAND? I think, this is one of configurations, that we said noone would 
ever come up with... Maybe I'm wrong though, see if others correct me.

Thanks
Guennadi
---
Guennadi Liakhovetski, Ph.D.

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 
 

Hello,
all is inside the NAND flash,

0x00000 First Level Bootloader (which loads the UBoot from 0x20000 to RAM and execute it)
0x20000 UBoot
0x60000 UBootEnviroment
0x80000 UBoot Enviroment Rendundant

So have a look at /lib_arm/board.c
The function nand_init() and env_relocate() sre called too late for the "silent" flag.

I tried to place the functions nand_init() and env_relocate() into the function env_init(), but that crashes...?

Thanks for help
Manuel

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

* [U-Boot] howto get the nand flash enviroment  variables inenv_init ?
  2009-06-18 11:42       ` Manuel Sahm
@ 2009-06-18 21:45         ` Scott Wood
  0 siblings, 0 replies; 6+ messages in thread
From: Scott Wood @ 2009-06-18 21:45 UTC (permalink / raw)
  To: u-boot

On Thu, Jun 18, 2009 at 01:42:54PM +0200, Manuel Sahm wrote:
> >>> Guennadi Liakhovetski <lg@denx.de> 18.06.2009 13:23 >>>
> On Thu, 18 Jun 2009, Manuel Sahm wrote:
> 
> > Hello,
> 
> Please, do not top-post.

Also, please use quote markers and trim what you're not immediately
replying to.

> Hello,
> all is inside the NAND flash,
> 
> 0x00000 First Level Bootloader (which loads the UBoot from 0x20000 to RAM and execute it)

I guess this is something other than u-boot's own NAND loader -- that
would complicate any effort to use u-boot's NAND loader to load the
environment.

> 0x20000 UBoot
> 0x60000 UBootEnviroment
> 0x80000 UBoot Enviroment Rendundant
> 
> So have a look at /lib_arm/board.c
> The function nand_init() and env_relocate() sre called too late for the "silent" flag.
> 
> I tried to place the functions nand_init() and env_relocate() into the function env_init(), but that crashes...?

The full NAND subsystem will not work before relocation.

Here are some options (not of equal desireability):
- Switch to using u-boot's NAND loader, and use Guennadi's patch.
- Extend your external NAND loader to do something similar to Guennadi's
patch.
- Use code similar to the NAND loader to fetch the environment into a
cache-locked buffer (or search through it as you read it).
- Embed your environment into the u-boot image.
- Make the console unconditionally silent until after the environment is
read from NAND normally.
- Put NOR on your board. :-)

-Scott

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

end of thread, other threads:[~2009-06-18 21:45 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-06-18  8:34 [U-Boot] howto get the nand flash enviroment variables in env_init ? Manuel Sahm
2009-06-18  9:39 ` Guennadi Liakhovetski
2009-06-18  9:58   ` [U-Boot] howto get the nand flash enviroment variables inenv_init ? Manuel Sahm
2009-06-18 11:23     ` Guennadi Liakhovetski
2009-06-18 11:42       ` Manuel Sahm
2009-06-18 21:45         ` Scott Wood

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox