Article [#4138] uClinux-dist-2008R1-RC8 supports yaffs2 on nand flash err

[#4138] uClinux-dist-2008R1-RC8 supports yaffs2 on nand flash err

Submitted By: w w

Open Date

2008-06-01 21:22:39     Close Date

2009-04-08 22:18:34

Priority:

Medium High     Assignee:

Nobody

Status:

Closed     Fixed In Release:

N/A

Found In Release:

2008R1.5-RC3     Release:

uClinux-dist-2008R1-RC8

Category:

N/A     Board:

STAMP

Processor:

BF533     Silicon Revision:

0.5

Is this bug repeatable?:

Yes     Resolution:

Not reproducible

Uboot version or rev.:

u-boot-1.1.3     Toolchain version or rev.:

blackfin-toolchain-08r1

App binary format:

N/A     

Summary: uClinux-dist-2008R1-RC8 supports yaffs2 on nand flash err

Details:

I download uClinux-dist-2008R1-RC8 and the toolchain 2008R1.

I compile the uClinux and run on my board.(CPU:BF533, nand falsh:ST nand512w3a).But when I mount the nand flash with yaffs2 filesystem, the err is

yaffs: Block struck out

**>> Block 290 retired

yaffs: Block struck out

**>> Block 292 retired

yaffs: Block struck out

**>> Block 289 retired

yaffs: Block struck out

**>> Block 293 retired

.

On my board, I use uClinux2006R2-RC2 and the toolchain 2006, I get no errors.

so I think the err occured maybe there are bugs about yaffs2 filesystem in uClinux-dist-2008R1-RC8, because I didn't modify any source code about nand flash driver and yaffs2 filesystem.

1)my mtd partition:

root:~> cat /proc/mtd

dev:    size   erasesize  name

mtd0: 00020000 00010000 "Bootloader"

mtd1: 00160000 00010000 "Kernel"

mtd2: 00280000 00010000 "RootFS"

mtd3: 04000000 00004000 "linux fs" //(this is my nand flash)

2)dmesg:(part)

BF5xx-Flash: probing 16-bit flash bus

BF5xx-Flash: Found 1 x16 devices at 0x0 in 16-bit bank

Amd/Fujitsu Extended Query Table at 0x0040

number of CFI chips: 1

cfi_cmdset_0002: Disabling erase-suspend-program due to code brokenness.

cmdlinepart partition parsing not available

RedBoot partition parsing not available

BF5xx-Flash: Using board partition definition

Creating 3 MTD partitions on "BF5xx-Flash":

0x00000000-0x00020000 : "Bootloader"

0x00020000-0x00180000 : "Kernel"

0x00180000-0x00400000 : "RootFS"

NAND device: Manufacturer ID: 0x20, Chip ID: 0x76 (ST Micro NAND 64MiB 3,3V 8-bi

t)

Scanning device for bad blocks

Bad eraseblock 2697 at 0x02a24000

Bad eraseblock 3346 at 0x03448000

Creating 1 MTD partitions on "NAND 64MiB 3,3V 8-bit":

0x00000000-0x04000000 : "linux fs"

3)my application is asterrisk. After I run this application, the errors didn't occur immediately, after it run a long time (12 hours or more ), the errors occured. In the asterrisk application, I use many commands like sqlite3_open/querry/close etc to access the nand flash.(my database is on nand flash).

4)this errors can repeat on all my board. I think if you access the nand flash many times in a long time, you can get the errors.

5)thank you.

Follow-ups

--- Bryan Wu                                                 2008-06-19 04:02:42

Hi,

I failed to reproduce this bug on my bf537-ezkit with NAND flash extand card.

Because we don't have bf533 board for NAND flash, we can not reproduce it now.

----

Linux version 2.6.22.19-ADI-2008R1-svn4863 (roc@roc-desktop) (gcc version 4.1.2

(ADI svn)) #3 Thu Jun 19 12:42:44 CST 2008

early printk enabled on early_BFuart0

Hardware Trace Active and Enabled

Blackfin support (C) 2004-2007 Analog Devices, Inc.

Compiled for ADSP-BF537 Rev 0.3

Blackfin Linux support by   blackfin.uclinux.org/

Processor Speed: 500 MHz core clock and 100 MHz System Clock

Board Memory: 64MB

Kernel Managed Memory: 64MB

Memory map:

  text      = 0x00001000-0x00106bd0

  rodata    = 0x00107000-0x00152acc

  data      = 0x00153000-0x00166000

    stack   = 0x00154000-0x00156000

  init      = 0x00166000-0x00882000

  bss       = 0x00882000-0x00890f70

  available = 0x00890f70-0x03eff000

  DMA Zone  = 0x03f00000-0x04000000

Instruction Cache Enabled

Data Cache Enabled (write-through)

Built 1 zonelists.  Total pages: 16002

Kernel command line: root=/dev/mtdblock0 rw earlyprintk=serial,uart0,57600

console=ttyBF0,57600

ip=192.168.0.66:192.168.0.55:192.168.0.1:255.255.255.0:bf537-stamp:eth0:off

Configuring Blackfin Priority Driven Interrupts

PID hash table entries: 256 (order: 8, 1024 bytes)

bfin-rtc: invalid date; resetting

console handover: boot [early_BFuart0] -> real [ttyBF0]

Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)

Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)

Memory available: 55160k/65536k RAM, (7280k init code, 1046k kernel code, 441k

data, 1024k dma, 584k reserved)

Blackfin Scratchpad data SRAM: 4 KB

Blackfin Data A SRAM: 16 KB (15 KB free)

Blackfin Data B SRAM: 16 KB (16 KB free)

Blackfin Instruction SRAM: 48 KB (40 KB free)

Security Framework v1.0.0 initialized

Mount-cache hash table entries: 512

NET: Registered protocol family 16

Blackfin GPIO Controller

Blackfin DMA Controller

stamp_init(): registering device resources

Generic PHY: Registered new driver

NET: Registered protocol family 2

                                  IP route cache hash table entries: 1024

(order: 0, 4096 bytes)

TCP established hash table entries: 2048 (order: 2, 16384 bytes)

TCP bind hash table entries: 2048 (order: 1, 8192 bytes)

TCP: Hash tables configured (established 2048 bind 2048)

TCP reno registered

yaffs Jun 19 2008 12:37:45 Installing.

io scheduler noop registered

io scheduler anticipatory registered (default)

io scheduler cfq registered

bfin-wdt: initialized: timeout=20 sec (nowayout=0)

Serial: Blackfin serial driver

bfin-uart.1: ttyBF0 at MMIO 0xffc00400 (irq = 18) is a BFIN-UART

RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize

SMSC LAN83C185: Registered new driver

bfin_mac_mdio: probed

bfin_mac: attached PHY driver [SMSC LAN83C185] (mii_bus:phy_addr=0:01, irq=-1,

mdc_clk=2500000Hz(mdc_div=19)@sclk=100MHz)

bfin_mac: Version 1.1, Blackfin BF53[67] BF527 on-chip Ethernet MAC driver

NAND device: Manufacturer ID: 0x20, Chip ID: 0xf1 (ST Micro NAND 128MiB 3,3V

8-bit)

Scanning device for bad blocks

Creating 2 MTD partitions on "NAND 128MiB 3,3V 8-bit":

0x00000000-0x00400000 : "linux kernel"

0x00400000-0x08000000 : "file system"

bfin-spi bfin-spi.0: Blackfin BF5xx on-chip SPI Contoller Driver, Version 1.0,

regs_base@ffc00500, dma channel@7

rtc-bfin rtc-bfin: rtc core: registered rtc-bfin as rtc0

TCP cubic registered

NET: Registered protocol family 1

NET: Registered protocol family 17

rtc-bfin rtc-bfin: setting the system clock to 1970-01-01 00:00:01 (1)

IP-Config: Complete:

      device=eth0, addr=192.168.0.66, mask=255.255.255.0, gw=192.168.0.1,

     host=bf537-stamp, domain=, nis-domain=(none),

     bootserver=192.168.0.55, rootserver=192.168.0.55, rootpath=

Freeing unused kernel memory: 7280k freed

dma_alloc_init: dma_page @ 0x0087f000 - 256 pages at 0x03f00000

                           _____________________________________

        a8888b.           / Welcome to the uClinux distribution \

       d888888b.         /       _     _                         \

       8P"YP"Y88        /       | |   |_|            __  __ (TM)  |

       8|o||o|88  _____/        | |    _ ____  _   _ \ \/ /       |

       8'    .88       \        | |   | |  _ \| | | | \  /        |

       8`._.' Y8.       \       | |__ | | | | | |_| | /  \        |

      d/      `8b.       \      \____||_|_| |_|\____|/_/\_\       |

     dP   .    Y8b.       \   For embedded processors including   |

    d8:'  "  `::88b        \    the Analog Devices Blackfin      /

   d8"         'Y88b        \___________________________________/

  :8P    '      :888

   8a.   :     _a88P         For further information, check out:

._/"Yaa_:   .| 88P|            -   blackfin.uclinux.org/

\    YP"    `| 8P  `.          -   docs.blackfin.uclinux.org/

/     \.___.d|    .'           -   www.uclinux.org/

`--..__)8888P`._.'  jgs/a:f    -   www.analog.com/blackfin

Have a lot of fun...

BusyBox v1.4.1 (2008-06-19 12:40:04 CST) Built-in shell (msh)

Enter 'help' for a list of built-in commands.

root:/> PHY: 0:01 - Link is Up - 100/Full

root:/>

root:/> cat /proc/mtd

dev:    size   erasesize  name

mtd0: 00400000 00020000 "linux kernel"

mtd1: 07c00000 00020000 "file system"

root:/> e

e2fsck      echo        env         eraseall    event_test  expr

root:/> eraseall /dev/mtd

/dev/mtd0       /dev/mtd1       /dev/mtdblock0

/dev/mtd0ro     /dev/mtd1ro     /dev/mtdblock1

root:/> eraseall /dev/mtd

/dev/mtd0       /dev/mtd1       /dev/mtdblock0

/dev/mtd0ro     /dev/mtd1ro     /dev/mtdblock1

root:/> eraseall /dev/mtd1

Erased 126976 Kibyte @ 0 -- 100% complete.      

root:/> mount /dev/mtdblock1 /mnt/ -t yaffs

yaffs: dev is 32505857 name is "mtdblock1"

yaffs: Attempting MTD mount on 31.1, "mtdblock1"

yaffs: auto selecting yaffs2

root:/> df

Filesystem           1k-blocks      Used Available Use% Mounted on

/dev/mtdblock1          126976      2048    124928   2% /mnt

root:/> cd /mnt/

root:/mnt> cp /bin/busybox .

root:/mnt> cd ..

root:/> umount /mnt/

root:/> mount /dev/mtdblock1 /mnt/ -t yaffs

yaffs: dev is 32505857 name is "mtdblock1"

yaffs: Attempting MTD mount on 31.1, "mtdblock1"

yaffs: auto selecting yaffs2

yaffs: restored from checkpoint

root:/> cd /mnt/

root:/mnt> ls

busybox     lost+found

root:/mnt> cd ..

root:/> ls

bin   etc   init  mnt   root  sys   usr

dev   home  lib   proc  sbin  tmp   var

root:/> umount mnt/

root:/> ls

bin   etc   init  mnt   root  sys   usr

dev   home  lib   proc  sbin  tmp   var

root:/> mount /dev/mtdblock1 /mnt/ -t yaffs -o sync

yaffs: dev is 32505857 name is "mtdblock1"

yaffs: Attempting MTD mount on 31.1, "mtdblock1"

yaffs: auto selecting yaffs2

yaffs: restored from checkpoint

root:/> time dd if=/dev/zero of=/mnt/test.bin bs=1M count=10

10+0 records in

10+0 records out

real    0m 3.16s

user    0m 0.00s

sys     0m 3.17s

root:/> umount /mnt/

root:/> mount /dev/mtdblock1 /mnt/ -t yaffs -o sync

yaffs: dev is 32505857 name is "mtdblock1"

yaffs: Attempting MTD mount on 31.1, "mtdblock1"

yaffs: auto selecting yaffs2

yaffs: restored from checkpoint

root:/> ls /mnt/

busybox     lost+found  test.bin

root:/> ls /mnt/ -lh

-rwxr-xr-x    1 root     root       477.2k Jan  1 00:12 busybox

drwx------    1 root     root         2.0k Jan  1 00:14 lost+found

-rw-r--r--    1 root     root        10.0M Jan  1 00:13 test.bin

root:/> umount /mnt/

----

-Bryan

--- w w                                                      2008-07-17 07:31:07

thank you Bryan, but

3)my application is asterrisk. After I run this application, the errors didn't

occur immediately, after it run a long time (12 hours or more ), the errors

occured. In the asterrisk application, I use many commands like

sqlite3_open/querry/close etc to access the nand flash.(my database is on nand

flash).

4)this errors can repeat on all my board. I think if you access the nand flash

many times in a long time, you can get the errors.

Can you access nand flash many times for a long time(1 day or more)?

    Files

    Changes

    Commits

    Dependencies

    Duplicates

    Associations

    Tags

File Name     File Type     File Size     Posted By

No Files Were Found

Before You Switch


Switching languages will make ADI Explorer unavailable. Resume your session by switching back to English and reopening ADI Explorer.