[U-Boot-Users] Help making jffs2 image

I can't seem to make a jffs2 image that u-Boot or the kernel can read. I know the nand read/write works because I've written kernels and ramdisks to nand (at many different locations) and they always read back and boot flawlessly. The JFFS2 image, on the other hand, makes u-boot take about 12 minutes to perform an "ls" on the jffs2 partition with hardware ecc disabled and fails completely with a bazillion ecc errors when hardware ecc is on.
I had a brainstorm earlier today and thought perhaps the compression type used by mkfs.jffs2 (1.5 and 1.6) wasn't enabled in the kernel so I went back and built a new kernel with every compression type built into the kernel that appears under the advanced compression heading. No change, same problems.
What I've used to create the jffs2 is an emdebian crossd build put into a directory (using sudo to get the device files etc) then the command line is
sudo mkfs.jffs2 -l -n -s 527 -e 0x4000 --pad=0x200000 -d myroot -o myroot.jffs2
I then copy that to my tftp directory, tftp to the s3c2410 device at 0x30800000 (ram is 0x30000000 to 0x40000000) and use:
nand write.jffs2 0x30800000 jffs2 0x2000000
I've also tried not specifying a page size (527 sounds odd) and using nand write instead of write.jffs2.
This is on a s3c2410 board and the nand routines came from the qt2410 patches at openmoko (like I sand, the nand write works perfectly with uImage and uRamdisk writes/reads).
Any idea where I'm going wrong?

On Wed, 2008-04-16 at 18:58 -0700, pat wrote:
I can't seem to make a jffs2 image that u-Boot or the kernel can read. I
Ok, I got further. I turned on the generic platform nand device driver and I made another jffs2 image but this time with 512 byte page size. I think I understand the 512+ notation in the datasheet now - the extra bytes are for badblock markers/clean markers and not for jffs2 data. By using the larger number i was putting jffs2 data outside of where the jffs2 routines would be looking for it and therefore ecc was freaking out (and software ecc taking forever because it was correcting everything as it went along).
At least, thats my guess...
So now I can boot to an initrd and mount the jffs2 partition without complaints but it doesn't seem to want to boot straight to jffs2. Although it says the file system was mounted it says it can't open a console then the kernel panics because it can't sync.
I've compiled another kernel with all the nand/jffs2 debugging at its most verbose, maybe it'll rise up and smack me in the forehead with whatever it is I'm doing wrong (and I know it'll be something dumb, it always is).
participants (1)
-
pat