Hi,
I am trying to mount a jffs2 file system in rom.
I have configured the mtd devices in the following manner:
/> cat /proc/mtd
dev:    size   erasesize  name
mtd0: 00040000 00200000 "U-Boot"
mtd1: 00150000 00200000 "uClinux"
mtd2: 00070000 00200000 "userfs"
mtd3: 00147000 00001000 "ROMfs"

however when I try to copy some small file (as a test) to mtd2 I get
the following error:

/var/tmp> cp a.out /dev/mtd2
/dev/mtd2: Permission denied

Therefore, I cannot copy a jffs2 image file to that location either.

The file permissions seem fine:
/var/tmp> ls -l /dev/mtd2
crw-------  1 0        0         90,   4  Jan  1 1970  /dev/mtd2

When compiling uClinux image of kernel 2.4.x I do not have this problem.

Thank you in advance for your help.

Erez.

This is the output from my boot process:

Linux version 2.6.19-uc1 ([EMAIL PROTECTED]) (gcc version 4.1.1) #51
Wed Nov 21 17:41:31 EST 2007
Copying cmd line from address 0x30000<6>

uClinux/COLDFIRE(m5280/5282)
COLDFIRE port done by Greg Ungerer, [EMAIL PROTECTED]
Flat model support (C) 1998,1999 Kenneth Albanowski, D. Jeff Dionne
Built 1 zonelists.  Total pages: 4064
Kernel command line:
mtdparts=physmap-flash.0:256k(U-Boot),1344k(uClinux),-(userfs)ro
rootfstype=romfs root=/dev/mtdblock3
PID hash table entries: 64 (order: 6, 256 bytes)
Dentry cache hash table entries: 2048 (order: 1, 8192 bytes)
Inode-cache hash table entries: 1024 (order: 0, 4096 bytes)
Memory available: 13104k/16384k RAM, (1370k kernel code, 192k data)
Mount-cache hash table entries: 512
NET: Registered protocol family 16
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 1024 (order: 0, 4096 bytes)
TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
TCP: Hash tables configured (established 1024 bind 1024)
TCP reno registered
JFFS version 1.0, (C) 1999, 2000  Axis Communications AB
JFFS2 version 2.2. (NAND) (C) 2001-2006 Red Hat, Inc.
io scheduler noop registered
io scheduler cfq registered (default)
ColdFire internal UART serial driver version 1.00
ttyS0 at 0x40000200 (irq = 77) is a builtin ColdFire UART
ttyS1 at 0x40000240 (irq = 78) is a builtin ColdFire UART
ttyS2 at 0x40000280 (irq = 79) is a builtin ColdFire UART
RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize
FEC ENET Version 0.2
fec: PHY @ 0x1, ID 0x00221619 -- KS8721BL
eth0: ethernet 06:c0:a8:df:02:00
PPP generic driver version 2.4.2
physmap platform flash device: 00200000 at ffe00000
physmap-flash.0: Found 1 x16 devices at 0x0 in 16-bit bank
Support for command set 0002 not present
gen_probe: No supported Vendor Command Set found
Found: ST M29W160DB
physmap-flash.0: Found 1 x16 devices at 0x0 in 16-bit bank
Support for command set 0002 not present
gen_probe: No supported Vendor Command Set found
3 cmdlinepart partitions found on MTD device physmap-flash.0
Creating 3 MTD partitions on "physmap-flash.0":
0x00000000-0x00040000 : "U-Boot"
0x00040000-0x00190000 : "uClinux"
0x00190000-0x00200000 : "userfs"
uclinux[mtd]: RAM probe address=0x1c6d00 size=0x147000
Creating 1 MTD partitions on "RAM":
0x00000000-0x00147000 : "ROMfs"
uclinux[mtd]: set ROMfs to be root filesystem
TCP cubic registered
NET: Registered protocol family 1
NET: Registered protocol family 17
VFS: Mounted root (romfs filesystem) readonly.
Freeing unused kernel memory: 52k freed (0x1a7000 - 0x1b3000)
Shell invoked to run file: /etc/rc
Command: hostname uClinux
Command: /bin/expand /etc/ramfs.img /dev/ram1
Command: mount -t proc proc /proc
Command: mount -t ext2 /dev/ram1 /var
Command: mkdir /var/tmp
Command: mkdir /var/log
Command: mkdir /var/run
Command: mkdir /var/lock
Command: mkdir /var/empty
Command: ifconfig lo 127.0.0.1
Command: route add -net 127.0.0.0 netmask 255.0.0.0 lo
Command: dhcpcd -p -a eth0 &
[19]
Command: cat /etc/motd
/etc/motd: No such file or directory
Execution Finished, Exiting
eth0: config: auto-negotiation on, 100FDX, 100HDX, 10FDX, 10HDX.
Sash command shell (version 1.1.1)
/> cat /proc/mtd
dev:    size   erasesize  name
mtd0: 00040000 00200000 "U-Boot"
mtd1: 00150000 00200000 "uClinux"
mtd2: 00070000 00200000 "userfs"
mtd3: 00147000 00001000 "ROMfs"
_______________________________________________
uClinux-dev mailing list
[email protected]
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by [email protected]
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev

Reply via email to