All of lore.kernel.org
 help / color / mirror / Atom feed
From: Aras Vaichas <arasv@magtech.com.au>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] ENV in NAND and in EEPROM ?
Date: Mon, 31 Mar 2008 12:27:56 +1100	[thread overview]
Message-ID: <47F03E1C.6060003@magtech.com.au> (raw)
In-Reply-To: <!&!AAAAAAAAAAAYAAAAAAAAAHPNBStbvZ9BluURSOZ8EsPCgAAAEAAAANR1pEiCP4ZGuttOdIFIQTYBAAAAAA==@freenet.de>

Manuel Sahm wrote:
>
> Hello,
>
>  
>
> I want to use an eeprom AND an NANDFLASH for storing the Enviroment Data.
>
>  
>
> First: The EEPROM should be connected via SPI, so I have to make a c
> file within the function for spi_write and spi_read?to use it with the
> CFG_CMD_EEPROM.
>
> right ?
>
>  
>
> Now my second question:
>
> I want to achieve that the uboot first looks in NANDFlash, if the ENV
> is damaged, look at NANDFLASH_REDUNDAND area [This is what is normally
> implemented, I think, and it works], now if these both areas of NAND
> Flash are damaged, the ubbot should have a lokk at the eeprom to load
> its environment?
>
>  
>
Why so many backup areas? Is your hardware prone to multiple mass
failures? Perhaps you have a hardware problem that needs fixing.

Did you know that the U-Boot binary image itself contains the original
copy of the environment? This is the safest and best backup you can use.
I would use the EEPROM to load in particular changes to specific U-Boot
variables.

> Is it possible ??
>
With a little effort. Normally the environment is only stored in one
place and switched on/off via #defines. I predict a fair amount of
restructuring would be necessary but it depends on how you want to go
about it, really.

> What files do I have to adapt, and where?s the point in the code,
> where the printenv/setenv command is attached to the NANDFLASH/EEPROM
> Function to load the data ?
>
Do you know the "grep" command? Try "man grep".

Then try in your U-Boot source directory.
# grep -r "saveenv" *
or
# grep -ir "environment" *

 

If you are able to find the code yourself then you will learn the U-Boot
codebase a little better.

Aras



______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
______________________________________________________________________

      reply	other threads:[~2008-03-31  1:27 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-29 14:42 [U-Boot-Users] ENV in NAND and in EEPROM ? Manuel Sahm
2008-03-31  1:27 ` Aras Vaichas [this message]

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=47F03E1C.6060003@magtech.com.au \
    --to=arasv@magtech.com.au \
    --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 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.