Skip to contentSkip to conversation

Help with mtd + jffs2

DISCUSSION Frank R Callaghan 2 participants 2 messages Jun 11, 2003 Memory technology devices (MTD)

lore
Share & tools
lore
#0 lore raw

Hi,

I have been trying to get the mtd driver working with the flash device on the TS-5300 card - all seemed to be going well :=

$Id: ftl.c,v 1.50 2003/05/21 10:49:47 dwmw2 Exp $ physmap flash device: 200000 at 9400000
Amd/Fujitsu Extended Query Table v1.1 at 0x0040
number of CFI chips: 1
cfi_cmdset_0002: Disabling fast programming due to code brokenness.
kmod: failed to exec /sbin/modprobe -s -k cmdlinepart, errno = 2 cmdlinepart partition parsing not available
kmod: failed to exec /sbin/modprobe -s -k RedBoot, errno = 2 RedBoot partition parsing not available
Using physmap partition definition
Creating 3 MTD partitions on "Physically mapped flash":
0x00000000-0x000e0000 : "BOOT FIRMWARE"
mtd: Giving out device 0 to BOOT FIRMWARE
ftl_cs: FTL header not found.
0x000e0000-0x00100000 : "BIOS-DO_NOT_TOUCH"
mtd: Giving out device 1 to BIOS-DO_NOT_TOUCH
ftl_cs: FTL header not found.
0x00100000-0x00200000 : "PNC-2000 filesystem"
mtd: Giving out device 2 to PNC-2000 filesystem
ftl_cs: FTL header not found.

# cat /proc/mtd
dev:    size   erasesize  name
mtd0: 000e0000 00010000 "BOOT FIRMWARE"
mtd1: 00020000 00010000 "BIOS-DO_NOT_TOUCH"
mtd2: 00100000 00010000 "PNC-2000 filesystem"

But then I tryed to put the jffs2 file system image onto the device :=

# cp /myapp/jffs2_file_sys.img /dev/mtd0
cp: unable to open `/dev/mtd0': No such device
#

but I have the device !

# ls -al /dev/mtd?
crw-------    1 root     root      90,   0 Jan  1  1970 /dev/mtd0
crw-------    1 root     root      90,   2 Jan  1  1970 /dev/mtd1
crw-------    1 root     root      90,   4 Jan  1  1970 /dev/mtd2
crw-------    1 root     root      90,   6 Jan  1  1970 /dev/mtd3
crw-------    1 root     root      90,   8 Jan  1  1970 /dev/mtd4

So Close but, So Far ;(

Can anyone suggest what I may have cocked-up ?
Where I can go from here - be nice ;)

TIA,
Frank.

#1 lore raw
Quoted 8 lines · Frank R Callaghan

But then I tryed to put the jffs2 file system image onto the device :=

# cp /myapp/jffs2_file_sys.img /dev/mtd0
cp: unable to open `/dev/mtd0': No such device
#
Quoted 7 lines

but I have the device !

# ls -al /dev/mtd?
crw-------    1 root     root      90,   0 Jan  1  1970 /dev/mtd0
crw-------    1 root     root      90,   2 Jan  1  1970 /dev/mtd1
crw-------    1 root     root      90,   4 Jan  1  1970 /dev/mtd2
crw-------    1 root     root      90,   6 Jan  1  1970 /dev/mtd3
crw-------    1 root     root      90,   8 Jan  1  1970 /dev/mtd4

device != device node

A door alone doesn't make a mansion either. :)

Set CONFIG_MTD_CHAR to yes or better yet set CONFIG_MTD_BLOCK to yes and use /dev/mtdblock* instead. Those devices are usually much nicer unless you really *really* know you don't want them.

Jörn

Signature · 2 lines
It's just what we asked for, but not what we want!
-- anonymous