Skip to contentSkip to conversation

Block devices

DISCUSSION David H. Lynch Jr. 4 participants 4 messages Feb 21, 2008

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Sometime recently it seems to have become possible to disable the
whole block device subsystem.
Though in my tests I can't quit build with it disabled.

Anyway, for an embedded device this might be appealing.
how does this interact with initramfs and flash ?

Can I boot an initramfs kernel without a block device ? Can I write a filesystem driver for a flash device that does not
require a block device ?
Are their any examples of something even close ?

Signature · 8 lines
Dave Lynch 					  	    DLA Systems
Software Development:  				         Embedded Linux
717.627.3770 	       [email protected] 	  http://www.dlasys.net
fax: 1.253.369.9244 			           Cell: 1.717.587.7774
Over 25 years' experience in platforms, languages, and technologies too numerous to list.

"Any intelligent fool can make things bigger and more complex... It takes a touch of genius - and a lot of courage to move in the opposite direction."
Albert Einstein
#1 lore raw

David,
First things first. Don't post to multiple mailing lists at the same time.

Quoted 2 lines · David H. Lynch Jr.

Sometime recently it seems to have become possible to disable the
whole block device subsystem.

Yes it is possible. Works for me on 2.6.22-rc5.

Quoted 6 lines

Though in my tests I can't quit build with it disabled.

Anyway, for an embedded device this might be appealing.
how does this interact with initramfs and flash ?

Can I boot an initramfs kernel without a block device ?

Yes this is also possible. And that's why initramfs is fast.

Quoted 2 lines

Can I write a filesystem driver for a flash device that does not
require a block device ?

AFAIK, for a flash file system you need a Block Device. But you can write a character driver to access the flash without a Block Device.

Quoted 1 line

Are their any examples of something even close ?

drivers/mtd/mtdchar.c

Regards,
Indro

Quoted 11 lines
#2 lore raw
Quoted 5 lines · Indraneel
Quoted 2 lines

Can I write a filesystem driver for a flash device that does not
require a block device ?

AFAIK, for a flash file system you need a Block Device. But you can write a character driver to access the flash without a Block Device.

I think JFFS2 (flash file system) does not require a block device. If you mount /dev/mtdblockN with JFFS2, it actually looks up the corresponding MTD character device and uses that instead. The same is probably true of the other dedicated flash filesystems.

-- Jamie

#3 lore raw
In reply to David H. Lynch Jr.
Quoted 1 line · David H. Lynch Jr.

Can I boot an initramfs kernel without a block device ?

Yes.

Quoted 2 lines

Can I write a filesystem driver for a flash device that does not
require a block device ?

Yes.

Quoted 1 line

Are their any examples of something even close ?

For that particular flash case there's just jffs2 in the kernel tree, with some more flash filesystems under development. You can of course have network and in-memory filesystems aswell.