[U-Boot] [PATCH] cmd_nand/cmd_ubi/cmd_nboot: Set environment variable 'filesize'
Lisovy Rostislav
lisovy at gmail.com
Mon Jul 21 10:08:14 CEST 2014
Dear Mr. Denk;
On St, 2014-07-16 at 14:45 +0200, Wolfgang Denk wrote:
> I'm not happy with that. I think this is actually dangerous.
>
> First, you mix two different concepts here. As the name "FILEsize"
> suggests, it is related to the size of a data object "file". This
> comes as natural name when loading data from a TFTP server or when
> reading a *file* from some file system. Extending this to mean any
> amount of data looks inconsistent and even broken to me.
>
> Second, there might be scripts out there which get broken by your
> modification. For example, when I download a file over TFTP to RAM, I
> expect that "filesize" holds the exact amount of bytes of this file.
> When I now use "nand write ... +${filesize}", the write size would be
> rounded up to the next full erase block size of the NAND. Any later
> reference to "filesize" will now see a different (larger) value than
> expected.
Thank you for the review. I see your point.
One possible solution would be to add new environment variable called
"datasize", but then there is the question if this variable should be
updated any time the "filesize" is updated (+ in a few situations where
the filesize will stay unchanged -- i.e. what adds this patch).
Best regards;
Rostislav Lisovy
More information about the U-Boot
mailing list