YAFFS2 filesystem and UBIFS writing issue with IMX283 processor

cancel
Showing results for 
Search instead for 
Did you mean: 

YAFFS2 filesystem and UBIFS writing issue with IMX283 processor

1,212 Views
deepthikiran
Contributor I

Hi,

  We are using linux-2.6.35 released BSP. We are trying to bring up YAFFS2 on that .We mounted YAFFS2 and copied files system on the mount directory, so much of bad blocks are getting created. We tried using nand-write command nandwrite –a –o /dev/mtd1 nand.yaffs2 then it is crashing and we are getting the following messages

  

bad block at d3e0000, 1 block(s) gpmi-nfc gpmi-nfc.0: This driver doesn't support

t writing the OOB

from d3e0000 will be ski------------[ cut here ]------------

pped

Writing data to blWARNING: at drivers/mtd/nand/gpmi-nfc/gpmi-nfc-mil.c:1014 mil_

ecc_write_oob+0x68/0xe8()

ock 1696 at offset 0xd40Modules linked in:0000

Bad block at d4000

00, 1 block(s) from d400Backtrace: 000 will be skipped

Wri

ting data to block 1697 [<c00354a8>] (dump_backtrace+0x0/0x114) from [<c0412fa0>

] (dump_stack+0x18/0x1c)

at offset 0xd420000

Bad r7:00000009 block at d420000, 1 blo r6:000003f6ck(s) from d420000 will  r5:c

0293e6cbe skipped

Writing data r4:00000000 to block 1698 at offset

 0xd440000

Bad block at[<c0412f88>] (dump_stack+0x0/0x1c) from [<c004d69c>] (warn_slowpath_

common+0x54/0x6c)

 d440000, 1 block(s) fro[<c004d648>] (warn_slowpath_common+0x0/0x6c) from [<c004

d6d8>] (warn_slowpath_null+0x24/0x2c)

m d440000 will be skipped r9:000e2880d

Writing data to block r8:0000000b 1699 at offset 0xd46000 r7:0001d7800

Bad block at d460000, r6:c0595ad0 1 block(s) from d460000 r5:c77a41e8 will be skipped

  Is there any patch for gpmi-nfc driver to support  this?

 We even tried with nandwrite –a –p /dev/mtd1 nand.yaffs2. It is showing as writing success, but if we mount the filesystem, we are able to see only lost+ found directory. We created .yaffs2 image by using mkyaffs2 utils.

We even tried with UBIFS, once it is getting attached and we could able mount and copy filesystem into it, but if we detach ubi and attach again the we are getting the following errors

UBI error: ubi_scan_add_used: two LEBs with same sequence number 4
ubiattach: error!: cannot attach mtd1
           error 22 (Invalid argument)

Along with this we even tried nand write in u-boot. We are getting the following error.

nand write 0x42000000 0 0x30000

NAND write: device 0 offset 0x0, size 0x30000

[send_page] DMA error

[send_page] DMA error

[send_page] DMA error

[send_page] DMA error

[send_page] DMA error

[send_page] DMA error

[send_page] DMA error

196608 bytes written: OK

As per the below mail post they are telling that nand driver is not ported for imx283 in the linux 2.6.35 BSP.  But in the reference manual it is told that gpmi-nfc is the driver for NAND. We need to get the proper clarification on this.  Please help us to resolve this issue as early as possible

http://www.spinics.net/lists/u-boot-v2/msg02497.html

Thanks and Regards

Deepthi

 

Tags (1)
0 Kudos
7 Replies

220 Views
fluiss
Contributor I

Hi,

   Can anyone confirm that there's a trouble when using some NAND of 512MiB?? I'm using a SLC NAND from Hynix and I get the same error messages than Robert.

    Thx. BR,

   Fernando

0 Kudos

220 Views
hitlin37
Contributor I

Hi,

Are you able to boot u-boot from Samsung K9F4G08 NAND.

If yes,what version of u-boot and did you changed anything in u-boot to boot from NAND.

I'm also using Samsung K9F4G08 NAND 1GB but i'm not able to boot from NAND.

Previously i had Micron NAND and i was able to boot from it.

Regards

hitlin37

Mike Morrell said:

It looks like chips under 512MB will work but I only tested this one device. The 1GB size chip did not work for me.

This chip works


NAND device: Manufacturer ID: 0xec, Chip ID: 0xdc (Samsung NAND 512MiB 3,3V 8-b)
-----------------------------
NAND Flash Device Information
-----------------------------
Manufacturer : Samsung (0xec)
Device Code : 0xdc
Cell Technology : SLC
Chip Size : 512 MiB
Pages per Block : 64
Page Geometry : 2048+64
ECC Strength : 4 bits
ECC Size : 512 B
Data Setup Time : 15 ns
Data Hold Time : 12 ns
Address Setup Time: 25 ns
GPMI Sample Delay : 6 ns
tREA : Unknown
tRLOH : Unknown
tRHOH : Unknown
Description : K9F4G08
-----------------
Physical Geometry
-----------------
Chip Count : 1
Page Data Size in Bytes: 2048 (0x800)
Page OOB Size in Bytes : 64
Block Size in Bytes : 131072 (0x20000)
Block Size in Pages : 64 (0x40)
Chip Size in Bytes : 536870912 (0x20000000)
Chip Size in Pages : 262144 (0x40000)
Chip Size in Blocks : 4096 (0x1000)
Medium Size in Bytes : 536870912 (0x20000000)


This chip does not work


NAND device: Manufacturer ID: 0x2c, Chip ID: 0xd3 (Micron NAND 1GiB 3,3V 8-bit)
-----------------------------
NAND Flash Device Information
-----------------------------
Manufacturer : Micron (0x2c)
Device Code : 0xd3
Cell Technology : SLC
Chip Size : 1 GiB
Pages per Block : 64
Page Geometry : 2048+64
ECC Strength : 4 bits
ECC Size : 512 B
Data Setup Time : 25 ns
Data Hold Time : 15 ns
Address Setup Time: 10 ns
GPMI Sample Delay : 6 ns
tREA : Unknown
tRLOH : Unknown
tRHOH : Unknown
Description : MT29F8G08FABWG
-----------------
Physical Geometry
-----------------
Chip Count : 1
Page Data Size in Bytes: 2048 (0x800)
Page OOB Size in Bytes : 64
Block Size in Bytes : 131072 (0x20000)
Block Size in Pages : 64 (0x40)
Chip Size in Bytes : 1073741824 (0x40000000)
Chip Size in Pages : 524288 (0x80000)
Chip Size in Blocks : 8192 (0x2000)
Medium Size in Bytes : 1073741824 (0x40000000)

0 Kudos

220 Views
RobertMGirard
Contributor I

Hello Mike,

 

I see you were able to get to some level of success with using ubifs as your root filesystem format on NAND.

Using the i.MX28_Linux_BSP_Userguide.pdf for assistance with this, I cant seem to be able to mount the file system:

I get the following error printout:

UBIFS error (pid 1): ubifs_get_sb: cannot open "ubi0:rootfs0", error -19
VFS: Cannot open root device "ubi0:rootfs0" or unknown-block(0,0)
Please append a correct "root=" boot option; here are the available partitions:
1f00           20480 mtdblock0 (driver?)
1f01          110592 mtdblock1 (driver?)
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)

I am using the default boot command:

noinitrd console=ttyAM0,115200 ubi.mtd=1 root=ubi0:rootfs0 rootfstype=ubifs rw gpmi

 

When flashing the NAND on my i.MX28 EVK, I assumed I was to flash the output of the ltib build for ubifs - rootfs.uifs.img as follows:

nandwrite /dev/mtd1 rootfs.ubifs.img,

after flashing the kernel and bootlet:

kobs-ng init -v imx28_ivt_linux.sb

 

Is there an error in this procedure or a missing step somewhere?

Any help on this would be greatly appreciated.

 

FYI: I have been able to get a .ext3 formatted root filesystem to mount successfully, so I think the underlying drivers are all OK.

 

Thanks

Robert G

 

 



Mike Morrell said:

I ran into this problem also using ubifs. It turned out to be a bug in the NAND flash driver. I was able to get it working with a smaller size NAND device, but larger devices show the bug. It has been reported to Freescale and verified by their support team. I don't know how soon a solution will be available.
0 Kudos

220 Views
iMxGuy
Contributor II

It looks like chips under 512MB will work but I only tested this one device. The 1GB size chip did not work for me.

This chip works


NAND device: Manufacturer ID: 0xec, Chip ID: 0xdc (Samsung NAND 512MiB 3,3V 8-b)
-----------------------------
NAND Flash Device Information
-----------------------------
Manufacturer : Samsung (0xec)
Device Code : 0xdc
Cell Technology : SLC
Chip Size : 512 MiB
Pages per Block : 64
Page Geometry : 2048+64
ECC Strength : 4 bits
ECC Size : 512 B
Data Setup Time : 15 ns
Data Hold Time : 12 ns
Address Setup Time: 25 ns
GPMI Sample Delay : 6 ns
tREA : Unknown
tRLOH : Unknown
tRHOH : Unknown
Description : K9F4G08
-----------------
Physical Geometry
-----------------
Chip Count : 1
Page Data Size in Bytes: 2048 (0x800)
Page OOB Size in Bytes : 64
Block Size in Bytes : 131072 (0x20000)
Block Size in Pages : 64 (0x40)
Chip Size in Bytes : 536870912 (0x20000000)
Chip Size in Pages : 262144 (0x40000)
Chip Size in Blocks : 4096 (0x1000)
Medium Size in Bytes : 536870912 (0x20000000)


This chip does not work


NAND device: Manufacturer ID: 0x2c, Chip ID: 0xd3 (Micron NAND 1GiB 3,3V 8-bit)
-----------------------------
NAND Flash Device Information
-----------------------------
Manufacturer : Micron (0x2c)
Device Code : 0xd3
Cell Technology : SLC
Chip Size : 1 GiB
Pages per Block : 64
Page Geometry : 2048+64
ECC Strength : 4 bits
ECC Size : 512 B
Data Setup Time : 25 ns
Data Hold Time : 15 ns
Address Setup Time: 10 ns
GPMI Sample Delay : 6 ns
tREA : Unknown
tRLOH : Unknown
tRHOH : Unknown
Description : MT29F8G08FABWG
-----------------
Physical Geometry
-----------------
Chip Count : 1
Page Data Size in Bytes: 2048 (0x800)
Page OOB Size in Bytes : 64
Block Size in Bytes : 131072 (0x20000)
Block Size in Pages : 64 (0x40)
Chip Size in Bytes : 1073741824 (0x40000000)
Chip Size in Pages : 524288 (0x80000)
Chip Size in Blocks : 8192 (0x2000)
Medium Size in Bytes : 1073741824 (0x40000000)

0 Kudos

220 Views
AhmetYUCE
Contributor II
BSP version, sorry.
0 Kudos

220 Views
AhmetYUCE
Contributor II
Mike, what is the limit of nand flash size which could be used without problem, with the current BP version?
0 Kudos

220 Views
iMxGuy
Contributor II
I ran into this problem also using ubifs. It turned out to be a bug in the NAND flash driver. I was able to get it working with a smaller size NAND device, but larger devices show the bug. It has been reported to Freescale and verified by their support team. I don't know how soon a solution will be available.
0 Kudos