Skip to contentSkip to conversation

Problem with mounting JFFS2

DISCUSSION Iva Salom 3 participants 4 messages Aug 3, 2006 – Aug 4, 2006 Memory technology devices (MTD)

lore
Share & tools
lore

Iva Salom

author
#0 lore raw

Hi!

I am a beginner in all these embedded linux - mtd - jffs stuff. I am using Intel FLASH 28F320 (2 interleaved 16b chips of 8MB, so we have 32bit buswidth) (CFI) with TMS320C5471 platform. I turnd on MTD support, so I have 5 partitions: bootloader (/dev/mtd0), bootloader parameters (/dev/mtd1), kernel image (/dev/mtd2), ROMFS SDRAM image (/dev/mtd5), primary file system, which is romfs (/dev/mtd3) and I want the second to be jffs2 (/dev/mtd4):

c5471_init: CFI FLASH device size: 16384K

Creating 5 MTD partitions on "C5471 CFI":

0x00000000-0x000a0000 : "C5471 Bootloader"

0x000a0000-0x000c0000 : "C5471 Bootloader Parameters"

0x000c0000-0x001c0000 : "C5471 Kernel Image"

0x001c0000-0x00800000 : "C5471 Primary File System"

0x00800000-0x01000000 : "C5471 Secondary File System"

Creating 1 MTD partitions on "SDRAM":

0x00000000-0x006bffe0 : "SDRAM File System"

I have made jffs2 image:

arm-uclinux-mkjffs2 -d ./jffsfolder -l -e 0x00020000 -o jffs2.img >/dev/null

and I loaded it at addresses from 0x00800000, which correspond to fs2, i.e. /dev/mtd4.

When I try to mount jffs2:

# mount -t jffs2 /dev/mtd4 /mnt/ramdisk/tmp

it sends me messages:

jffs2: read_super for device 1f:04

jffs2_scan_eraseblock(): Scanning block at 0x0

jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000000: 0xface instead

jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000004: 0x0020 instead

Empty bitmask at 0x00000008

jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0000000c: 0x5188 instead

jffs2_scan_dirent_node(): Node at 0x00000010

jffs2_get_ino_cache(): ino 1

jffs2_get_ino_cache found 00000000 for ino 1

Allocated inocache at 106dd2c0

jffs2_add_ino_cache: Add 106dd2c0 (ino #1)

jffs2_add_fd_to_list( 1023f6a0, 10219e60 (->00000000))

Dirent "config.last" (hash 0xca144fa2, ino #2

jffs2_scan_inode_node(): Node at 0x00000044

jffs2_get_ino_cache(): ino 2

jffs2_get_ino_cache found 00000000 for ino 2

Allocated inocache at 106dd2d4

jffs2_add_ino_cache: Add 106dd2d4 (ino #2)

Node is ino #2, version 1. Range 0x0-0x1000

jffs2_scan_inode_node(): Node at 0x00001088

jffs2_get_ino_cache(): ino 2

jffs2_get_ino_cache found 106dd2d4 for ino 2

Node is ino #2, version 2. Range 0x1000-0x2000

jffs2_scan_inode_node(): Node at 0x000020cc

jffs2_get_ino_cache(): ino 2

jffs2_get_ino_cache found 106dd2d4 for ino 2

Node is ino #2, version 3. Range 0x2000-0x27c4

jffs2_scan_dirent_node(): Node at 0x000028d4

jffs2_get_ino_cache(): ino 1

jffs2_get_ino_cache found 106dd2c0 for ino 1

jffs2_add_fd_to_list( 1023f6e0, 10219e60 (->1023f6a0))

Dirent "config.last~" (hash 0xaedfc2e3, ino #3

Dirent "config.last" (hash 0xca144fa2, ino #2

jffs2_scan_inode_node(): Node at 0x00002908

jffs2_get_ino_cache(): ino 3

jffs2_get_ino_cache found 00000000 for ino 3

Allocated inocache at 106dd2e8

jffs2_add_ino_cache: Add 106dd2e8 (ino #3)

Node is ino #3, version 1. Range 0x0-0x1000

jffs2_scan_inode_node(): Node at 0x0000394c

jffs2_get_ino_cache(): ino 3

jffs2_get_ino_cache found 106dd2e8 for ino 3

Node is ino #3, version 2. Range 0x1000-0x2000

jffs2_scan_inode_node(): Node at 0x00004990

jffs2_get_ino_cache(): ino 3

jffs2_get_ino_cache found 106dd2e8 for ino 3

Node is ino #3, version 3. Range 0x2000-0x27c4

Found empty flash at 0x5198

Empty flash detected from 0x00005198 to 0x00020000

Block at 0x00000000: free 0x0001ae68, dirty 0x00000010, used 0x00005188

jffs2_scan_eraseblock(): Scanning block at 0x20000

Empty flash detected from 0x00020000 to 0x00040000

Block at 0x00020000 is empty (erased)

jffs2_scan_eraseblock(): Scanning block at 0x40000

Empty flash detected from 0x00040000 to 0x00060000

Block at 0x00040000 is empty (erased)

jffs2_scan_eraseblock(): Scanning block at 0x60000

Empty flash detected from 0x00060000 to 0x00080000

Block at 0x00060000 is empty (erased)

etc., and finally:

Pass 3 complete

jffs2_read_super(): Getting root inode

jffs2_read_inode(): inode->i_ino == 1

getting inocache

jffs2_get_ino_cache(): ino 1

jffs2_get_ino_cache found 106dd2c0 for ino 1

jffs2_read_inode(): Got inocache at 106dd2c0

jffs2_read_inode(): ino #1 nlink is 1

jffs2_get_inode_nodes(): ino #1

Node at 000028d4 is a dirent node

Adding fd "config.last~", ino #3

jffs2_add_fd_to_list( 1023f6a0, 10707d14 (->00000000))

Dirent "config.last~" (hash 0xaedfc2e3, ino #3

Node at 00000010 is a dirent node

Adding fd "config.last", ino #2

jffs2_add_fd_to_list( 1023f6e0, 10707d14 (->1023f6a0))

Dirent "config.last~" (hash 0xaedfc2e3, ino #3

Dirent "config.last" (hash 0xca144fa2, ino #2

jffs2_read_inode() returning

jffs2_read_super(): d_alloc_root()

thread_should_wake(): nr_free_blocks 0, nr_erasing_blocks 63, dirty_size 0x10

thread_should_wake(): return 0

jffs2_garbage_collect_thread(): posle !thread_should_wake

jffs2_garbage_collect_thread sleeping...

JFFS2: Garbage collect thread is pid 37

jffs2_read_super(): pre return sb

thread_should_wake(): nr_free_blocks 0, nr_erasing_blocks 63, dirty_size 0x10

thread_should_wake(): return 0

Starting erase of pending block 0x00620000

Freeing all node refs for eraseblock offset 0x00620000

erase.c: jffs2_free_all_node_refs(): end

jffs2_erase_pending_blocks(): TEST1

jffs2_erase_pending_blocks(): TEST2

jffs2_erase_block(): TEST1

jffs2_erase_block(): TEST2

jffs2_erase_block(): TEST3

do_erase_oneblock(): status_OK = CMD(0x80) = 0x800080

do_erase_oneblock(): chip->state1 = 0

do_erase_oneblock(): chip->state2 = 1

do_erase_o

and there it stops every time, with a few characters more or less. The situation was similar when I erased my flash before mounting the jffs2 (except it found completely empty flash).

Have enyone an idea what I did wrong or what I missed to do? Could a problem be with that thread thing - thread_should_wake()?

Thank you in advance!

Iva

#1 lore raw
Quoted 11 lines · Iva Salom

Hi!

I am a beginner in all these embedded linux - mtd - jffs stuff. I am using Intel FLASH 28F320 (2 interleaved 16b chips of 8MB, so we have 32bit buswidth) (CFI) with TMS320C5471 platform. I turnd on MTD support, so I have 5 partitions: bootloader (/dev/mtd0), bootloader parameters (/dev/mtd1), kernel image (/dev/mtd2), ROMFS SDRAM image (/dev/mtd5), primary file system, which is romfs (/dev/mtd3) and I want the second to be jffs2 (/dev/mtd4):

Which kernel are you using?

Quoted 6 lines

I have made jffs2 image:

arm-uclinux-mkjffs2 -d ./jffsfolder -l -e 0x00020000 -o jffs2.img >/dev/null

and I loaded it at addresses from 0x00800000, which correspond to fs2, i.e. /dev/mtd4.

Loaded it how?

josh

#3 lore raw
In reply to Iva Salom

Hello Iva,

Quoted 7 lines · Iva Salom

I am a beginner in all these embedded linux - mtd - jffs stuff. I am using Intel FLASH 28F320 (2 interleaved 16b chips of 8MB, so we have 32bit buswidth) (CFI) with TMS320C5471 platform. I turnd on MTD support, so I have 5 partitions: bootloader (/dev/mtd0), bootloader parameters (/dev/mtd1), kernel image (/dev/mtd2), ROMFS SDRAM image (/dev/mtd5), primary file system, which is romfs (/dev/mtd3) and I want the second to be jffs2 (/dev/mtd4):

Sorry, I didn't get it what's the question/problem. The output you provided looks OK. If you don't want all this output - just disable JFFS2 debugging. Or you deliberately enabled it?

BTW, your original message included HTML and was not rejected by a mistake. Please, don't send HTML messages.

Regards,
Artem.

Signature · 3 lines
Best Regards,
Artem B. Bityutskiy,
St.-Petersburg, Russia.
author
#2 lore raw
In reply to Josh Boyer

----- Original Message ----- From: "Josh Boyer" <[email protected]>
To: "Iva Salom" <[email protected]>
Cc: <[email protected]>
Sent: Thursday, August 03, 2006 1:53 PM
Subject: Re: Problem with mounting JFFS2

Quoted 13 lines · Iva Salom
Quoted 11 lines

Hi!

I am a beginner in all these embedded linux - mtd - jffs stuff. I am using Intel FLASH 28F320 (2 interleaved 16b chips of 8MB, so we have 32bit buswidth) (CFI) with TMS320C5471 platform. I turnd on MTD support, so I have 5 partitions: bootloader (/dev/mtd0), bootloader parameters (/dev/mtd1), kernel image (/dev/mtd2), ROMFS SDRAM image (/dev/mtd5), primary file system, which is romfs (/dev/mtd3) and I want the second to be jffs2 (/dev/mtd4):

Quoted 1 line

Which kernel are you using?

It's uClinux 2.4.

Quoted 9 lines
Quoted 7 lines

I have made jffs2 image:

arm-uclinux-mkjffs2 -d ./jffsfolder -l -e 0x00020000 -o jffs2.img

Quoted 1 line

/dev/null

and I loaded it at addresses from 0x00800000, which correspond to fs2, i.e. /dev/mtd4.

Loaded it how?

I used rrload "Load" and "Store" options, and when I checked the flash everything looked ok, it also had those jffs2 magic 0x1985 words at some places, so I thought that I did that part right.

Quoted 1 line

josh

Thanks!
Iva