Followup to: <20011213160007.D998D23CCB@persephone.dmz.logatique.fr>
By author: Thomas Capricelli <email@example.com>
In newsgroup: linux.dev.kernel
> I'm looking for a way to put a filesystem into ROM.
> Seems pretty trivial, isn't it ?
> My understanding is (the way initrd does, and the way I do as of today)
> * create a RAMDISK
> * loads the data into ramdisk
> * mount the ramdisk
> problem is that I don't want to waste the RAM as the data in the ROM is
> already in the address space. (it's an embedded system, btw)
> Speed is not an issue here. ROM access might be slower than RAM, it will
> always be so much quicker than a disk access. (wrong?)
Frequently wrong. Depending on the interface, ROM can be just
> Ideally, i would give address/length of the fs in ROM to a function, and I
> would get a ramdisk configured to read its data exactly there, and not in
The right thing for you to do is to write a block device driver, and
then mount that block device like any order device. Your in-use data
will be copied to RAM (i.e. cached), but it can be dropped and
re-fetched as necessary. This should be the desired behaviour.
-- <firstname.lastname@example.org> at work, <email@example.com> in private! "Unix gives you enough rope to shoot yourself in the foot." http://www.zytor.com/~hpa/puzzle.txt <firstname.lastname@example.org> - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to email@example.com More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
This archive was generated by hypermail 2b29 : Sat Dec 15 2001 - 21:00:27 EST