[#4967] Cannot write yaffs2 image to Nand flash

Document created by Aaronwu Employee on Aug 30, 2013
Version 1Show Document
  • View in full screen mode

[#4967] Cannot write yaffs2 image to Nand flash

Submitted By: Yi Li

Open Date

2009-03-06 03:48:42     Close Date

2009-04-13 22:35:01

Priority:

Medium     Assignee:

Graf Yang

Status:

Closed     Fixed In Release:

N/A

Found In Release:

snaps     Release:

svn trunk

Category:

N/A     Board:

EZKIT Lite

Processor:

ALL     Silicon Revision:

Is this bug repeatable?:

Yes     Resolution:

Rejected

Uboot version or rev.:

    Toolchain version or rev.:

svn trunk 4.1

App binary format:

N/A     

Summary: Cannot write yaffs2 image to Nand flash

Details:

 

svn trunk:

 

uclinux-dist: r7807

linux-kernel: r6137

 

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:

 

https://blackfin.uclinux.org/gf/project/uclinux-dist/forum/?action=ForumBrowse&forum_id=39&_forum_action=ForumMessageBrowse&thread_id=8386%3Cbr%20/%3E

 

 

 

 

Follow-ups

 

--- Graf Yang                                                2009-03-19 04:26:23

According the discussion of the forum, ioctl MEMSETOOBSEL is removed since

kernel 2.6.18.

We can read/write nand partition under u-boot.  For reference:

 

  docs.blackfin.uclinux.org/doku.php?id=using_nand_flash_with_u-boot_and_linux_kernel&s=nand

 

--- Mike Frysinger                                           2009-03-19 04:42:16

maybe, but we have to have information on writing nand images from under Linux

as well

 

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

directory.

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

need refactory.

 

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.

 

-Robin

 

--- 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

uclinux-dist.

 

--- 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.

 

 

 

    Files

    Changes

    Commits

    Dependencies

    Duplicates

    Associations

    Tags

 

File Name     File Type     File Size     Posted By

No Files Were Found

Attachments

    Outcomes