I was going to post this to the JFFS2 mailing list, but thought I'd ask here first.
I'd like to be able to build a JFFS2 image in Dataflash, download the contents to a image using
Code:
DATAFLASH::receiveFile "fs.img" addr size
via a tcl script in SAM-BA, then mount fs.img as a JFFS2 fs on my desktop Linux machine, modify the contents a bit, save it back to the file "fs.img" and reload it using
Code:
DATAFLASH::sendFile "fs.img" addr
via a tcl script in SAM-BA.
I have the script working in that I can get the image and reload the image. I can mount the image on my desktop machine using the dd command and then mount. However, after I umount and dd the new img, once it's reloaded on the board, JFFS2 gives me errors at boot time.
I'm using the following to copy the image to a device:
Code:
sudo dd if=filesystem.dat of=/dev/mtdblock0
And the following to save the image:
Code:
sudo dd if=/dev/mtdblock0 of=filesystem.tmp count=3689 bs=1056
The image file size is 3,895,584 bytes.
Does anyone have a suggestion as to what I might be doing wrong? Should I use the same count and bs parameter values for the initial dd command?