[U-Boot] YAFFS2 and getting the NAND formatted

I'm still at a major chicken-and-the-egg stage here, with regards to YAFFS2. I have YAFFS2 support compiled in the kernel, and in U-boot. I boot into u-boot, I can loady my kernel, write it, yload the YAFFS2 image generated by mkyaffs2image... and then what? Can't use 'nand write' because it doesn't write the OOB for YAFFS2. I have a bunch of handy file commands for YAFFS2, but nothing like 'yformat', or 'ycopy_memory_to_NAND_and_make_a_useful_YAFFS2_image' (please shorten that command if you can :) ). If I had a valid image copy in, I see that I can mount and unmount my image (although no reference is given as to where the mount point is). 'ydump' might do something with a valid image, but it just returns with 0 output, so I'm not sure exactly what it does.
I see references to 'nand write.yaffs2' which looks like it might do what I want, but that seems to be non-existent. Was this replaced by something else?
All the solutions that don't involve 'nand write.yaffs2' involve booting to Linux and mounting /dev/mtdblockX... Which doesn't really work when you don't a root filesystem (No Ethernet, USB doesn't work right yet (can't get a kernel to recognize the USB pen drive, although u-boot does quite nicely).
So what's a user to do? I'm persevering, googling, compiling, programming, examining source... But I don't see how one gets a YAFFS2 image into NAND from a u-boot + serial console method.
--jc

J.C. Wren wrote:
I see references to 'nand write.yaffs2' which looks like it might do what I want, but that seems to be non-existent. Was this replaced by something else?
It's not yet supported in mainline. There have been some patches floating around, but none has been formally submitted for merging.
See: http://git.denx.de/?p=u-boot/u-boot-blackfin.git;a=commitdiff;h=44f07de8cc94...
All the solutions that don't involve 'nand write.yaffs2' involve booting to Linux and mounting /dev/mtdblockX... Which doesn't really work when you don't a root filesystem (No Ethernet, USB doesn't work right yet (can't get a kernel to recognize the USB pen drive, although u-boot does quite nicely).
You could try using an initrd/initramfs (attached to the kernel image, or loaded by u-boot) which includes the image to be written.
Or you could try using jffs2 to bootstrap things.
Or fix USB. :-)
-Scott
participants (2)
-
J.C. Wren
-
Scott Wood