public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
* Block device as MTD
@ 2001-06-26 10:33 Simon Evans
  2001-06-26 18:22 ` Tim Riker
  2001-06-26 20:19 ` Simon Evans
  0 siblings, 2 replies; 11+ messages in thread
From: Simon Evans @ 2001-06-26 10:33 UTC (permalink / raw)
  To: linux-mtd

Hi,

I have written a mtd driver that makes a block device
appear as an MTD device, ie you can use a floppy disk,
hard disk or Compact flash as an MTD then put JFFS2 on
top etc. The main reason for writing this was so I could
put JFFS2 on a Compact Flash (which pretends to be an IDE drive),
however it can be used as a test device for using JFFS2 on
large devices (you should be able to use upto a 4gig block device)
or floppy disks (ie eject the disk when it does a write for testing
 jorunalling).

I have tested it on a floppy disk, and 96MB CF and it seems relatively
stable.

What is the best procedure for releasing it.

cheers
si

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

* Re: Block device as MTD
  2001-06-26 10:33 Block device as MTD Simon Evans
@ 2001-06-26 18:22 ` Tim Riker
  2001-06-26 20:19 ` Simon Evans
  1 sibling, 0 replies; 11+ messages in thread
From: Tim Riker @ 2001-06-26 18:22 UTC (permalink / raw)
  To: Simon Evans; +Cc: linux-mtd

I assume David will just integrate this into the stuff he maintains and
from there to the kernel sources. I'd like to test it as well.

Simon Evans wrote:
> 
> Hi,
> 
> I have written a mtd driver that makes a block device
> appear as an MTD device, ie you can use a floppy disk,
> hard disk or Compact flash as an MTD then put JFFS2 on
> top etc. The main reason for writing this was so I could
> put JFFS2 on a Compact Flash (which pretends to be an IDE drive),
> however it can be used as a test device for using JFFS2 on
> large devices (you should be able to use upto a 4gig block device)
> or floppy disks (ie eject the disk when it does a write for testing
>  jorunalling).
> 
> I have tested it on a floppy disk, and 96MB CF and it seems relatively
> stable.
> 
> What is the best procedure for releasing it.
> 
> cheers
> si
> 
> ______________________________________________________
> Linux MTD discussion mailing list
> http://lists.infradead.org/mailman/listinfo/linux-mtd/

-- 
Tim Riker - http://rikers.org/ - short SIGs! <g>
All I need to know I could have learned in Kindergarten
... if I'd just been paying attention.

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

* Re: Block device as MTD
  2001-06-26 10:33 Block device as MTD Simon Evans
  2001-06-26 18:22 ` Tim Riker
@ 2001-06-26 20:19 ` Simon Evans
  2001-06-26 21:41   ` Bao C. Ha
                     ` (2 more replies)
  1 sibling, 3 replies; 11+ messages in thread
From: Simon Evans @ 2001-06-26 20:19 UTC (permalink / raw)
  To: linux-mtd

I have checked this into CVS now. The following files are affected:

drivers/mtd/devices/blkmtd.c  - the driver itself
drivers/mtd/devices/Config.in
drivers/mtd/devices/Makefile
patches/Configure.help

Please consider this alpha software. It uses raw/io to the disk (not via
the buffer cache). Basic usage is:

modprobe blkmtd device=/dev/floppy/0  etc

If you are going to put a JFFS2 fs on the device, please note that
it can take quite a while to mount because JFFS2 scans every block.
A 96MB CF card took about 2 minutes.

On the plus side, if you have more memory then the size of the device,
you should find the whole device in the page cache ;)

cheers
si

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

* Re: Block device as MTD
  2001-06-26 21:41   ` Bao C. Ha
@ 2001-06-26 20:58     ` Simon Evans
  0 siblings, 0 replies; 11+ messages in thread
From: Simon Evans @ 2001-06-26 20:58 UTC (permalink / raw)
  To: Bao C. Ha; +Cc: linux-mtd

yes, just modprobe blkmtd device=/dev/hda3

Then you should get a new device in /dev/mtdblock/ (if you are using devfs)
just mount the /dev/mtdblock device.

cheers
si




>
>Can I mount a partition like /dev/hda3 or perhaps
>/dev/ide/host0/bus0/target0/lun0/part3?
>
>Bao
>
>> -----Original Message-----
>> From: linux-mtd-admin@lists.infradead.org
>> [mailto:linux-mtd-admin@lists.infradead.org]On Behalf Of Simon Evans
>> Sent: Tuesday, June 26, 2001 1:20 PM
>> To: linux-mtd@lists.infradead.org
>> Subject: Re: Block device as MTD 
>> 
>> 
>> 
>> I have checked this into CVS now. The following files are affected:
>> 
>> drivers/mtd/devices/blkmtd.c  - the driver itself
>> drivers/mtd/devices/Config.in
>> drivers/mtd/devices/Makefile
>> patches/Configure.help
>> 
>> Please consider this alpha software. It uses raw/io to the 
>> disk (not via
>> the buffer cache). Basic usage is:
>> 
>> modprobe blkmtd device=/dev/floppy/0  etc
>> 
>> If you are going to put a JFFS2 fs on the device, please note that
>> it can take quite a while to mount because JFFS2 scans every block.
>> A 96MB CF card took about 2 minutes.
>> 
>> On the plus side, if you have more memory then the size of the device,
>> you should find the whole device in the page cache ;)
>> 
>> cheers
>> si
>> 
>> ______________________________________________________
>> Linux MTD discussion mailing list
>> http://lists.infradead.org/mailman/listinfo/linux-mtd/
>> 
>

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

* RE: Block device as MTD
  2001-06-26 20:19 ` Simon Evans
@ 2001-06-26 21:41   ` Bao C. Ha
  2001-06-26 20:58     ` Simon Evans
  2001-06-26 23:12   ` kira brown
  2001-06-27  6:49   ` Felix Radensky
  2 siblings, 1 reply; 11+ messages in thread
From: Bao C. Ha @ 2001-06-26 21:41 UTC (permalink / raw)
  To: 'Simon Evans', linux-mtd

Can I mount a partition like /dev/hda3 or perhaps
/dev/ide/host0/bus0/target0/lun0/part3?

Bao

> -----Original Message-----
> From: linux-mtd-admin@lists.infradead.org
> [mailto:linux-mtd-admin@lists.infradead.org]On Behalf Of Simon Evans
> Sent: Tuesday, June 26, 2001 1:20 PM
> To: linux-mtd@lists.infradead.org
> Subject: Re: Block device as MTD 
> 
> 
> 
> I have checked this into CVS now. The following files are affected:
> 
> drivers/mtd/devices/blkmtd.c  - the driver itself
> drivers/mtd/devices/Config.in
> drivers/mtd/devices/Makefile
> patches/Configure.help
> 
> Please consider this alpha software. It uses raw/io to the 
> disk (not via
> the buffer cache). Basic usage is:
> 
> modprobe blkmtd device=/dev/floppy/0  etc
> 
> If you are going to put a JFFS2 fs on the device, please note that
> it can take quite a while to mount because JFFS2 scans every block.
> A 96MB CF card took about 2 minutes.
> 
> On the plus side, if you have more memory then the size of the device,
> you should find the whole device in the page cache ;)
> 
> cheers
> si
> 
> ______________________________________________________
> Linux MTD discussion mailing list
> http://lists.infradead.org/mailman/listinfo/linux-mtd/
> 

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

* Re: Block device as MTD
  2001-06-26 20:19 ` Simon Evans
  2001-06-26 21:41   ` Bao C. Ha
@ 2001-06-26 23:12   ` kira brown
  2001-06-26 23:32     ` Bao C. Ha
  2001-06-27  6:49   ` Felix Radensky
  2 siblings, 1 reply; 11+ messages in thread
From: kira brown @ 2001-06-26 23:12 UTC (permalink / raw)
  To: Simon Evans; +Cc: linux-mtd


On Tue, 26 Jun 2001, Simon Evans wrote:

> If you are going to put a JFFS2 fs on the device, please note that
> it can take quite a while to mount because JFFS2 scans every block.
> A 96MB CF card took about 2 minutes.

Why on eartl would you want to put JFFS on CF, when CF provides all the
facilities that JFFS does already?   You might as well put ext3fs on it,
it'll be much faster.

k.

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

* RE: Block device as MTD
  2001-06-26 23:12   ` kira brown
@ 2001-06-26 23:32     ` Bao C. Ha
  0 siblings, 0 replies; 11+ messages in thread
From: Bao C. Ha @ 2001-06-26 23:32 UTC (permalink / raw)
  To: 'kira brown', 'Simon Evans'; +Cc: linux-mtd

Are there any journaling fs with compression besides
JFFS2?  I am primarily interested in the DOM and
JFFS2 on DOC has made life barely bearable in the
small footprint world.

Thanks.
Bao

> -----Original Message-----
> From: linux-mtd-admin@lists.infradead.org
> [mailto:linux-mtd-admin@lists.infradead.org]On Behalf Of kira brown
> Sent: Tuesday, June 26, 2001 4:12 PM
> To: Simon Evans
> Cc: linux-mtd@lists.infradead.org
> Subject: Re: Block device as MTD 
> 
> 
> 
> 
> On Tue, 26 Jun 2001, Simon Evans wrote:
> 
> > If you are going to put a JFFS2 fs on the device, please note that
> > it can take quite a while to mount because JFFS2 scans every block.
> > A 96MB CF card took about 2 minutes.
> 
> Why on eartl would you want to put JFFS on CF, when CF 
> provides all the
> facilities that JFFS does already?   You might as well put 
> ext3fs on it,
> it'll be much faster.
> 
> k.
> 
> 
> ______________________________________________________
> Linux MTD discussion mailing list
> http://lists.infradead.org/mailman/listinfo/linux-mtd/
> 

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

* Re: Block device as MTD
  2001-06-26 20:19 ` Simon Evans
  2001-06-26 21:41   ` Bao C. Ha
  2001-06-26 23:12   ` kira brown
@ 2001-06-27  6:49   ` Felix Radensky
  2001-06-27 22:03     ` Simon Evans
  2 siblings, 1 reply; 11+ messages in thread
From: Felix Radensky @ 2001-06-27  6:49 UTC (permalink / raw)
  To: Simon Evans; +Cc: linux-mtd

Simon Evans wrote:

> I have checked this into CVS now. The following files are affected:
>
> drivers/mtd/devices/blkmtd.c  - the driver itself
> drivers/mtd/devices/Config.in
> drivers/mtd/devices/Makefile
> patches/Configure.help
>
> Please consider this alpha software. It uses raw/io to the disk (not via
> the buffer cache). Basic usage is:
>
> modprobe blkmtd device=/dev/floppy/0  etc
>
> If you are going to put a JFFS2 fs on the device, please note that
> it can take quite a while to mount because JFFS2 scans every block.
> A 96MB CF card took about 2 minutes.
>
> On the plus side, if you have more memory then the size of the device,
> you should find the whole device in the page cache ;)
>
> cheers
> si
>
> ______________________________________________________
> Linux MTD discussion mailing list
> http://lists.infradead.org/mailman/listinfo/linux-mtd/

Hi,

We have CF slot on our board, but no IDE controllers. Can I still use your
blkmtd.c driver to access CF ? If not, what approach should I take to
utilize
CF (adding IDE controller is not an option) ?

Thanks in advance.

Felix.

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

* Re: Block device as MTD
  2001-06-27  6:49   ` Felix Radensky
@ 2001-06-27 22:03     ` Simon Evans
  2001-06-27 23:41       ` Bill Roman
  0 siblings, 1 reply; 11+ messages in thread
From: Simon Evans @ 2001-06-27 22:03 UTC (permalink / raw)
  To: Felix Radensky; +Cc: linux-mtd

Hi,

Basically it wont work. blkmtd isnt actually a driver more a translation
layer. If you want to talk to CF cards directly, you'll have to write an
MTD driver for it. I dont know much about CF cards as I have always used
them as IDE drives, but you may want to look at the PCMCIA utils memory_cs
driver. I think CF cards can appear as regular PCMCIA flash memory cards
until a bit is enabled that puts them into IDE mode. 

I tried a test once using the memory_cs driver on a CF and whilst it
gave me some memory regions, they werent the correct size. Basically,
you'll have to do some hacking around on the driver to get it to work
but I dont know where to find specs for CF cards.

the PCMCIA stuff is at http://pcmcia-cs.sourceforge.net/

My next project is to write an MTD driver for PCMCIA flash cards
(not CF) and if I get that working, im going to try and have a go at
CF after that.

cheers
si

>Hi,
>
>We have CF slot on our board, but no IDE controllers. Can I still use your
>blkmtd.c driver to access CF ? If not, what approach should I take to
>utilize
>CF (adding IDE controller is not an option) ?
>
>Thanks in advance.
>
>Felix.
>
>
>
>______________________________________________________
>Linux MTD discussion mailing list
>http://lists.infradead.org/mailman/listinfo/linux-mtd/
>

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

* Re: Block device as MTD
  2001-06-27 22:03     ` Simon Evans
@ 2001-06-27 23:41       ` Bill Roman
  0 siblings, 0 replies; 11+ messages in thread
From: Bill Roman @ 2001-06-27 23:41 UTC (permalink / raw)
  To: linux-mtd

Simon Evans wrote:
> 
> Basically it wont work. blkmtd isnt actually a driver more a translation
> layer. If you want to talk to CF cards directly, you'll have to write an
> MTD driver for it. I dont know much about CF cards as I have always used
> them as IDE drives, but you may want to look at the PCMCIA utils memory_cs
> driver. I think CF cards can appear as regular PCMCIA flash memory cards
> until a bit is enabled that puts them into IDE mode.
> 
> I tried a test once using the memory_cs driver on a CF and whilst it
> gave me some memory regions, they werent the correct size. Basically,
> you'll have to do some hacking around on the driver to get it to work
> but I dont know where to find specs for CF cards.

Compact Flash information is at http://www.compactflash.org/

A spec may be downloaded after registering at http://www.compactflash.org/specdl1.htm

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

* RE: Block device as MTD
@ 2001-06-28  7:39 Michel Stempin
  0 siblings, 0 replies; 11+ messages in thread
From: Michel Stempin @ 2001-06-28  7:39 UTC (permalink / raw)
  To: mtd

Hi,

I found in the past some very good data sheets from SanDisk and Hitachi
(among others). Of course, they are not the original specs, but they provide
some very usefull application examples.

CF and PCMCIA flash are very similar in programming: both can be used either
as an IDE drive, or as a raw flash device. I don't remember if it's a pin
selection or an init command that triggers the mode change.

--
Michel Stempin
MIS
COM One SA, 11 parc de Marticot, 33610 CESTAS, FRANCE
Tel: +33(0)5 57 97 72 72
Fax: +33(0)5 56 78 84 78
Email: mstempin@com1.fr

> -----Message d'origine-----
> De : linux-mtd-admin@lists.infradead.org
> [mailto:linux-mtd-admin@lists.infradead.org]De la part de Simon Evans
> Envoyé : jeudi 28 juin 2001 00:03
> À : Felix Radensky
> Cc : linux-mtd@lists.infradead.org
> Objet : Re: Block device as MTD
>
>
>
> Hi,
>
> Basically it wont work. blkmtd isnt actually a driver more a translation
> layer. If you want to talk to CF cards directly, you'll have to write an
> MTD driver for it. I dont know much about CF cards as I have always used
> them as IDE drives, but you may want to look at the PCMCIA utils memory_cs
> driver. I think CF cards can appear as regular PCMCIA flash memory cards
> until a bit is enabled that puts them into IDE mode.
>
> I tried a test once using the memory_cs driver on a CF and whilst it
> gave me some memory regions, they werent the correct size. Basically,
> you'll have to do some hacking around on the driver to get it to work
> but I dont know where to find specs for CF cards.
>
> the PCMCIA stuff is at http://pcmcia-cs.sourceforge.net/
>
> My next project is to write an MTD driver for PCMCIA flash cards
> (not CF) and if I get that working, im going to try and have a go at
> CF after that.
>
> cheers
> si
>
> >Hi,
> >
> >We have CF slot on our board, but no IDE controllers. Can I
> still use your
> >blkmtd.c driver to access CF ? If not, what approach should I take to
> >utilize
> >CF (adding IDE controller is not an option) ?
> >
> >Thanks in advance.
> >
> >Felix.
> >
> >
> >
> >______________________________________________________
> >Linux MTD discussion mailing list
> >http://lists.infradead.org/mailman/listinfo/linux-mtd/
> >
>
> ______________________________________________________
> Linux MTD discussion mailing list
> http://lists.infradead.org/mailman/listinfo/linux-mtd/
>

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

end of thread, other threads:[~2001-06-28  7:31 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-06-26 10:33 Block device as MTD Simon Evans
2001-06-26 18:22 ` Tim Riker
2001-06-26 20:19 ` Simon Evans
2001-06-26 21:41   ` Bao C. Ha
2001-06-26 20:58     ` Simon Evans
2001-06-26 23:12   ` kira brown
2001-06-26 23:32     ` Bao C. Ha
2001-06-27  6:49   ` Felix Radensky
2001-06-27 22:03     ` Simon Evans
2001-06-27 23:41       ` Bill Roman
  -- strict thread matches above, loose matches on Subject: below --
2001-06-28  7:39 Michel Stempin

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