
Dear Derek Ou,
In message 499B03FD.7050207@siconix.com you wrote:
Until v1.3.4, "nand write.jffs2" supports non page-aligned data write and pad data automatically to page alignment. As a result, we can use the following scripts to automate downloading a file and writing it to flash. "tftp file.bin" and "nand write.jffs2 add_# off_# $(filesize)" But in the later releases, this feature was no longer supported. So my patch restores this feature to nand write command.
Such implicit padding is IMHO a bad idea.
I think we should rather add logic similar to what we use on NOR flash and support a "+length" syntax which indicates "please round up to the next block boundary".
You would then write
nand write.jffs2 addr off +${filesize}
to get the wanted behaviour.
Best regards,
Wolfgang Denk