2010-01-13 05:18:56     jffs2 problem on 2009R1.1-RC4

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

2010-01-13 05:18:56     jffs2 problem on 2009R1.1-RC4

victor fang (CHINA)

Message: 84532   

 

Kernel: 2009R1.1-RC4

 

Flash:  M25P64 on spi select 2

 

I have paded jffs2 image with 0xff up to the size of the partition size under u-boot. If I download a file by tftp to the board, it will crash.  Please check the dump messages below. the size of u-boot.ldr is 97KB.

 

 

 

EEPROM @0x0 read: addr 01000000  off 20000  count 1048576 ... ...............done

Instruction Cache is ON

Data (writethrough) Cache is ON

## Booting image at 01000000 ...

   Image Name:   Linux-2.6.28.10-ADI-2009R1.1

   Image Type:   Blackfin Linux Kernel Image (gzip compressed)

   Data Size:    966961 Bytes = 944.3 kB

   Load Address: 00001000

   Entry Point:  001a4b08

   Verifying Checksum ... OK

   Uncompressing Kernel Image ... OK

Starting Kernel at = 1a4b08

console [ttyBF0] enabled, bootconsole disabled

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

Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)

Memory available: 29696k/32768k RAM, (108k init code, 1166k kernel code, 478k data, 1024k dma, 292k reserved)

Calibrating delay loop... 796.67 BogoMIPS (lpj=1593344)

Security Framework initialized

Mount-cache hash table entries: 512

Blackfin Scratchpad data SRAM: 4 KB

Blackfin L1 Instruction SRAM: 16 KB (5 KB free)

net_namespace: 288 bytes

NET: Registered protocol family 16

Blackfin DMA Controller

stamp_init(): registering device resources

NET: Registered protocol family 2

IP route cache hash table entries: 1024 (order: 0, 4096 bytes)

TCP established hash table entries: 1024 (order: 1, 8192 bytes)

TCP bind hash table entries: 1024 (order: 0, 4096 bytes)

TCP: Hash tables configured (established 1024 bind 1024)

TCP reno registered

NET: Registered protocol family 1

JFFS2 version 2.2. (NAND) © 2001-2006 Red Hat, Inc.

msgmni has been set to 58

io scheduler noop registered

io scheduler anticipatory registered (default)

io scheduler cfq registered

Serial: Blackfin serial driver

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

brd: module loaded

m25p80 spi0.2: m25p64 (8192 Kbytes)

Creating 4 MTD partitions on "m25p80":

0x00000000-0x00020000 : "uboot"

0x00020000-0x00120000 : "kernel"

0x00120000-0x00580000 : "root"

0x00580000-0x00800000 : "user data"

bfin-spi bfin-spi.0: Blackfin on-chip SPI Controller Driver, Version 1.0, regs_base@ffc00500, dma channel@5

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

Advanced Linux Sound Architecture Driver Version 1.0.18rc3.

ASoC version 0.13.2

dma rx:1 tx:2, err irq:10, regs:ffc00800

dma_alloc_init: dma_page @ 0x01e5a000 - 256 pages at 0x01f00000

WM8510 Audio Codec 0.6

asoc: WM8510 HiFi <-> bf5xx-i2s mapping ok

ALSA device list:

  #0: bf5xx-board (WM8510)

TCP cubic registered

NET: Registered protocol family 17

VFS: Mounted root (jffs2 filesystem).

Freeing unused kernel memory: 108k freed

LED Driver initialize

lcd_pixel: UC1601S LCD Driver(SPI, select: 4, speed: 10000000)

simple-gpio: now handling 16 GPIOs: 0 - 15

Micrel KSZ8842 ISA 1.0.12 (Jan  3 2010 20:33:21) two port

eth0: I/O = 20200300, IRQ = 25

Blackfin KSZ8842 interrupt setup: irq 25

                           _____________________________________

        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.13.4 (2010-01-03 20:36:53 HKT) built-in shell (msh)

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

 

root:/>

root:/> df

Filesystem           1K-blocks      Used Available Use% Mounted on

/dev/root                 4480      3168      1312  71% /

root:/>

root:/>  tftp -g -r u-boot.ldr 192.168.1.104

 

Node totlen on flash (0xffffffff) != totlen from node ref (0x00000044)

Node totlen on flash (0xffffffff) != totlen from node ref (0x000001a8)

Node totlen on flash (0xffffffff) != totlen from node ref (0x00000200)

Node totlen on flash (0xffffffff) != totlen from node ref (0x000001b4)

Node totlen on flash (0xffffffff) != totlen from node ref (0x0000012c)

Node totlen on flash (0xffffffff) != totlen from node ref (0x00000108)

Node totlen on flash (0xffffffff) != totlen from node ref (0x00000104)

Node totlen on flash (0xffffffff) != totlen from node ref (0x0000010c)

Node CRC ffffffff != calculated CRC f09e7845 for node at 002d8544

Hardware Trace:

   0 Target : <0x000047b8> { _dump_bfin_trace_buffer + 0x0 }

     Source : <0x00072494> { _jffs2_write_end + 0x24 } CALL pcrel

   1 Target : <0x00072470> { _jffs2_write_end + 0x0 }

     Source : <0x0002f6b4> { _generic_file_buffered_write + 0x140 } CALL (P2)

   2 Target : <0x0002f696> { _generic_file_buffered_write + 0x122 }

     Source : <0x000089e8> { _blackfin_dcache_flush_range + 0x18 } RTS

   3 Target : <0x000089e0> { _blackfin_dcache_flush_range + 0x10 }

     Source : <0x000089f0> { _blackfin_dflush_page + 0x4 } JUMP.S

   4 Target : <0x000089ec> { _blackfin_dflush_page + 0x0 }

     Source : <0x0002f692> { _generic_file_buffered_write + 0x11e } CALL pcrel

   5 Target : <0x0002f674> { _generic_file_buffered_write + 0x100 }

     Source : <0x0002e9ea> { _iov_iter_copy_from_user_atomic + 0x76 } RTS

   6 Target : <0x0002e9d2> { _iov_iter_copy_from_user_atomic + 0x5e }

     Source : <0x0002e9f8> { _iov_iter_copy_from_user_atomic + 0x84 } JUMP.S

   7 Target : <0x0002e9f6> { _iov_iter_copy_from_user_atomic + 0x82 }

     Source : <0xffa0967a> { _memcpy + 0x4e }

   8 Target : <0xffa0965c> { _memcpy + 0x30 }

     Source : <0xffa0964e> { _memcpy + 0x22 }

   9 Target : <0xffa0962c> { _memcpy + 0x0 }

     Source : <0x0002e9f2> { _iov_iter_copy_from_user_atomic + 0x7e } CALL pcrel

  10 Target : <0x0002e9ec> { _iov_iter_copy_from_user_atomic + 0x78 }

     Source : <0x0002e9ce> { _iov_iter_copy_from_user_atomic + 0x5a } IF !CC JUMP

  11 Target : <0x0002e9cc> { _iov_iter_copy_from_user_atomic + 0x58 }

     Source : <0xffa081da> { __access_ok + 0x7a }

  12 Target : <0xffa081ca> { __access_ok + 0x6a }

     Source : <0xffa08188> { __access_ok + 0x28 }

  13 Target : <0xffa08160> { __access_ok + 0x0 }

     Source : <0x0002e9c8> { _iov_iter_copy_from_user_atomic + 0x54 } CALL pcrel

  14 Target : <0x0002e974> { _iov_iter_copy_from_user_atomic + 0x0 }

     Source : <0x0002f670> { _generic_file_buffered_write + 0xfc } CALL pcrel

  15 Target : <0x0002f650> { _generic_file_buffered_write + 0xdc }

     Source : <0x000727ce> { _jffs2_write_begin + 0xb6 } RTS

BUG: failure at fs/jffs2/file.c:251/jffs2_write_end()!

Kernel panic - not syncing: BUG!

QuoteReplyEditDelete

 

 

2010-01-13 09:48:57     Re: jffs2 problem on 2009R1.1-RC4

Mike Frysinger (UNITED STATES)

Message: 84542   

 

did you create the jffs2 image with dimensions that actually match your flash erase size ?

 

i.e. set MKFS_JFFS2_FLAGS the right options to match your flash

QuoteReplyEditDelete

 

 

2010-01-14 00:08:17     Re: jffs2 problem on 2009R1.1-RC4

victor fang (CHINA)

Message: 84555   

 

sure.

 

$(MKFS_JFFS2) -l -p  -d $(ROMFSDIR) -D $(DEVICE_TABLE) -o $(IMAGE_ROMFS_BASE).jffs2

 

mkfs.jff2 uses the default erase size, 64KB, and all partitions are writable.

 

static struct mtd_partition bfin_spi_flash_partitions[] = {

 

{

 

.name = "uboot",

 

.size = 0x20000,

 

.offset = 0,

 

}, {

 

.name = "kernel",

 

.size = 0x100000,

 

.offset = MTDPART_OFS_APPEND,

 

}, {

 

.name = "root",

 

.size = 0x460000,

 

.offset = MTDPART_OFS_APPEND,

 

}, {

 

.name = "user data",

 

.size = MTDPART_SIZ_FULL,

 

.offset = MTDPART_OFS_APPEND,

 

}

 

};

QuoteReplyEditDelete

 

 

2010-01-14 03:26:05     Re: jffs2 problem on 2009R1.1-RC4

Mike Frysinger (UNITED STATES)

Message: 84573   

 

are you sure you programmed the filesystem to the right offset and that you didnt overwrite it with other files ?

 

what spi hz are you running the flash at ?  what if you slow it down ?

 

you might also want to enable jffs summary support as it'll speed up mounting greatly.

QuoteReplyEditDelete

 

 

2010-01-14 04:12:16     Re: jffs2 problem on 2009R1.1-RC4

victor fang (CHINA)

Message: 84574   

 

I am sure there is no overwrite. SPI speed is 16.7Mhz.

 

After reading the jffs2 code,  I think the last empty sectors not be handling correctly. I will try summary soon and check if this problem exists too.

QuoteReplyEditDelete

 

 

2010-01-18 04:02:25     Re: jffs2 problem on 2009R1.1-RC4

victor fang (CHINA)

Message: 84709   

 

I have tried jffs2 summary, the problem still exists. Anyone can give me suggestion to resolve this prolbem?

 

Thanks.

Attachments

    Outcomes