All of lore.kernel.org
 help / color / mirror / Atom feed
From: Martin Egholm Nielsen <martin@egholm-nielsen.dk>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] Re: Environment in flash rather than EEProm
Date: Thu, 27 Jan 2005 11:21:34 +0100	[thread overview]
Message-ID: <ctafbf$m30$1@sea.gmane.org> (raw)
In-Reply-To: <000401c4165b$057364a0$153335bf@cabletime.com>

Hi,

Is the below recipe the way to put the environment in flash?
I can't seem to find any other instructions on this...

BR,
  Martin

> I'm using a PPChameleonEVB, and am trying to move the u-boot environment
> into flash. I've modified the include/configs/PPChameleon.h file as follows:
> 
> #define CFG_ENV_IS_IN_FLASH	1
> #define CFG_ENV_ADDR		0xFFFFA000
> #define CFG_ENV_OFFSET		(CFG_ENV_ADDR - 0xFFFC0000)
> #define CFG_ENV_SIZE		0x2000
> 
> I've added some debugging into the section where it reads the environment,
> and I'm seeing the following:
> 
> 
> 
> U-Boot 1.0.2-adh-2004/03/29 (Mar 30 2004 - 13:40:38)
> 
> CPU:   IBM PowerPC 405EP Rev. B at 133.333 MHz (PLB=133, OPB=66, EBC=33 MHz)
>        IIC Boot EEPROM disabled
>        PCI async ext clock used, internal PCI arbiter enabled
>        16 kB I-Cache 16 kB D-Cache
> Board: ### No HW ID - assuming PPChameleonEVB
> I2C:   ready
> DRAM:  32 MB
> Top of RAM usable for U-Boot at: 02000000
> Reserving 189k for U-Boot at: 01fd0000
> Reserving 256k for malloc() at: 01f90000
> Reserving 128 Bytes for Board Info at: 01f8ff80
> Reserving 48 Bytes for Global Data at: 01f8ff50
> Stack Pointer at: 01f8ff38
> New Stack Pointer is: 01f8ff38
> Now running in RAM - U-Boot at: 01fd0000
> FLASH:  4 MB
> env_relocate[204] offset = 0x2010000
> env_relocate[216] embedded ENV (before reloc) at fffd9474
> env_relocate[218] embedded ENV (after reloc) at 01fe9474
> U-Boot relocated to 01fd0000
> NAND:Probing at 0xff000000
>   32 MB
> ### main_loop entered: bootdelay=5
> 
> ### main_loop: bootcmd="<UNDEFINED>"
> =>
> 
> As you can see, the address of the environment before relocation is
> 0xfffd9474. Shouldn't this be 0xFFFFA000? Is there anything else I need to
> do to force the location of the environment into the required place?
> 
> It looks like the address of the environment is based on the location of the
> 'environment' variable in common/environment.c. Do I need to change the LD
> script to force this variable to a certain location? If so, can anyone help
> with what I need to do (I'm not familiar with LD scripts yet).
> 
> Many thanks.
> 
> Andy
> 
> 
> 
> -------------------------------------------------------
> This SF.Net email is sponsored by: IBM Linux Tutorials
> Free Linux tutorial presented by Daniel Robbins, President and CEO of
> GenToo technologies. Learn everything from fundamentals to system
> administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click

  reply	other threads:[~2005-01-27 10:21 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-03-30 13:29 [U-Boot-Users] Environment in flash rather than EEProm Andy Hawkins
2005-01-27 10:21 ` Martin Egholm Nielsen [this message]
2005-01-28 21:00   ` [U-Boot-Users] " Wolfgang Denk
2005-01-29 19:47     ` Martin Egholm Nielsen
2005-01-29 21:29       ` Wolfgang Denk
2005-02-11 11:59         ` Martin Egholm Nielsen
2005-02-11 12:20           ` Wolfgang Denk
2005-02-11 12:46             ` Martin Egholm Nielsen

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='ctafbf$m30$1@sea.gmane.org' \
    --to=martin@egholm-nielsen.dk \
    --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.