[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Trouble with jffs (long)



Hi

I'm having trouble writing to my jffs flash partitions and I would like some
pointers. 
I'm using a PowerPC 850 RPXlite board running Linux kernel 2.4.7.
I have 4 AMD29LV160BB chips configured as a single 8Mb bank of flash.

I've defined the following flash partitions as below.

bash-2.05# cat /proc/mtd
dev:    size   erasesize  name
mtd0: 00010000 00010000 "environment"
mtd1: 00010000 00008000 "spare"
mtd2: 00020000 00020000 "FPGA"
mtd3: 00440000 00040000 "user"
mtd4: 00100000 00040000 "kernel"
mtd5: 00180000 00040000 "initrd"
mtd6: 00040000 00040000 "u-boot"
mtd7: 000c0000 00040000 "jffs"

I have turned on verbose debugging (Level 3) to try and figure out what is
happening.

The following is the relevant bootup output which seems to indicate some
success.
--------------------------------------------------------------------
RPX Lite or CLLF flash device: 2000000 at fe000000
 Amd/Fujitsu Extended Query Table v1.0 at 0x0040
number of CFI chips: 1
cfi_cmdset_0002: Disabling fast programming due to code brokenness.
RPX flash: Using partition definitions
Creating 8 MTD partitions on "RPX":
0x00000000-0x00010000 : "environment"
mtd: Giving out device 0 to environment
0x00010000-0x00020000 : "spare"
mtd: Giving out device 1 to spare
0x00020000-0x00040000 : "FPGA"
mtd: Giving out device 2 to FPGA
0x00040000-0x00480000 : "user"
mtd: Giving out device 3 to user
0x00480000-0x00580000 : "kernel"
mtd: Giving out device 4 to kernel
0x00580000-0x00700000 : "initrd"
mtd: Giving out device 5 to initrd
0x00700000-0x00740000 : "u-boot"
mtd: Giving out device 6 to u-boot
0x00740000-0x00800000 : "jffs"
mtd: Giving out device 7 to jffs
$Id: ftl.c,v 1.46 2003/03/02 18:45:07 joern Exp $
ftl_cs: FTL header not found.
ftl_cs: FTL header not found.
ftl_cs: FTL header not found.
ftl_cs: FTL header not found.
ftl_cs: FTL header not found.
ftl_cs: FTL header not found.
ftl_cs: FTL header not found.
ftl_cs: FTL header not found.
--------------------------------------------------------------------

I can successfully mount /dev/mtdblock/3 and write to it but I'm unable to 
to mount the others. (I can mount the "user" partition but when I mount
"spare" or "jffs" I am unable to write to them -> disk full.)

After mounting /dev/mtdblock/1 I get the following.

bash-2.05# df
Filesystem           1k-blocks      Used Available Use% Mounted on
/dev/root             18279812  11022528   6328720  64% /
jffs_statfs()
/dev/mtdblock/1      17179869120 17175674880   4194240 100% /mnt/jffs

After un-mounting I've tried again with another partition.

bash-2.05# mount -t jffs /dev/mtdblock/7 /mnt/jffs
JFFS: Trying to mount device 1f:07.
jffs_build_fs()
jffs_create_control()
jffs_build_begin()
  fmc->flash_size = 786432 bytes
jffs_scan_flash(): start pos = 0x0, end = 0xc0000
check_partly_erased_sector():checking sector which contains offset 0x0 for
flipp
ing bits..
flash_safe_read(c02e0a60, 00000000, c0b4b000, 00001000)
.....
flash_safe_read(c02e0a60, 000bf000, c0b84000, 00001000)
flash_safe_read(c02e0a60, 000bf000, c0b84000, 00001000)
check_partly_erased_sector():Done checking all sectors till offset 0xc0000
for f
lipping bits.
*************** Dirty flash memory or bad inode: hexdump(pos = 0x0, len =
128):
0: 5765 6420 4170 7220 3232 2031 363a 3430  Wed.Apr.22.16:40
16: 3a35 3020 2f65 7463 2f6c 6f63 616c 7469  :50./etc/localti
32: 6d65 2031 3938 310a ffff ffff ffff ffff  me.1981.˙˙˙˙˙˙˙˙
48: ffff ffff ffff ffff ffff ffff ffff ffff  ˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙
64: ffff ffff ffff ffff ffff ffff ffff ffff  ˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙
80: ffff ffff ffff ffff ffff ffff ffff ffff  ˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙
96: ffff ffff ffff ffff ffff ffff ffff ffff  ˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙
112: ffff ffff ffff ffff ffff ffff ffff ffff  ˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙
jffs_fmalloced()
struct jffs_fmcontrol: 0xc0d5fb30
{
        786432, /* flash_size  */
        0, /* used_size  */
        40, /* dirty_size  */
        786392, /* free_size  */
        262144, /* sector_size  */
        1048576, /* min_free_size  */
        131072, /* max_chunk_size  */
        0xc02e0a60, /* mtd  */
        0xc0b4a1e0, /* head  */    (head->offset = 0x00000000)
        0xc0b4a1e0, /* tail  */    (tail->offset + tail->size = 0x00000028)
        0x00000000, /* head_extra  */
        0x00000000, /* tail_extra  */
}
struct jffs_fm: 0xc0b4a1e0
{
       0x00000000, /* offset  */
       40, /* size  */
       0x00000000, /* prev  */
       0x00000000, /* next  */
       0x00000000, /* nodes  */
}
jffs_scan_flash(): 0xffffffff at pos 0x28.
flash_safe_read(c02e0a60, 00000028, c0b84000, 00001000)
flash_safe_read(c02e0a60, 000bf028, c0b84000, 00000fd8)
jffs_scan_flash():0xffffffff ended at pos 0xc0000.
Free space accepted: Starting 0x28 for 0xbffd8 bytes
jffs_build_end()
struct jffs_fmcontrol: 0xc0d5fb30
{
        786432, /* flash_size  */
        0, /* used_size  */
        40, /* dirty_size  */
        786392, /* free_size  */
        262144, /* sector_size  */
        1048576, /* min_free_size  */
        131072, /* max_chunk_size  */
        0xc02e0a60, /* mtd  */
        0xc0b4a1e0, /* head  */    (head->offset = 0x00000000)
        0xc0b4a1e0, /* tail  */    (tail->offset + tail->size = 0x00000028)
        0x00000000, /* head_extra  */
        0x00000000, /* tail_extra  */
}
jffs_scan_flash(): Leaving...
jffs_find_file(): ino: 1
jffs_find_file(): Didn't find file with ino 1.
jffs_add_virtual_root(): Creating a virtual root directory.
jffs_insert_file_into_hash(): f->ino: 1
jffs_possibly_delete_file(): ino: 1
jffs_remove_redundant_nodes(): ino: 1, name: "", newest_type: 1
jffs_insert_file_into_tree(): name: ""
jffs_find_file(): ino: 0
jffs_find_file(): Didn't find file with ino 0.
jffs_build_file(): ino: 1, name: ""
jffs_update_file(): ino: 1, version: 0
JFFS: Dumping the file system's hash table...
*** c->hash[1]: "" (ino: 1, pino: 0)
/ (ino: 1, highest_version: 0, size: 0)
jffs_read_inode(): inode->i_ino == 1
read_inode(): down biglock
jffs_find_file(): ino: 1
jffs_find_file(): Found file with ino 1. (name: "")
read_inode(): up biglock
JFFS: GC thread pid=93.
JFFS: Successfully mounted device 1f:07.
jffs_garbage_collect_thread(): Starting infinite loop.
thread_should_wake(): free=786392, dirty=40, blocksize=262144.
thread_should_wake(): Not waking. Insufficient dirty space
bash-2.05#


Any help would be greatly appreciated. Thanks in advance

Jeremy


To unsubscribe from this list: send the line "unsubscribe jffs-dev" in
the body of a message to majordomo@xxxxxxx.com