Subject: RE: rom or flashrom root filesystem

From: Jamey Hicks <[email-masked]>
Date: Tue, 23 May 2000 10:46:49 -0400

> 
> Ah. I guess it's slightly more memory efficient having it take the initrd
> from flash directly than allocating some space, copying it to RAM, then
> having it loaded into more memory in the buffer cache? Otherwise you'll
have
> 2 copies, though one could quite possibly be thrown out after the mount.

The kernel generally reclaims the memory that the initrd was in after it has
been copied into the ramdisk (this is one of the things that needs to be
patched if the initrd is in flash).

I've been working with small devices that have limited DRAM and no disk, so
the memory efficiency issue is important.

That being said, ramdisk does not make the best use of memory -- the whole
filesystem resides in DRAM whether you use it or not.  In addition, the
original images resides in Flash (although the flash image will typically be
compressed).  I think it's better to use a flash device driver so that only
the blocks of the files that are accessed are copied to DRAM.  I've used
both ext2 and cramfs -- the compressed ROM filesystem -- mounted on a flash
device driver.  There are several platform-dependent flash drivers
available.  The Memory Technology Devices group is working on a
platform-independent framework flash and other memory drivers.

-Jamey

unsubscribe: body of `unsubscribe linux-arm' to [email-masked]
++        Please use [email-masked] for           ++
++                        kernel-related discussions.                      ++

---

From: David A Rusling <[email-masked]>
Date: Tue, 23 May 2000 18:32:03 +0100

I'm using ROMfs myself - albeit with a very simple block device driver.
ROM-FS sits in flash (and is /dev/rom0).  The block device driver
makes copies in memory of each block.   Yes, that's wastefull of memory
but what I will go on to do is to not actually allocate blocks but
simply leave them on the flash device.  The flash device resides someplace
in kernel memory.   Again, at the moment I copy that kernel into memory
before giving it control of the system (via a boot loader).  This is wasteful
and could/can be avoided.

I'm using a variant of pocket-linux as the basis for the system and the root
file system is kept in the application flash of the systems that I've ported
Linux to (Integrator + Prospector P1100).    The flash may contain many
things (file systems, kernels and so on).

The sources that include all of this support will be put into the free pool (by
ARM) and will include both the pocket Linux stuff and the kernel trees.     For
those of you that do not know me - I run ARM's firmware and RTOS group -
so this is no idle comment.

Dave

ps looks like I'll be going to the Olympia Linux Expo...

--
----------------------------------------------------------------------
David A Rusling                 Consulting Engineer
                                ARM Limited
                                Liberty House,
                                Moorbridge Road,
                                Maidenhead, SL6 8LT

                                Tel: UK-(0)1628-427754
                                Fax: UK-(0)1628-780551
                                e-mail: [email-masked]
----------------------------------------------------------------------