From: Ladislav Michl Date: Fri, 25 May 2007 10:50:32 +0200 Subject: [U-Boot-Users] Question about CFG_ENV_ADDR during RAMBOOT In-Reply-To: <200705250737.54155.sr@denx.de> References: <20070524211114.D65F9353428@atlas.denx.de> <030501c79e4e$862cf740$0302a8c0@atmel.com> <200705250737.54155.sr@denx.de> Message-ID: <20070525085032.GA6916@michl.2n.cz> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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