public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
* mounting mtd device
@ 2003-09-19 15:32 Luca Contini
  2003-09-19 16:49 ` Cam Mayor
  0 siblings, 1 reply; 6+ messages in thread
From: Luca Contini @ 2003-09-19 15:32 UTC (permalink / raw)
  To: linux-mtd

Hi all,
I've successfully compiled the mtd subsystem as a module (mtdblock.o and
mtd_blkdevs.o).
I've also successfully inserted those modules using insmod utility, so that
now I can see the mtdblock block device (major number 31) in the
/proc/devices list.
But when I try to mount the corresponding /dev/mtdblock0 device to /mnt/mtd
I got the following error:
** mount: /dev/mtdblock0: unknown device **

The /dev/mtdblock0 device relies on major number 31, minor number 0 and is a
block device.
Also, I've placed a
printk("<1>open\n")
in the 'blktrans_open' function to see whether the mount is at least trying
to open the device but with no result.
Does anyone know why?

Regards

Luca

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: mounting mtd device
  2003-09-19 15:32 mounting mtd device Luca Contini
@ 2003-09-19 16:49 ` Cam Mayor
  2003-09-23  9:44   ` Luca Contini
  2003-09-23 17:35   ` Luca Contini
  0 siblings, 2 replies; 6+ messages in thread
From: Cam Mayor @ 2003-09-19 16:49 UTC (permalink / raw)
  To: Luca Contini, linux-mtd

On Friday 19 September 2003 10:32, Luca Contini wrote:
> Hi all,
> I've successfully compiled the mtd subsystem as a module (mtdblock.o and
> mtd_blkdevs.o).
> I've also successfully inserted those modules using insmod utility, so that
> now I can see the mtdblock block device (major number 31) in the
> /proc/devices list.
> But when I try to mount the corresponding /dev/mtdblock0 device to /mnt/mtd
> I got the following error:
> ** mount: /dev/mtdblock0: unknown device **
>
> The /dev/mtdblock0 device relies on major number 31, minor number 0 and is
> a block device.
> Also, I've placed a
> printk("<1>open\n")
> in the 'blktrans_open' function to see whether the mount is at least trying
> to open the device but with no result.
> Does anyone know why?

I'm new to MTD, but i don't see enough information here.  How did you try and 
mount it?  For instance, did you do "mount -t jffs2 /dev/mtdblock0 /mnt/mtd", 
or did you just type "mount /dev/mtdblock0 /mnt/mtd"?  (jffs2 is an arbitrary 
example).

Is your device actually detected?  Just because you have the module installed 
and showing up in /proc/devices doesn't mean it was detected.  what does 
/proc/mtd say?  For instance, mine says:
# cat /proc/mtd
dev:    size   erasesize  name
mtd0: 00800000 00020000 "flash"
mtd1: 0000c000 00000010 "SRAM"
mtd2: 00000080 00010000 "BootROM"
mtd3: 00800000 00020000 "Physically mapped flash"
mtd4: 00400000 00020000 "system"
mtd5: 00400000 00020000 "userarea"
mtd6: 09000000 00004000 "guidenand"

this shows which mtd devices are actually there to be accessed.

cheers,
cam

-- 
Cameron Mayor
Iders Incorporated

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: mounting mtd device
  2003-09-19 16:49 ` Cam Mayor
@ 2003-09-23  9:44   ` Luca Contini
  2003-09-23 17:35   ` Luca Contini
  1 sibling, 0 replies; 6+ messages in thread
From: Luca Contini @ 2003-09-23  9:44 UTC (permalink / raw)
  To: Cam Mayor, linux-mtd

> On Friday 19 September 2003 10:32, Luca Contini wrote:
> > Hi all,
> > I've successfully compiled the mtd subsystem as a module (mtdblock.o and
> > mtd_blkdevs.o).
> > I've also successfully inserted those modules using insmod utility, so
that
> > now I can see the mtdblock block device (major number 31) in the
> > /proc/devices list.
> > But when I try to mount the corresponding /dev/mtdblock0 device to
/mnt/mtd
> > I got the following error:
> > ** mount: /dev/mtdblock0: unknown device **
> >
> > The /dev/mtdblock0 device relies on major number 31, minor number 0 and
is
> > a block device.
> > Also, I've placed a
> > printk("<1>open\n")
> > in the 'blktrans_open' function to see whether the mount is at least
trying
> > to open the device but with no result.
> > Does anyone know why?
>
> I'm new to MTD, but i don't see enough information here.  How did you try
and
> mount it?  For instance, did you do "mount -t jffs2 /dev/mtdblock0
/mnt/mtd",
> or did you just type "mount /dev/mtdblock0 /mnt/mtd"?  (jffs2 is an
arbitrary
> example).
>

I'm new to MTD too.
I've tryied to mount issuing the command "mount -t vfat /dev/mtdblock0
/mnt/smartmedia"
The nand device in fact is a smartmedia.

> Is your device actually detected?  Just because you have the module
installed
> and showing up in /proc/devices doesn't mean it was detected.  what does
> /proc/mtd say?  For instance, mine says:
> # cat /proc/mtd
> dev:    size   erasesize  name
> mtd0: 00800000 00020000 "flash"
> mtd1: 0000c000 00000010 "SRAM"
> mtd2: 00000080 00010000 "BootROM"
> mtd3: 00800000 00020000 "Physically mapped flash"
> mtd4: 00400000 00020000 "system"
> mtd5: 00400000 00020000 "userarea"
> mtd6: 09000000 00004000 "guidenand"
>
> this shows which mtd devices are actually there to be accessed.

I've verified that my device is not actually detected. I thought the MTD
subsystem could work without the nand device actually working, but of course
I'm wrong.
I've a low level driver that partions and reads/writes from the smart media
and I'm trying to interface it with the MTD subsystem.
So, instead of nand.c I have s3c2410nand.c (referring to the nand controller
of my board).
Thank you fo your help

regards

Luca


>
> cheers,
> cam
>
> --
> Cameron Mayor
> Iders Incorporated
>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: mounting mtd device
  2003-09-19 16:49 ` Cam Mayor
  2003-09-23  9:44   ` Luca Contini
@ 2003-09-23 17:35   ` Luca Contini
  2003-09-23 18:42     ` Steve Brockway
  1 sibling, 1 reply; 6+ messages in thread
From: Luca Contini @ 2003-09-23 17:35 UTC (permalink / raw)
  To: Cam Mayor, linux-mtd

> On Friday 19 September 2003 10:32, Luca Contini wrote:
> > Hi all,
> > I've successfully compiled the mtd subsystem as a module (mtdblock.o and
> > mtd_blkdevs.o).
> > I've also successfully inserted those modules using insmod utility, so
that
> > now I can see the mtdblock block device (major number 31) in the
> > /proc/devices list.
> > But when I try to mount the corresponding /dev/mtdblock0 device to
/mnt/mtd
> > I got the following error:
> > ** mount: /dev/mtdblock0: unknown device **
> >
> > The /dev/mtdblock0 device relies on major number 31, minor number 0 and
is
> > a block device.
> > Also, I've placed a
> > printk("<1>open\n")
> > in the 'blktrans_open' function to see whether the mount is at least
trying
> > to open the device but with no result.
> > Does anyone know why?
>
> I'm new to MTD, but i don't see enough information here.  How did you try
and
> mount it?  For instance, did you do "mount -t jffs2 /dev/mtdblock0
/mnt/mtd",
> or did you just type "mount /dev/mtdblock0 /mnt/mtd"?  (jffs2 is an
arbitrary
> example).
>
> Is your device actually detected?  Just because you have the module
installed
> and showing up in /proc/devices doesn't mean it was detected.  what does
> /proc/mtd say?  For instance, mine says:
> # cat /proc/mtd
> dev:    size   erasesize  name
> mtd0: 00800000 00020000 "flash"
> mtd1: 0000c000 00000010 "SRAM"
> mtd2: 00000080 00010000 "BootROM"
> mtd3: 00800000 00020000 "Physically mapped flash"
> mtd4: 00400000 00020000 "system"
> mtd5: 00400000 00020000 "userarea"
> mtd6: 09000000 00004000 "guidenand"
>
> this shows which mtd devices are actually there to be accessed.

Which is the mtdblock function called by cat?
I'd like to debug my code... should the printk("<1>check") be working?

Regards
>
> cheers,
> cam
>
> --
> Cameron Mayor
> Iders Incorporated
>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: mounting mtd device
  2003-09-23 17:35   ` Luca Contini
@ 2003-09-23 18:42     ` Steve Brockway
  2003-09-23 21:54       ` Cam Mayor
  0 siblings, 1 reply; 6+ messages in thread
From: Steve Brockway @ 2003-09-23 18:42 UTC (permalink / raw)
  To: linux-mtd

Hello All, I am new to this type of mailing list.

I need help mounting a JFFS2. Not sure of the correct steps. The underlying
MTD structure is working.

Below is a part of a boot sequence and the the output of
cat /proc/mtd.

What is the next step to mount a JFFS2?

SteveB


 Amd/Fujitsu Extended Query Table v1.0 at 0x0040
SL8245 Bank 0: JEDEC Device ID is 0xC4. Assuming broken CFI table.
SL8245 Bank 0: Swapping erase regions for broken CFI table.
number of CFI chips: 1
SL8245 flash bank 0: Using static image partition definition
Creating 9 MTD partitions on "SL8245 Bank 0":
0x00000000-0x00640000 : "ramdisk"
0x00640000-0x00700000 : "kernel"
0x00700000-0x00740000 : "U-Boot"
0x00740000-0x00780000 : "data 1"
0x00780000-0x007c0000 : "data 2"
0x007c0000-0x007e0000 : "data 3"
0x007e0000-0x007e8000 : "data 4"
0x007e8000-0x007f0000 : "data 5"
0x007f0000-0x00800000 : "Environment"
NET4: Linux TCP/IP 1.0 for NET4.0
IP Protocols: ICMP, UDP, TCP, IGMP
IP: routing cache hash table of 2048 buckets, 16Kbytes
TCP: Hash tables configured (established 16384 bind 16384)
IP-Config: Guessing netmask 255.0.0.0
IP-Config: Complete:
      device=eth0, addr=10.0.0.5, mask=255.0.0.0, gw=255.255.255.255,
     host=sl8245, domain=, nis-domain=(none),
     bootserver=10.0.0.4, rootserver=10.0.0.4, rootpath=
NET4: Unix domain sockets 1.0/SMP for Linux NET4.0.
RAMDISK: Compressed image found at block 0
eth0: network connection up using port A
    speed:           100
    autonegotiation: yes
    duplex mode:     full
    flowctrl:        symmetric
    scatter-gather:  enabled
Freeing initrd memory: 5862k freed
VFS: Mounted root (ext2 filesystem) readonly.
Freeing unused kernel memory: 88k init
INIT: version 2.78 booting
Checking all file systems...
Parallelizing fsck version 1.18 (11-Nov-1999)
Loading the saved-state of the serial devices...
not mounted anything
Setting up IP spoofing protection: rp_filter.
Configuring network interfaces: done.
/etc/init.d/rcS: run-parts: command not found
INIT: Entering runlevel: 2
Starting system log daemon: syslogd klogd.
Starting internet superserver: inetd.

StraightLine iSCSI Single Board Computer  Str8line ttyS0

Str8line login:

Linux Str8line 2.4.20 #4 Tue Sep 23 08:52:51 PDT 2003 ppc unknown
Str8line:~# cd /
Str8line:/# cd proc
Str8line:/proc# ls
1    4   99       execdomains  kcore    modules     scsi      tty
106  5   bus      filesystems  kmsg     mounts      self      uptime
116  6   cmdline  fs           ksyms    mtd         slabinfo  version
120  7   cpuinfo  interrupts   loadavg  net         stat
122  8   devices  iomem        locks    partitions  swaps
2    9   dma      ioports      meminfo  pci         sys
3    97  driver   irq          misc     ppc_htab    sysvipc
Str8line:/proc# cat mtd
dev:    size   erasesize  name
mtd0: 00640000 00040000 "ramdisk"
mtd1: 000c0000 00040000 "kernel"
mtd2: 00040000 00040000 "U-Boot"
mtd3: 00040000 00040000 "data 1"
mtd4: 00040000 00040000 "data 2"
mtd5: 00020000 00020000 "data 3"
mtd6: 00008000 00008000 "data 4"
mtd7: 00008000 00008000 "data 5"
mtd8: 00010000 00010000 "Environment"
Str8line:/proc#

> Linux MTD discussion mailing list
> http://lists.infradead.org/mailman/listinfo/linux-mtd/
>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: mounting mtd device
  2003-09-23 18:42     ` Steve Brockway
@ 2003-09-23 21:54       ` Cam Mayor
  0 siblings, 0 replies; 6+ messages in thread
From: Cam Mayor @ 2003-09-23 21:54 UTC (permalink / raw)
  To: Steve Brockway, linux-mtd

On Tuesday 23 September 2003 13:42, Steve Brockway wrote:
> Hello All, I am new to this type of mailing list.
>
> I need help mounting a JFFS2. Not sure of the correct steps. The underlying
> MTD structure is working.
>
> Below is a part of a boot sequence and the the output of
> cat /proc/mtd.
>
> What is the next step to mount a JFFS2?

1) read through mtd-jffs-HOWTO.txt for the answer
2) beware using more than 8 (ie. 0-7) mtd partitions.  mtdblock devices don't 
go higher than that.  (or so it seems)
3) for new questions, start a new subject line without hitting the reply 
button

-- 
Cameron Mayor
Iders Incorporated

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2003-09-23 21:54 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-09-19 15:32 mounting mtd device Luca Contini
2003-09-19 16:49 ` Cam Mayor
2003-09-23  9:44   ` Luca Contini
2003-09-23 17:35   ` Luca Contini
2003-09-23 18:42     ` Steve Brockway
2003-09-23 21:54       ` Cam Mayor

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox