[U-Boot] [PATCH] cmd_nand/cmd_ubi/cmd_nboot: Set environment variable 'filesize'

Lisovy Rostislav lisovy at gmail.com
Mon Jul 21 10:58:10 CEST 2014


On Po, 2014-07-21 at 10:29 +0200, Wolfgang Denk wrote:
> I have to admit that I don't even see the use case where such a new
> variable would be helpful.
> 
> Your patch was adding this to commands like "nand read" etc.  All
> these commands require you to pass the size to be read as argument,
> so you already have the size information present.
> 
> Why would you want to store it in another variable?

The motivation for the "nand read" is that when the whole NAND flash
partition is read (without passing the size as an argument) it may
happen that the bad blocks are skipped thus amount of data read is not
the same as the partition size. When we want to "nand write" the data to
another partition, it would be nice to know the exact size.
For the "nboot" case we use it to speed up copying of the kernel from
the "image-for-upgrade" partition to the "production-kernel" partition.
This helps us to avoid unnecessary copying of the whole partition (and
saves some time).

Best regards;
Rostislav Lisovy




More information about the U-Boot mailing list