EmbDev.net

Forum: ARM programming with GCC/GNU tools block device debriefing


von Armand I. (iostrym)


Rate this post
useful
not useful
Hi everyone,

I don't know if it's a good place to ask this question but as there is a
lot of microcontroller expert, I think that maybe I could find some
help.
I read a lot of stuff about "block device" and I read it is used to
drive the memory peripheral. For my need, I want to use a flash with a
romfs filesystem. I read also that I have to choose between 3 block
devices that will contain the root filesystem:

-->blkmem driver
-->MTD driver
-->RAM disk driver (only for RAM I suppose)

But I don

von Stefan (Guest)


Rate this post
useful
not useful
You are right. Generally you don't need a block device to read from
FLASH, but romfs (http://romfs.sourceforge.net/) is programmed as block
oriented filesystem.

Why is romfs block oriented? What are the advantages of block-oriented
storage systems?

There is a significant speed improvement on slow storage media such as
disks, cds... because the block driver can do some sort of buffering and
hashing of smaller data blocks instead searching in one big chunk of
data.

von iostrym (Guest)


Rate this post
useful
not useful
Thanks you very mych that's exactly what I was looking for.

Hard disk are block devices so that's mean that use a block driver for
flash is like emulating an hard drive in flash ?

Regards,

Stefan wrote:
> You are right. Generally you don't need a block device to read from
> FLASH, but romfs (http://romfs.sourceforge.net/) is programmed as block
> oriented filesystem.
>
> Why is romfs block oriented? What are the advantages of block-oriented
> storage systems?
>
> There is a significant speed improvement on slow storage media such as
> disks, cds... because the block driver can do some sort of buffering and
> hashing of smaller data blocks instead searching in one big chunk of
> data.

von Stefan (Guest)


Rate this post
useful
not useful
Yes. Hard drive or ram disk or blkmem, you name it.

Think of the block device driver as a low-level "translator" between the
filesystem (driver) that expects a certain low-level organisation of
data stored on a device and the single flash byte or word.

And romfs is some sort of high-level translator for system programs and
application programs that expect a certain high-level organisation of
files stored on a device and data in the flash.

Both together can emulate a file read device.

The block driver might be (better IS) hardware specific. It needs to
know how to read data from the physical device (e.g. access flash
through memory controller or over a transfer protocoll like SPI...).

The romfs filesystem driver doesn't need to know that. romfs can be
hardware-independent. You want to boot your OS from another  device than
flash-rom? No problem. Write a block driver for that device, store the
files in romfs arrangement on the device and go.

Please log in before posting. Registration is free and takes only a minute.
Existing account
Do you have a Google/GoogleMail account? No registration required!
Log in with Google account
No account? Register here.