From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Stile Date: Fri, 25 Jan 2013 17:56:50 -0800 Subject: [U-Boot] Can I read env from RAM in uboot script? Message-ID: <1359165410.7974.114.camel@genx> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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?