EmbDev.net

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


Author: Armand Iostrym (iostrym)
Posted on:

Rate this post
0 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

Author: Stefan (Guest)
Posted on:

Rate this post
0 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.

Author: iostrym (Guest)
Posted on:

Rate this post
0 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.

Author: Stefan (Guest)
Posted on:

Rate this post
0 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.

Reply

Entering an e-mail address is optional. If you want to receive reply notifications by e-mail, please log in.

Rules — please read before posting

  • Post long source code as attachment, not in the text
  • Posting advertisements is forbidden.

Formatting options

  • [c]C code[/c]
  • [avrasm]AVR assembler code[/avrasm]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]




Bild automatisch verkleinern, falls nötig
Note: the original post is older than 6 months. Please don't ask any new questions in this thread, but start a new one.