[U-Boot] Can I read env from RAM in uboot script?

John Stile john at stilen.com
Sat Jan 26 02:56:50 CET 2013


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?










More information about the U-Boot mailing list