[#4967] Cannot write yaffs2 image to Nand flash
Submitted By: Yi Li
2009-03-06 03:48:42 Close Date
Closed Fixed In Release:
Found In Release:
ALL Silicon Revision:
Is this bug repeatable?:
Uboot version or rev.:
Toolchain version or rev.:
svn trunk 4.1
App binary format:
Summary: Cannot write yaffs2 image to Nand flash
rootfs.yaffs2 is built by uclinux-dist build scripts:
root:/> nandwrite -y /dev/mtd4 /tmp/rootfs.yaffs2
MEMSETOOBSEL: Inappropriate ioctl for device
If do not use the "-y" option:
nandwirte /dev/mtd4 rootfs.yaffs2
This will turn blocks of the Nand flash it touched to BAD blocks (Be careful to try it!! - It will destroy your Nand Flash).
I found there are similar discussion on the forum before:
--- Graf Yang 2009-03-19 04:26:23
According the discussion of the forum, ioctl MEMSETOOBSEL is removed since
We can read/write nand partition under u-boot. For reference:
--- Mike Frysinger 2009-03-19 04:42:16
maybe, but we have to have information on writing nand images from under Linux
reading the nandwrite source code indicates that -y is legacy:
* force oob layout for jffs2 or yaffs ?
* Legacy support
--- Graf Yang 2009-03-24 04:38:27
Writing yaffs2 image into nand chip should have 3 methods,
1. use nandwrite in linux before kernel 2.6.18.
2. use nand erase in u-boot, then copy file system into mounted yaffs2
3. use nand write in u-boot, because it will not write oob, user only can see
lost+found after mount.
4. use nand write.yaffs in u-boot, it need a patch for u-boot-1.1.6, and still
As so far, most user use method 2.
--- Graf Yang 2009-03-24 05:44:48
5. mkyaffs is another method, now it is removed from mtd-util.
--- Mike Frysinger 2009-03-24 05:58:30
we still need a method that works under Linux
--- Michael Hennerich 2009-03-24 06:27:27
Does mtdchar not work?
--- Graf Yang 2009-03-24 21:46:57
mtdchar's ioctls is changed since kernel 2.6.18, while no one rewrite nandwrite.
--- Yi Li 2009-03-24 22:33:02
How about drop yaffs from our tree and use UBIFS?
--- Robin Getz 2009-03-25 11:22:09
I think we can drop yaffs after the 2009 release - but it is too late now -
there are too many people using it.
--- Graf Yang 2009-04-03 03:08:42
I have enabled write yaffs2 image in u-boot.
As yaffs2 will be droped, it is meanless to enable this funtion in
--- Yi Li 2009-04-13 22:35:01
Ubifs support is in svn trunk. Yaffs2 is supposed to be dropped next release.
Close the bug.
File Name File Type File Size Posted By
No Files Were Found