[U-Boot-Users] Question about CFG_ENV_ADDR during RAMBOOT

Ladislav Michl ladis at linux-mips.org
Fri May 25 10:50:32 CEST 2007


Hi (and thanks for starting this discussion again),

On Fri, May 25, 2007 at 07:37:53AM +0200, Stefan Roese wrote:
> We also have board with NAND FLASH only and the number of those boards will 
> grow in the near future. The NAND command interface of course need a little 
> more typing, but I always configure a few environment variables to update the 
> images in the NAND FLASH. Something like:
> 
> => setenv nload 'tftp 200000 board/u-boot.bin'
> => setenv nupdate 'nand erase 0 40000;nand write 200000 0 40000'
> => setenv nupd 'run nload nupdate'

Yes, yes :-) Here I agree with Wolfgand and Stefan. U-Boot should
provide commands which reflect principle of device without any
abstraction. Knowing principle means usually less bad surprises coming
out from some hidden abstraction implementation details. That's good for
power users.

Then we can use scripts in enviroment variables to save typing.
This also gives wider range of commands built from 'primitives' Wolfgang
described earlier. And typing 'printenv nupdate' gives a clue what this
command actually does.

And for my grandfather it is possible to hide command line completely:
http://article.gmane.org/gmane.comp.boot-loaders.u-boot/27992

> A simple "run nupd" will update the image for me then. Not much typing 
> involved.
> 
> BTW: I do the same with "normal" NOR FLASH images too, so it always boils down 
> to some env variable commands. And if you have defined those variables in the 
> default env variables, then all "users" can access them right away.

If we implement mtdparts command on dataflash, user can even do:
nand erase kernel0
nand write 0x10400000 kernel0 $filesize

This way you can copy to partition by its symbolic name (you do not need
to remember offset) and this command also doesn't allow you to copy more
than partition size. Partitioning is then done at one place respecting
sector size and other constrains and it is also passed to kernel.

Best regards,
	ladis




More information about the U-Boot mailing list