public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: John Stile <john@stilen.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] Can I read env from RAM in uboot script?
Date: Fri, 25 Jan 2013 17:56:50 -0800	[thread overview]
Message-ID: <1359165410.7974.114.camel@genx> (raw)

Is it possible to have uboot read it's environment from a RAM address,
rather than NAND?
OR
Can uboot's scripting support load variables from a RAM address?

My NAND layout has redundant halves:
0
  uboot
  ubootenv
  kernel
  fs
128
  uboot
  ubootenv
  kernel
  fs 
256

My firmware update strategy will update the non-booted side of NAND.

It is easy to hack at91bootstrap, to load a uboots env area at some
RAM address, just as it loads uboot at JUMP_ADDR, but how do I get uboot
to use this preloaded uboot-env?

Since uboot takes its environment area address at compile time, I wonder
if uboot could be made to read it from a RAM address (written there by
at91bootstrap), durring the env_relocate_spec()?

So far I have traced:
cpu/arm926ejs/start.S  calls start_armboot()
lib_arm/board.c start_armboot() calls env_relocate()
./common/env_common.c env_relocate() calls env_relocate_spec()
My u-boot.map indicates my env_relocate_spec() comes from env_nand.o
./common/env_nand.c has env_relocate_spec() has ifdefs for
ENV_IS_EMBEDDED, but my config is not.  and CFG_ENV_IS_IN_NAND which I
am currently configured for. 

So where is a good point of attack, or is there one?

             reply	other threads:[~2013-01-26  1:56 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-26  1:56 John Stile [this message]
2013-01-26  7:41 ` [U-Boot] Can I read env from RAM in uboot script? Wolfgang Denk
2013-01-28 21:19   ` John Stile
2013-01-28 21:48     ` Jeroen Hofstee
2013-01-28 22:01       ` Jeroen Hofstee
2013-01-29  0:25         ` John Stile
2013-01-29  9:58           ` Bo Shen
2013-01-29 17:33             ` John Stile
2013-01-30  1:20               ` Bo Shen
2013-01-29  6:37         ` Wolfgang Denk

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=1359165410.7974.114.camel@genx \
    --to=john@stilen.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox